kporter.porter Posted October 4, 2007 Share Posted October 4, 2007 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 https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/ Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2007 Share Posted October 4, 2007 I am going to have to learn PHP this weekend and rewrite the sight error by error. Any errors? Link to comment https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362016 Share on other sites More sharing options...
kporter.porter Posted October 4, 2007 Author Share Posted October 4, 2007 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 https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362020 Share on other sites More sharing options...
trq Posted October 4, 2007 Share Posted October 4, 2007 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 https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362032 Share on other sites More sharing options...
kporter.porter Posted October 4, 2007 Author Share Posted October 4, 2007 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 https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362036 Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2007 Share Posted October 4, 2007 this is a NOTICE that you can ignore. But you'll want to turn off notices in error handling in php.ini. Link to comment https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362073 Share on other sites More sharing options...
trq Posted October 4, 2007 Share Posted October 4, 2007 Sorry, $_SERVER['REMOTE_ADDRESS'] was a typo, should be $_SERVER['REMOTE_ADDR']. Link to comment https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362091 Share on other sites More sharing options...
kporter.porter Posted October 5, 2007 Author Share Posted October 5, 2007 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 https://forums.phpfreaks.com/topic/71868-solved-site-down-after-upgrade/#findComment-362478 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.