[rrd-users] rrdtool php extension

Benny Baumann BenBE at geshi.org
Fri Sep 4 12:43:32 CEST 2009


Hi,

Am 04.09.2009 01:35, schrieb Rick Dicaire:
> Hi folks, I compiled, installed, and enabled rrdtool php extension, it
> shows as enabled in phpinfo().
>   
Usually the make install already does this. The warning you get shows
that you somehow load it twice ...Recheck your config please if you
really load the extension only once.
> rrdtool 1.2.27 (compiled, not package), php 5.2.6 (compiled, not
> package), slackware linux 12.1.0, gcc (GCC) 4.2.3
>   
The latest extension (the one here on the mailing list recently) has
only been tested with rrdtool 1.3.8 and 1.3.999 (and only fully works
with the latter) but I don't see a reason why it shouldn't with 1.2.27
(the reason for 1.3.999 mainly is a function introduced only recently
which the extension uses at one place).
> When trying to run the following php script via commandline, I get the
> following:
>
> <?php
>   $fname = "missing.rrd";
>   $opts = array( "--step", "86400", "--start", "1231022640",
>            "DS:missing:GAUGE:172800:U:U",
>            "DS:msie:GAUGE:172800:U:U",
>            "DS:none:GAUGE:172800:U:U",
>            "RRA:AVERAGE:0.5:1:360",
>            "RRA:AVERAGE:0.5:7:360",
>            "RRA:AVERAGE:0.5:30:360",
>            "RRA:AVERAGE:0.5:360:360",
>            "RRA:MAX:0.5:1:360",
>            "RRA:MAX:0.5:7:360",
>            "RRA:MAX:0.5:30:360",
>            "RRA:MAX:0.5:360:360"
>         );
>   $ret = rrd_create($fname, $opts, count($opts));
>   if( $ret == 0 )
>   {
>     $err = rrd_error();
>     echo "Create error: $err\n";
>   }
> ?>
>   
Looks fine to me. (BTW: if you're using the version from the ML you can
skip the count parameter - it's ignored anyway)
> php missing_rrd.php
> PHP Warning:  Module 'rrdtool' already loaded in Unknown on line 0
> Segmentation fault
>
> I've tried stracing this:
>
> [snip]
>   
could you do a gdb run on this script or get a dump of where it
segfaulted using a coredump?
> Any thoughts/ideas on why the rrdtool module is segfaulting?
>   
None yet. I know of one bug the version on the mailing list has but that
effects another function. Will send the fix for this soon.

BTW: Could you try to run your PHP with the Suhosin Extension and
Suhosin Patch? It should give some more detailled information on the
location then (The Suhosin Patch and in limited form the extension patch
the PHP memory manager to include canaries. So the script doesn't only
crash at the end, but at the location where these canaries are broken).
> Thanks
> --
> aRDy Music and Rick Dicaire present:
> http://www.ardynet.com
> http://www.ardynet.com:9000/ardymusic.ogg.m3u
>   
Regards,
BenBE.

P.S.: Latest ML version is
https://lists.oetiker.ch/pipermail/rrd-developers/2009-August/003401.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090904/cac9c4fc/attachment.pgp 


More information about the rrd-users mailing list