Jump to content

Site disabled after PHP upgrade


LDWeb

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/195726-site-disabled-after-php-upgrade/
Share on other sites

$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.