Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438630 - net-analyzer/cacti Adding Patch for dev-lang/php:5.4
Summary: net-analyzer/cacti Adding Patch for dev-lang/php:5.4
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
Depends on:
Reported: 2012-10-16 22:11 UTC by timtasse
Modified: 2013-04-27 15:09 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

diff from functions.php (cacti-php54-v2.diff,697 bytes, text/plain)
2012-10-16 22:11 UTC, timtasse

Note You need to log in before you can comment on or make changes to this bug.
Description timtasse 2012-10-16 22:11:13 UTC
Created attachment 326720 [details]
diff from functions.php


there is a simple bug in cacti with PHP 5.4
it uses the session_unregister function and this is obsolete and removed in PHP5.4

here is a patch.
please add the patch to the ebuild for working cacti and PHP 5.4 together.

Comment 1 Opportunist 2012-10-22 13:31:36 UTC
We also have "Call to undefined function define_syslog_variables() in /var/www/localhost/htdocs/cacti/lib/functions.php on line 518" in poller.php.
Comment 2 timtasse 2012-10-22 21:56:27 UTC
OK i use cacti.log for logging.
in this bugreport it is safe to simple remove this lines in php5.4

i think maybe it is smart to check the version before calling this function:
if (PHP_VERSION_ID < 50300) {
so the function is only called if the version is lower than 5.3

this if clause around the function at all places should solve the problem and the deprecated errors in 5.3
Comment 3 Opportunist 2012-10-23 05:26:37 UTC
Thank you, timtasse! Poller.php is alive again ;)
Comment 4 Dennis Schridde 2013-01-16 18:34:40 UTC
See also:
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2013-04-27 15:09:38 UTC
This patch was added to cacti-0.8.8a. New version bumped bug is fixed :) Thanks for report anyway.