Upgrade from 0.8.7a to 0.8.7b: 'Invalid PHP_SELF Path'
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I believe the megaman fix to be secure.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 4
- Joined: Thu Feb 14, 2008 11:54 am
Possible workaround without touching the code
Hi,
I also observed this behavior. So, to make sure it runs, I just assured that alias path on the web-browser is the same as the cacti linux sub-folder.
Clarifying what I wrote above:
E.g.:
your alias on your browser: http://localhost/cacti/index.php
your cacti home folder: /home/cactiuser/cacti/
Cacti sub-folder: /cacti
Web-browser alias: /cacti
So cacti can find all files on both structures (alias and path).
I also observed this behavior. So, to make sure it runs, I just assured that alias path on the web-browser is the same as the cacti linux sub-folder.
Clarifying what I wrote above:
E.g.:
your alias on your browser: http://localhost/cacti/index.php
your cacti home folder: /home/cactiuser/cacti/
Cacti sub-folder: /cacti
Web-browser alias: /cacti
So cacti can find all files on both structures (alias and path).
It's a way around the bug, but doesn't solve it unfortunately. And you're also exposing yourself to potential future exploits by having a "standard" xxx/cacti form.
The FreeBSD port (and I assume Linux's "ports/rpm") install in a xxx/cacti folder and the modification of the Alias is to somewhat secure cacti from standard exploits that target xxx/cacti.
The FreeBSD port (and I assume Linux's "ports/rpm") install in a xxx/cacti folder and the modification of the Alias is to somewhat secure cacti from standard exploits that target xxx/cacti.
Hello!
I have the FreeBSD installation from ports:
I added some debug here:
This show me:
Invalid PHP_SELF Path /cacti/index.php - /usr/local/www/apache22/data - /usr/local/share/cacti/index.php
As we can see, this installed not under DOCUMENT_ROOT, but cacti checked for this.
I have the FreeBSD installation from ports:
I added some debug here:
Code: Select all
echo "\nInvalid PHP_SELF Path \n";
echo $_SERVER["PHP_SELF"] ;
echo " - ";
echo $_SERVER["DOCUMENT_ROOT"];
echo " - ";
echo $_SERVER["SCRIPT_FILENAME"];
exit;
Invalid PHP_SELF Path /cacti/index.php - /usr/local/www/apache22/data - /usr/local/share/cacti/index.php
As we can see, this installed not under DOCUMENT_ROOT, but cacti checked for this.
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
with Debian/Ubuntu, is it under /etc/cacti ?
with Debian/Ubuntu, is it under /etc/cacti ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
-
- Posts: 1
- Joined: Sun Feb 24, 2008 3:39 am
Same problem, same fix
For the record, same problem in Ubuntu Gutsy after upgrading the cacti package yesterday.
Fixed by applying Megaman's fix on /usr/share/cacti/site/include/config.php line 87.
Thanks.
Fixed by applying Megaman's fix on /usr/share/cacti/site/include/config.php line 87.
Thanks.
Same Issue Here!
Wel ive got the exact same problem here....
Running on FreeBSD6.2.
megaman's fix worked for me.
Running on FreeBSD6.2.
megaman's fix worked for me.
-
- Posts: 42
- Joined: Sun Jul 09, 2006 1:51 am
- Location: detroit'ish
- Contact:
Test this solution:
https://bugs.launchpad.net/ubuntu/+sour ... bug/194687
https://bugs.launchpad.net/ubuntu/+sour ... bug/194687
I can confirm that upgrading cacti to 0.8.0.6h on Ubuntu Dapper 6.06 LTS breaks cacti but this fixes it.
edit /usr/share/cacti/site/include/config.php
Look at line 86
Replace this line
With this
I had to run through the install process after doing this. All my data was still there.
Hope this helps.
edit /usr/share/cacti/site/include/config.php
Look at line 86
Replace this line
Code: Select all
if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {
Code: Select all
if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {
Hope this helps.
Who is online
Users browsing this forum: No registered users and 1 guest