Jump to content

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/107614-migrate-from-php3-to-php5/
Share on other sites

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.

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.

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.