LDWeb Posted March 18, 2010 Share Posted March 18, 2010 Hello, I have a site that I have never had a problem with until I updated from PHP 5.0.4 to PHP 5.3.1, I also updated my mysql to mysqli. Needless to say my site no longer works. I am trying to fix this one problem at a time. My first problem is, when I click on a link the address that is displayed in the address bar changes to the correct page but nothing happens it remains on my index page. This is part of the code located at the top of my page: $baseDir = "http://".$_SERVER['HTTP_HOST'].strrev(substr(strrev($PHP_SELF), strrpos($PHP_SELF, "/"))); And this is the code for the links: <a href=\"".$PHP_SELF."?page=welcome\"><IMG SRC=\"images/menu/button1.gif\" border=0></a> I have no idea what has gone wrong, do you see a problem with this code? THANKS in advance for any assistance you can give me Quote Link to comment https://forums.phpfreaks.com/topic/195726-site-disabled-after-php-upgrade/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 18, 2010 Share Posted March 18, 2010 $PHP_SELF was depreciated long ago (8 years) in php4.2 when register_globals were turned off by default. Register_globals being on, finally throws a depreciated error in php5.3 and they have been completely removed in php6. See this recent thread for what you need to do to make your code operate without relying on register_globals - http://www.phpfreaks.com/forums/index.php/topic,291699.0.html Quote Link to comment https://forums.phpfreaks.com/topic/195726-site-disabled-after-php-upgrade/#findComment-1028255 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.