Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Upgrade from 0.8.7a to 0.8.7b: 'Invalid PHP_SELF Path'
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
oxo-oxo
Cacti User


Joined: 30 Aug 2007
Posts: 106
Location: Silkeborg, Denmark

PostPosted: Tue Oct 14, 2008 12:15 pm    Post subject: http://bugs.cacti.net/view.php?id=1320 Reply with quote

reported as bug

http://bugs.cacti.net/view.php?id=1320
Back to top
quequotion



Joined: 17 Oct 2008
Posts: 2

PostPosted: Fri Oct 17, 2008 6:42 am    Post subject: New config.php Reply with quote

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.
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Fri Oct 17, 2008 7:53 am    Post subject: Reply with quote

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.
Back to top
quequotion



Joined: 17 Oct 2008
Posts: 2

PostPosted: Fri Oct 17, 2008 8:36 am    Post subject: fix'd Reply with quote

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:

/* 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:

        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:

$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.
Back to top
oxo-oxo
Cacti User


Joined: 30 Aug 2007
Posts: 106
Location: Silkeborg, Denmark

PostPosted: Wed Nov 05, 2008 4:20 am    Post subject: Reply with quote

svn now contains the new check
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group