Comment 1 for bug 677820

Revision history for this message
Ben Johnson (a03-6eo-chg) wrote :

Frantisek, the reason that amavis-stats stopped functioning correctly after applying package updates is that your PHP version was upgraded.

amavis-stats relies on PHP's dl() function, which was removed from some SAPIs in PHP 5.3 (see: http://www.php.net/manual/en/function.dl.php ).

The workaround that you outlined (commenting-out one of the control structures) will have undesirable effects and cause the script to malfunction for embedded PHP configurations (because the $rrd variable will always be set to "command-line").

Instead, the calls to the dl() function should be replaced with calls to the extension_loaded() function, as such:

[...]

if (function_exists('rrd_graph') && !extension_loaded('rrdtool.so')) {
 $rrd = "PHP embedded";
}

if (!function_exists('rrd_graph') && !extension_loaded('rrdtool.so')) {

[...]