[rrd-users] Re: I am trying to work with rrd_* functions in PHP but the my PHP5.1.2 is giving Segementation Fault
D. Walsh
info at daleenterprise.com
Wed Jun 21 01:06:00 MEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jun 20, 2006, at 05:52 , Michael Bunk wrote:
> Hi TR,
>
> On Tuesday 20 June 2006 09:23, Thati Ravi wrote:
>> Hai evrybody,
>> (System Details:
>> OS : FedoraCore2
>> PHP: 5.1.2
>> php4rrdtool module is configured.
>> rrdtool is 1.0.49)
>
> Which version of the php bindings for rrdtool do you use now?
> The old ones that fit only for php4 or the new ones from Dave?
I wasn't aware that someone else created a php binding.
>> I am trying to call the rrd_create() in my php script like this:(very
>> simple)
>> $opts=array("--step","300","DS:testing:GAUGE:300:U:U","RRA:MIN:
>> 0.5:2:200");
>> $file="/home/ravit/test.rrd";
>> $res=rrd_create($file,$opts,count($opts));
>>
>> But when it ran from command line its resulting in Segmentaion
>> Fault at
>> rrd_create() function call statement.
>>
>> And I have tried another way by replacing the $opts argument with
>> the
>> whole array(..) statement like this:
>>
>> $file="/home/ravit/test.rrd";
>> $res=rrd_create($file,array("--step","300","DS:testing:GAUGE:
>> 300:U:U","RRA:
>> MIN: 0.5:2:200"),count($opts));
>>
>> In this case rrd_error() is returning this :
>> can't parse argument '/home/ravit/test.rrd'
>> ( here no segmentation fault)
>>
>> i hve gone through the USAGE file which has come with php4rrdtool
>> tarfile.
>> According to that syntax rrd_create() accepts 3 args
>> ( string,array,int)
>> but here its ( I think) the first args not getting parsed as string.
>
> Since Dave's version does not provide such file, you use the old
> bindings for
> php4 with php5. Start thinking!
Yes, this wont work well at all and the old binding works marginally
at best.
>> If any body already using RRDTool in PHP scripts please send me some
>> example scripts which uses rrd_*() functions OR send me some links
>> for the
>> same.
>
> Note also that both bindings produce segfaults with apache 1.3 (a
> getopt
> issue). They don't seem to have any with apache2. SO which version
> of apache
> do you use?
This is incorrect, I have no issues with rrd_*() functions causing
seg-faults under apache 1.3 and neither do many of the people who are
using the binding I've provided Tobi with.
> Kindest regards,
> Michael
>
> --
- -- Dale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
iD8DBQFEmH9YgKKwRgpESgMRAsdPAJ9MtZm2BW/lhrflCqG7cS6LCNSWVACfTxQo
4ZG6VFh2wbBhZqNZQI+0SbQ=
=Aux1
-----END PGP SIGNATURE-----
--
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