|
|
| Author |
Message |
sllywhtboy
Joined: 09 Jul 2006 Posts: 27 Location: detroit'ish
|
Posted: Tue Feb 26, 2008 4:14 pm Post subject: |
|
|
| wasca's fix worked for me. thanks! |
|
| Back to top |
|
 |
william
Joined: 06 Jun 2005 Posts: 18
|
Posted: Thu Feb 28, 2008 12:09 pm Post subject: |
|
|
| guys I'm running on FreeBsd, new install of cacti 7b all went fine. But when I try to browse to it I get the PHP SELF error. What can I do to fix? |
|
| Back to top |
|
 |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2325 Location: Sophia-Antipolis, France
|
Posted: Fri Feb 29, 2008 2:10 am Post subject: |
|
|
Hi
please see megaman's post on 1st page. |
|
| Back to top |
|
 |
william
Joined: 06 Jun 2005 Posts: 18
|
Posted: Fri Feb 29, 2008 9:31 am Post subject: |
|
|
| Thank you that did the trick! |
|
| Back to top |
|
 |
Ajunne
Joined: 21 Nov 2006 Posts: 2
|
Posted: Sat Mar 01, 2008 8:34 am Post subject: |
|
|
I have the same issue. I installed the Ubuntu package of Cacti and since the latest package upgrade, I get the 'Invalid PHP_SELF' error.
As stated above in this thread, the error is most likely due to the fact that some distributions place the PHP code in a special directory, and use an Apache alias /cacti to map the entry URL to the location of the code (which is not in your Apache document root).
The easiest way to fix this, without having to fiddle with the PHP code, is to make a symlink.
First, locate your apache config that came with your Cacti installation package. If you did it by hand, then you most likely know where it is. Otherwise, /etc/cacti is usually a safe bet.
My installation of Ubuntu puts it in /etc/cacti/apache.conf
Open the file with an editor, and see if there is a Alias directive. Ubuntu uses the following:
| Code: | | Alias /cacti /usr/share/cacti/site |
Comment this out by putting a hash in front of the line:
| Code: | | #Alias /cacti /usr/share/cacti/site |
Now go to your Apache document root. On Ubuntu, this is /var/www. Once there, create a symlink to the Cacti installation directory (you might have to be root to do this):
| Code: | $ cd /var/www
$ ln -s /usr/share/cacti/site cacti |
Now, reload your Apache config. Ubuntu uses the following command (this needs to be done as root):
| Code: | | $ /etc/init.d/apache2 reload |
Browse to http://your-server/cacti . Fixed. |
|
| Back to top |
|
 |
blihtar
Joined: 23 Feb 2007 Posts: 1
|
Posted: Sun Mar 09, 2008 10:37 am Post subject: downgrade will help to solve problem |
|
|
procedure on ubuntu:
1. check version now and before
"apt-cache policy cacti"
2.you will get something like that ( screen after downgrade)
"cacti:
Installed: 0.8.6j-1.1
Candidate: 0.8.6j-1.1ubuntu0.2
Version table:
0.8.6j-1.1ubuntu0.2 0
500 http://security.ubuntu.com gutsy-security/universe Packages
*** 0.8.6j-1.1 0
500 http://us.archive.ubuntu.com gutsy/universe Packages
100 /var/lib/dpkg/status
"
3.then downgrade picking lower version like
"apt-get install cacti=0.8.6j-1.1" |
|
| Back to top |
|
 |
falconz
Joined: 04 Oct 2007 Posts: 2
|
Posted: Tue Mar 11, 2008 5:50 pm Post subject: |
|
|
This worked for me
| Code: |
root@monitor:~# apt-cache policy cacti
cacti:
Installed: 0.8.6i-3ubuntu0.2
Candidate: 0.8.6i-3ubuntu0.2
Version table:
*** 0.8.6i-3ubuntu0.2 0
500 http://security.ubuntu.com feisty-security/universe Packages
100 /var/lib/dpkg/status
0.8.6i-3 0
500 http://nz.archive.ubuntu.com feisty/universe Packages
root@monitor:~# apt-get install cacti=0.8.6i-3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
cacti
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 955kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://nz.archive.ubuntu.com feisty/universe cacti 0.8.6i-3 [955kB]
Fetched 955kB in 1s (884kB/s)
Preconfiguring packages ...
dpkg - warning: downgrading cacti from 0.8.6i-3ubuntu0.2 to 0.8.6i-3.
(Reading database ... 94050 files and directories currently installed.)
Preparing to replace cacti 0.8.6i-3ubuntu0.2 (using .../cacti_0.8.6i-3_all.deb) ...
Unpacking replacement cacti ...
Setting up cacti (0.8.6i-3) ...
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
Replacing config file /etc/cacti/debian.php with new version
dbconfig-common: flushing administrative password
* Reloading web server config... 24325
[ OK ]
|
I think ill wait a while before i try to upgrade cacti again. |
|
| Back to top |
|
 |
st0kes
Joined: 08 Oct 2007 Posts: 6
|
Posted: Wed Mar 19, 2008 4:20 pm Post subject: |
|
|
One more person here with this problem.
Upgraded the Cacti package using apt (Ubuntu Gusty) and the error appeared.
Thank you very much Ajunne for the fix - that did the trick. |
|
| Back to top |
|
 |
savar
Joined: 23 Jun 2008 Posts: 1
|
Posted: Mon Jun 23, 2008 5:50 am Post subject: |
|
|
Hi,
i've the same problem on debian.
installed 0.8.6i-3.2 via apt-get
and upgraded to 0.8.7b
tried all your hints here but i'll get the error
| Code: |
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 121
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 122
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 123
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 124
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 125
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 129
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/include/global.php on line 129
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/config.php:39) in /usr/share/cacti/site/auth_login.php on line 201 |
and i can't log in.
Can anyone help?
thanks |
|
| Back to top |
|
 |
Priceadmin
Joined: 12 Aug 2008 Posts: 5
|
Posted: Tue Aug 12, 2008 5:20 am Post subject: |
|
|
Hi
I followed all this topic but i have the same problem before install.
when i modified global.php file, i have a blank page.
Without change in global, i have "Invalid PHP_SELF Path".
With symbolic link, i have : The requested URL /cacti/index.php was not found on this server.
i cannot access to setup page.
I'm on RHEL 5 64 bits with cacti 0.8.7B
thanks |
|
| Back to top |
|
 |
Priceadmin
Joined: 12 Aug 2008 Posts: 5
|
|
| Back to top |
|
 |
Priceadmin
Joined: 12 Aug 2008 Posts: 5
|
Posted: Tue Aug 26, 2008 5:22 am Post subject: |
|
|
Hi,
i downgrade to 0.8.7a and it works. |
|
| Back to top |
|
 |
jmb
Joined: 29 Jul 2008 Posts: 3
|
Posted: Mon Sep 08, 2008 8:17 am Post subject: |
|
|
Another situation where the PHP_SELF test fails:
| Code: | [DOCUMENT_ROOT] => /usr/local/cacti/
[SCRIPT_FILENAME] => /home/jmb/public_html/cacti/cacti-0.8.7b/graph_view.php
[PHP_SELF] => /~jmb/cacti/cacti-0.8.7b/graph_view.php
| (sorted by megaman's workaround)
I've not seen any comment (here, svn or bugzilla) on what security issues this block is supposed to fix - is there an explanation somewhere? The tests look to be conflating the filesystem path with the URL path, without taking into account likely differences like aliasing. |
|
| Back to top |
|
 |
|