Jump to content

[SOLVED] Site down after upgrade.


kporter.porter

Recommended Posts

I upgraded to 5.2.4 and now my site doesn't work.  I didn't do any of the original programming.  I have found and fixed a few things, but there has to be some way to make it compatible with PHP5.  I don't have a way of going back to the older version (very dumb mistake on my part)

 

I am running iis6.0 on server2003 using php5.2.4.

 

Any ideas or am I going to have to learn PHP this weekend and rewrite the sight error by error?

Link to comment
Share on other sites

I get this error now when transferring to a page

 

Notice - PHP Notice: Undefined index: REMOTE_ADDR in c:location\Session.php on line 45.

 

That line has the following code.

 

$GLOBALS["$SessionName"]=md5 (microtime() . $GLOBALS["REMOTE_ADDR"]);

 

This is the current error.  I turned on globals as security is the least of my worries right now.

 

Link to comment
Share on other sites

The global variable $REMOTE_ADDR no longer exists in favour of $_SERVER['REMOTE_ADDRESS'] however enabling register_globals (not recommended) in your php.ini should fix this. Did you restart the server after enabling this?

 

Be aware that having register globals switched on is not just a security risk but can cause unexpected behavour.

Link to comment
Share on other sites

Thanks for the reply.

 

Yes I restarted the server and even restarted the machine to make sure after I made change to php.ini.

 

It didn't fix it.  I changed the code to match yours and it still gives me the same error, except using REMOTE_ADDRESS instwead of REMOTE_ADDR.

 

Notice - PHP Notice: Undefined index: REMOTE_ADDRESS in c:location\Session.php on line 45.

 

When I debug the Session.php it says no errors, no output.  I get this error (plus a couple of header errors after it) when I debug login.php.

Link to comment
Share on other sites

Thank you BlueSkyIS and thorpe.  I really appreciate your help.  I made the change to REMOTE_ADDR.  I also read the sticky about headers and now I get a header when I logon into the site.  The notices do not show on the site, just when I debug in the IDE (I am using PHP Designer 2007 - Personal).

 

I'll have to search to see what my next problem is, but thanks again for the great help.

Link to comment
Share on other sites

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.