On my laptop I have PHP Version 5.2.1. When I put in a url such as http://www.example.com/index.php/malicious-xxs-attack on this server, PHP_SELF looks like this:
/index.php/malicious-xss-attack
On another server, I've got PHP Version 4.4.7. When I enter the same url, PHP_SELF looks like this:
/index.php
Is there some sort of setting that causes this? I'm pretty sure I've been told why before, but I don't remember and searching has turned up nothing.
PHP_SELF contains PATH_INFO on server A but not server B
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP_SELF contains PATH_INFO on server A but not server B
I just noticed that. Ack.The Ninja Space Goat wrote:On my laptop I have PHP Version 5.2.1.
[...]
On another server, I've got PHP Version 4.4.7..
Does that mean you have to dumb down your scripts to put them online?
- maliskoleather
- Forum Contributor
- Posts: 155
- Joined: Tue May 15, 2007 2:19 am
- Contact:
Re: PHP_SELF contains PATH_INFO on server A but not server B
your second server is probably running as CLI.The Ninja Space Goat wrote:On my laptop I have PHP Version 5.2.1. When I put in a url such as http://www.example.com/index.php/malicious-xxs-attack on this server, PHP_SELF looks like this:
/index.php/malicious-xss-attack
On another server, I've got PHP Version 4.4.7. When I enter the same url, PHP_SELF looks like this:
/index.php
Is there some sort of setting that causes this? I'm pretty sure I've been told why before, but I don't remember and searching has turned up nothing.
since version 4.3, if running as CLI, PHP_SELF contains the filename, anything earlier it comes up empty.
running as the apache module, it should contain the full page path.
you may wanna look around the $_SERVER['argv'] variable... if i remember right, that contains what you want when used in CLI.