23 March 2008 – 5:52 pm by wg
I have just installed Cacti on a new FreeBSD 6.3 machine that I’ve been playing with, and the latest version from ports seems to be broken, displaying the error “Invalid PHP_SELF Path” when I browse to it with a web browser.
A Google search reveals that it seems to be a common problem. This post on the Cacti forums proposes a temporary fix, which I have implemented and seems to work without any problems. It may expose your cacti installation to security problems, but I haven’t looked in to this, and I suspect that most Cacti installations (like mine) are protected by htaccess authentication anyway.
The fix:
In the file /usr/local/share/cacti/includes/global.php, comment out (by prepending //), or delete line 113:
if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {
And replace it with this one:
if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {
Hopefully a new version of Cacti is out soon that fixes this problem.
Posted in Cacti/RRDTool, Software, Operating Systems, FreeBSD | No Comments »