[rrd-users] Re: this is wat I have done to work with rrdtool in PHP. can u help me
D. Walsh
info at daleenterprise.com
Sat Jun 10 20:30:39 MEST 2006
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
On Jun 8, 2006, at 03:25 , Thati Ravi wrote:
> I have tried these things today morning ***** ( and in the
> previous mail I
> have supplied my OS an d all the required details any way
> specifying again
> OS: Fedora Core2 Apache2.2.2 and PHP 4/5 both with explanation
> show here)
> 1.First I have installed rrdtool1.0.49 with source code downloaded frm
> rrdtool website again
> 2.Got the php4rrdtool1.03 and configured it php4/5 as shown in below
> explanation.
> 1.About RRDTool1.0.49:
>
> RRDTool-1.0.49:
> ./configure --enable-shared
> make
> make install
>
> Then
> 2.php4rrdtool1.03
> PHP4RRDTool1.03\
>
> 1.Untarred into a directory
> 2.rrdmodule$./configure --with-rrdtool=/path/to/rrdtool-1.0.49/
> --with-php-config=/path/to/php-config
> (Here I have two PHP versions php4 and php5.1.2)
>
> First with php5's php-config file:
> OutPut of configure comand:
> ./configure --with-rrdtool=/usr/local/rrdtool-1.0.49/
> --with-php-config=/usr/local/bin/php-config
> loading cache ./config.cache
[ SNIP ... ]
> [ravit at SSDG17 php4-rrdtool-1.03]$ make
> make[1]: Entering directory `/home/ravit/RRDIns/PhpRRD/php4-
> rrdtool-1.03'
> make[1]: Nothing to be done for `all-p'.
> make[1]: Leaving directory `/home/ravit/RRDIns/PhpRRD/php4-
> rrdtool-1.03'
> Then Install:
> [root at SSDG17 php4-rrdtool-1.03]# make install
> make[1]: Entering directory `/home/ravit/RRDIns/PhpRRD/php4-
> rrdtool-1.03'
> installing shared modules into
> /usr/local/lib/php/extensions/no-debug-non-zts-20050922
> make[1]: Leaving directory `/home/ravit/RRDIns/PhpRRD/php4-
> rrdtool-1.03'
>
> After this I have tried to execute an example scripts from the
> untarred
> files.
> [ravit at SSDG17 ~]$ ./rrd_create.php ( You can see the code at the
> bottom)
>
> Warning: dl(): Unable to load dynamic library './rrdtool.so' - ./
> rrdtool.so:
> cannot open shared object file: No such file or directory in
> /home/ravit/rrd_create.php on line 8
> This is a php script to create an rrd databse file
First, the php4rrdtool module doesn't work properly and isn't
supported by anyone.
What is the "extension_dir=" entry in your php.ini file?
> Fatal error: Call to undefined function rrd_create() in
> /home/ravit/rrd_create.php on line 22
>
>
> #! /usr/local/bin/php -q ( this is php5.1.x)
> <?
> dl("rrdtool.so");
The "dl(rrdtool.so)" only works if php.ini is configured properly.
>
> " echo " This is a php script to create an rrd databse file \n";
> $_opts = array( "--step", "300", "--start", 0,
> "DS:input:COUNTER:900:0:U",
> "DS:output:COUNTER:900:0:U",
> "RRA:AVERAGE:0.5:1:1000",
> "RRA:MIN:0.5:1:1000",
> "RRA:MAX:0.5:1:1000"
> );
>
> $ret = rrd_create("/tmp/test.rrd", $_opts, count($_opts));
>
> if ( $ret == 0 )
> {
> $err = rrd_error();
> echo "Create error: $err\n";
> }
>
> ..........
> ?>
>
>
> If I replace the first line of the code with /usr/bin/php -q
> which is php4
> I am getting the following error :
>
> [ravit at SSDG17 ~]$ ./rrd_create.php
> This is a php script to create an rrd databse file
> Segmentation fault
> (not getting the same error as previous execution)
>
> My attempt is to run php scripts in the command prompt as well as
> on Apache
> Server with RRD funcrions
>
> I ran phpinfo() function from my apache2.2.2 sever which gave a
> the output
> as shown in the attachment to this mail.
>
> --
>
> Ravi.Thati
> Our Attempts may fail but we should not fail to attempt.
-- Attached file removed by Ecartis and put at URL below --
-- Type: application/octet-stream
-- Size: 64k (66279 bytes)
-- URL : http://lists.ee.ethz.ch/p/phpinfo-apache1
-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: text/plain
-- Attached file removed by Ecartis and put at URL below --
-- Type: application/octet-stream
-- Size: 59k (60525 bytes)
-- URL : http://lists.ee.ethz.ch/p/phpinfo-apache2
-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: text/plain
-- Attached file removed by Ecartis and put at URL below --
-- Type: application/pgp-signature
-- Desc: This is a digitally signed message part
-- Size: 189 bytes
-- URL : http://lists.ee.ethz.ch/p/17-PGP.sig
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list