RRD extension for PHP
+
Par Remi le samedi 5 mars 2011, 11:07 - RPM - Lien permanent
A new rrd extension, to manage the rrdtool file in PHP is published.
A rrdtool extension (provided by rrdtool-php) already exists, but it seems not really active.
The php-pecl-rrd package is available int the remi repository for fedora and EL 6.
The rrd extension doesn't seem to be a drop-in replacement for the rrdtool extension. Provided functions are not the same.
$ php -r 'print_r(get_extension_funcs("rrdtool"));'
Array
(
[0] => rrd_graph
[1] => rrd_fetch
[2] => rrd_error
[3] => rrd_clear_error
[4] => rrd_update
[5] => rrd_last
[6] => rrd_create
[7] => rrdtool_info
[8] => rrdtool_logo_guid
)
$ php -r 'print_r(get_extension_funcs("rrd"));'
Array
(
[0] => rrd_update
[1] => rrd_create
[2] => rrd_graph
[3] => rrd_error
[4] => rrd_fetch
[5] => rrd_first
[6] => rrd_info
[7] => rrd_last
[8] => rrd_lastupdate
[9] => rrd_restore
[10] => rrd_tune
[11] => rrd_xport
)
The new rrd extension also provides 3 classes : RRDGraph, RRDCreator and RRDUpdater.
Documentation in available online.
So, you must choose one (both cannot be installed together).
I think than the developer have switch to "stable" too quickly (in fact, he don't really cares about other distributions than debian), so I open some bug reports:
- Bug #2576 : FAIL RRDCreator test (64bits code issue)
- Bug #2577 : rrd 0.10.0 report as 0.9.0 (displayed version issue)
- Bug #2578 : This RRD was created on another architecture (data test issue)
- Bug #2579 : FAIL rrd_info test [tests/rrd_012.phpt] (environment issue)
- Bug #2580 : Build fails against rrdtool 1.2.x (pre requisite detection issue)
This bugs are fixed, or a workaround applied in the provided RPM. So I'm waiting for some author's responses.
No RPM for EL <= 5, as the rrdtool version (1.2.8) available in EPEL is outdated isn't supported.
If you use the rrdtool extension, I'm waiting for you to test this new alternative. Please, post your feedback about the rrd extension.
Of course, I will probably propose this package for the official fedora repository, as soon as the author will give some better feelings.
For packager : my work on github.
Commentaires
Patches submitted to upstream for each open bug.
Update to 1.0.0 and submit it for review (Bug #695819)