gaspar Posted May 28, 2008 Share Posted May 28, 2008 Good day, I have work and learn php byb developping a small site, I developed this site in php3 and now I would like to migrate to php5, the problem is some of my script/code does not work in php5 and I can not find out why ? If somebody could give me the possible reason, It would be great Thanks Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/ Share on other sites More sharing options...
Daniel0 Posted May 28, 2008 Share Posted May 28, 2008 Take a look at these documents: http://www.php.net/manual/en/migration5.php http://www.php.net/ChangeLog-5.php http://www.php.net/ChangeLog-4.php Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551560 Share on other sites More sharing options...
gaspar Posted May 28, 2008 Author Share Posted May 28, 2008 Thanks, I will look at theses links. By the way I was wrong I am actually in PHP Version 4.4.1 and wat to go php 5.x.x. the latest I guess ;-) Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551598 Share on other sites More sharing options...
gaspar Posted May 28, 2008 Author Share Posted May 28, 2008 Is this possible that magic quote in the new PHP5 behave differently ? ??? Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551606 Share on other sites More sharing options...
Daniel0 Posted May 28, 2008 Share Posted May 28, 2008 Yes, it's turned off by default in PHP5 and completely removed in PHP6 (not released yet). Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551628 Share on other sites More sharing options...
gaspar Posted May 28, 2008 Author Share Posted May 28, 2008 Thanks, It might be the cause of my problem in php5, I certainly hope so :-\ I guess my best bet will be to turn off that magic quote in my php4 and see if same problem occur, if not, then I am confuse ? I will have to find the cause somehow. Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551659 Share on other sites More sharing options...
PFMaBiSmAd Posted May 28, 2008 Share Posted May 28, 2008 It sounds like you have access to the master php.ini. I recommend setting error_reporting to E_ALL and display_errors On (stop and start your web server to get changes made to php.ini to take effect) to get php to help you with anything it finds, such as undefined variables which are no longer getting set due to things like register globals. The most common reasons why code stops working when moving between servers (this is not really a php4 vs php5 problem) are code that uses short open tags, register globals, register long arrays, output buffering, magic quotes... to name a few. Magic quotes setting differences would show up as broken queries when data contains special characters and your error checking logic on queries would tell you if that is occurring, assuming you have well written code that has error checking logic in it. What symptoms are you seeing? Beyond this, posting you code would be the quickest way for someone to be able to tell you what php configuration specific things it is doing. Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551674 Share on other sites More sharing options...
gaspar Posted May 28, 2008 Author Share Posted May 28, 2008 Thank you so mich for your quick response, I am going to try this error_ reporting to E_All it is currently 6143 whatever that means. Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551829 Share on other sites More sharing options...
Daniel0 Posted May 28, 2008 Share Posted May 28, 2008 I am going to try this error_ reporting to E_All it is currently 6143 whatever that means. Just a tip, use the constant, not the integer value. These are exactly reasons why code might break with upgrades. The integer might in this instance change, but the constant will always be called E_ALL. Quote Link to comment https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/#findComment-551840 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.