Upgrade from 0.8.7a to 0.8.7b: 'Invalid PHP_SELF Path'

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

User avatar
oxo-oxo
Cacti User
Posts: 126
Joined: Thu Aug 30, 2007 11:35 am
Location: Silkeborg, Denmark
Contact:

http://bugs.cacti.net/view.php?id=1320

Post by oxo-oxo »

Owen Brotherwood, JN Data A/S, Denmark.
quequotion
Posts: 5
Joined: Fri Oct 17, 2008 6:38 am

New config.php

Post by quequotion »

There is a new config.php with the latest release of cacti.

The file is much shorter (several settings seem to have been deferred elsewhere) and none of these fixes are operational now.

Is it still possible to use this fix or the patches generated for it at the bug tracker in any way?

The newest release of cacti has the same problem on Debian.
After installing from apt-get, and upgrading according to this:

http://www.cacti.net/downloads/docs/html/upgrade.html

I get the same php self error.

The patches and code no longer work because the configuration of cacti has changed.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Please provide me with your configuration file for the web server. I'm curious to see what they are doing that is breaking the check.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
quequotion
Posts: 5
Joined: Fri Oct 17, 2008 6:38 am

fix'd

Post by quequotion »

rony wrote:Please provide me with your configuration file for the web server. I'm curious to see what they are doing that is breaking the check.
Nevermind! I resolved this on my own.

In the latest builds of 0.8.7b, much of the code from config.php has migrated to global.php.

I am not sure which line, but you'll find something like this in global.php:

Code: Select all

/* Sanity Check on "Corrupt" PHP_SELF */
This works for upgrading from apt-get's 0.8.6i version to 0.8.7b in Debian.
It may work for others.

Step One:

Edit global.php and comment out (for safety and posterity) or delete the old sanity check (a couple of nested ifs). Put in the code from this thread:

Code: Select all

        if ($_SERVER["SCRIPT_NAME"] != $_SERVER["PHP_SELF"]) {
                echo "\nInvalid PHP_SELF Path \n";
                exit;
        }
Step Two

Edit config config.php. If you installed this by apt-get, your $database_whatever section is special. You need only TWO LINES:

Code: Select all

$database_type = "mysql";
require('/etc/cacti/debian.php');
That's it! Comment out or delete the other $database_blahblah lines.

FIN

Once you get cacti running, go to your cacti page and it will ask you some setup questions.

If you install the Plugin Architecture by copying files later, you'll have to do step one over again, but just step one.
User avatar
oxo-oxo
Cacti User
Posts: 126
Joined: Thu Aug 30, 2007 11:35 am
Location: Silkeborg, Denmark
Contact:

Post by oxo-oxo »

svn now contains the new check
Owen Brotherwood, JN Data A/S, Denmark.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests