PHP versions
Has anyone had experience with upgrading from version 4.x to 5.x of PHP?
My server currently runs 4.x and I am thinking about having the hosting compnay upgrade to v5.x
I'm starting to play around more with classes in PHP, and I like the way 5.x looks to handle them (having public and private variables , etc).
Now my thing is, I have a program online, and need to know what to check in it before an upgrade so it will not be crashing when the upgrade goes in. I remember the problems the one time I upgraded servers at univerisity, and had to make all kinds of adjustments for things that needed to be in the $_SERVER, $_POST and $_GET variables.
Anyone with experience in upgrading and knows what to look for before getting the upgrade.
-Greg
Busy posted this at 10:37 — 19th July 2006.
He has: 6,151 posts
Joined: May 2001
I upgraded my home pc to PHP5 to test my sites as my host said they were going to upgrade.
If the code is written without shortcuts it should still work ok, some of teh functions have changed a bit but my main site at the time (e-com site) didnt have any problems, that includes all sorts including image uploads.
The $_GET etc should be done even in PHP4, more secure. I believe safe mode is on by default in PHP5 (I had to turn it off for file uploads via php.ini).
In the end I went back to PHP4 as my host never did upgrade.
You can run both versions on your pc if you wanted, just change the pointer to either version, I named mine php4 and php5. can be a pain as you have to restart apache each time you change.
webdude12 posted this at 06:58 — 3rd August 2006.
They have: 3 posts
Joined: Aug 2006
The problem with php5 is there are alot of public used scripts that do not support it yet. So if you upgrade your server, make sure you check any public scripts you may have installed. Also it is possible to run php4 on some sites, and php5 on others. I have done that on one of my vpses
Greg K posted this at 09:27 — 3rd August 2006.
He has: 2,145 posts
Joined: Nov 2003
The good (?) news the server does not use any public scripts, it is all custom built from the ground up.
I'm thinking of requesting the upgrade.
-Greg
andy206uk posted this at 00:19 — 6th August 2006.
He has: 1,758 posts
Joined: Jul 2002
You could always install both side by side. Have existing sites running with a .php file extension continue to use PHP4 and have PHP5 only work in files with a .php5 extension. Their sysadmins should know how to do that.
That way you get the best of both worlds!
Andy
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.