Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.