Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: SERVER SELF doesn't work
03-24-2007, 03:50 PM #1
- Join Date
- Feb 2006
- Thanked 0 Times in 0 Posts
SERVER SELF doesn't work
I have two web sites and I can use this in one but not the other. Both run PHP and run on exactly the same server and settings.
<?php echo $PHP_SELF ?>
It prints out the correct url in one site but doesn't show in the other?
Here are two links with exactly the same markup and coding...
(DOESN'T WORK!!!!) http://www.kodekontrol.com/portfolio...ts/dynamic.php
Anyone ever have problems like this. It's totally unexplainable!!!
Last edited by buildrebuild; 03-24-2007 at 03:59 PM.
03-24-2007, 04:25 PM #2
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 335 Times in 327 Posts
While it is possible that both of these domains are on the same server (for example if you have obtained dedicated IP addresses for each of them), they have different IP addresses and are likely on two different servers. Just because they are both under one hosting account/reseller account, does not mean they are automatically on the same server. Here are the IP addresses -
kodekontrol.com. A 22.214.171.124
buildrebuild.com. A 126.96.36.199
So, they could have different register_globals settings if they are in fact on different servers.
If they are in fact on the same server, than a .htaccess file could be setting register_globals different between the two.
What does a script file containing a phpinfo(); statement show for the register_globals setting for each?
Edit: The fix, of course, is to use the register_globals independent $_SERVER['PHP_SELF']
Edit2: In checking your domains at www.dnsreport.com, both of them have several warnings associated with mail, that email you send will receive a high rank as junk/spam by most recipient mail systems.
Last edited by CFMaBiSmAd; 03-24-2007 at 04:31 PM.
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.