Page 1 of 1

Windows XAMPP PHP_SELF, SCRIPT_URL etc Not working - WHY?

PostPosted: 14. March 2006 18:20
by baiwan
My Windows (XP Home) XAMPP installation is working fine, with one exception. I can't seem to retrieve any script location information; eg:

$test=$_SERVER['PHP_SELF'];
echo $test.'<br>';

Gives no output on my local server, but works as expected on a remote Web Server.

I assume there is a setting in php.ini or elsewhere that I need to change? If anyone can advise it would save what little hair I have left!

My Local Server is running apache 2.2.0 and PHP Version 5.1.1

My Web Server is a linux box running apache 1.3.33 and PHP Version 4.4.2

Thanks in Advance![/b]

PostPosted: 14. March 2006 18:28
by KingCrunch
How do you call the script local?

calling script local

PostPosted: 14. March 2006 18:42
by baiwan
script is saved as a .php file (eg. test.php) and saved in a drectory below htdocs. The accessed via url using IE6 - eg:


http://localhost/grad4/test.php

the remote server has a similar file accessed using IE6 - eg.

http://www.myserver.co.uk/grad4/test.php

Hope this is clearer!

Regards

Now working

PostPosted: 14. March 2006 19:21
by baiwan
I made some unrelated changes to php.ini earler (eg. PHP prescision from 12 to 14 bits) and PHP_SELF now works!

Perhaps there was an error there that I have inadvertantly removed? Anyway, it's OK now