Jump to content


This topic is now archived and is closed to further replies.


Newbie Help Not only newbie but migrating from PHP 4 to 5

Recommended Posts


I'm brand new to PHP programming.  So please pardon my ignorance.  After all, ignorance is simply the lack of knowledge, not the ability to learn.

Not only am I new to this, I've also been challenged to migrate a PHP based Electronic Change Notificaton program which also relies heavily on MySQL from PHP ver. 4.0.4 to 5.0.4. Apache ver. 1.3.12 to Apache 2.0.54  As my first challenge.  Now I've been scripting (ksh) and doing basic C programing in different *nix systems for a dozen years or so, so I'm no ID-10-T when it comes to programming.  I've been doing a lot of reading here regarding PHP, MySQL and such.  I've seen how variables now should be (for lack of a better term) delcared before being used.  I've also learned a bit about syntax.  The online manual is awsome! 

I had the program up and running on the new server in about 20 minutes once I figured out how to set the php.ini file to be compatible (as near as I can figure).  There are a ton of notices regarding undefined variables, indexes, and offsets.

What I need help with here is finding the differneces between the two versions.  What should I be looking for in the V4 program that V5 doesn't like?  Is there a place on this or other sites that would give me a good rundown?

Trust me there will be a lot more questions regarding the best way to initialize variables, sharing them between pages, etc... once I learn a bit more.

Thanks in advance,

Share this post

Link to post
Share on other sites
Your biggest difference here is probably just a configuration issue. Older versions of php had register globals switched on, it is now (for security reasons) switched off by default.

Register globals (amongst other things) automatically parsed variables sent via get or post into local variables. So, instead of having to use the new $_GET['id'], you could simply use $id.

This is no longer supported and I would never recommend switching registr globals back on. You'll need to change your code accordingly.

Share this post

Link to post
Share on other sites


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.