Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 31st Dec 2015, 12:14 AM   #1
VIP Warrior
War Room Member
 
magentawave's Avatar
 
Join Date: 2007
Location: San Diego, California
Posts: 1,605
Thanks: 748
Thanked 66 Times in 56 Posts
Arrow
If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

1) If I flip the switch in my cpanel from the current PHP 5.2 to PHP 5.4, is it possible that if it breaks my website that it would require major work to get the site back the way it was even AFTER switching back to PHP 5.2?

2) I have a few old HTML sites that I built with XsitePro 2 that I'm going to rebuild with WP a little later in 2016. Does anyone know if XsitePro 2 will work with PHP 5.4?

Thanks
magentawave is offline  
Unread 31st Dec 2015, 08:36 AM   #2
Server Problem Smasher
 
jeffatrackaid's Avatar
 
Join Date: 2010
Location: Jacksonville, FL
Posts: 46
Thanks: 0
Thanked 18 Times in 17 Posts
Default
Re: If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

Don't blindly do this - use a development server.

Depending on your OS and MySQL version, you may also have to update MySQL. A MySQL update could cause more issues than PHP. The issue is you cannot downgrade MySQL via cPanel. You have to do it manually at the command line and will need a pre-upgrade MySQL backup. If you are not a sysadmin, I don't recommend you attempt this. I don't even let our junior sysadmins do this.

In terms of PHP, magic quotes was dropped in PHP 5.4 and some other functions. Magic quotes was a popular in earlier PHP programs, so that alone could break your app.

The process we use is to setup a cheap VPS server, clone over the site and apache configuration. Test the site. Then upgrade PHP to 5.3 then to 5.4 testing at each phase.

Once complete, you can then update your production system with less risk.

Make sure to make both file level and MySQL backups prior to update.

The biggest risk with legacy apps is that encoding or other data encapsulation may be altered by changes in PHP. If this occurs, then data could be corrupted or entered correctly with no way to back out except reverting to your backups. This is why you need to test all aspects of the site. Test checkout, sign ups, emails, admin functions etc.

While adding some time and costs, you can avoid firefighting and loss revenue in case of a meltdown.

Server support services for small businesses. Remember, Faster sites sell more.
jeffatrackaid is offline  
The Following User Says Thank You to jeffatrackaid For This Useful Post:
Unread 31st Dec 2015, 12:16 PM   #3
VIP Warrior
War Room Member
 
magentawave's Avatar
 
Join Date: 2007
Location: San Diego, California
Posts: 1,605
Thanks: 748
Thanked 66 Times in 56 Posts
Default
Re: If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

So what you are saying is that it is very possible that upgrading PHP could damage my sites and that downgrading the MySQL later must be done manually.

That leads to a couple questions, please...

1) Wouldn't making a backup of the entire cpanel backup the MySQL too?

2) And if so, wouldn't that also mean that if I had to revert back to PHP 5.2 that I could simply replace everything after the upgrade with the backup thus avoid having to manually downgrade the MySQL?
magentawave is offline  
Unread 5th Jan 2016, 09:25 AM   #4
Server Problem Smasher
 
jeffatrackaid's Avatar
 
Join Date: 2010
Location: Jacksonville, FL
Posts: 46
Thanks: 0
Thanked 18 Times in 17 Posts
Default
Re: If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

cPanel will not downgrade the MySQL server software automatically. You have to remove and re-install the old MySQL version AND re-import your MySQL backups.

Server support services for small businesses. Remember, Faster sites sell more.
jeffatrackaid is offline  
The Following User Says Thank You to jeffatrackaid For This Useful Post:
Unread 5th Jan 2016, 11:12 AM   #5
VIP Warrior
War Room Member
 
magentawave's Avatar
 
Join Date: 2007
Location: San Diego, California
Posts: 1,605
Thanks: 748
Thanked 66 Times in 56 Posts
Default
Re: If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

Originally Posted by jeffatrackaid View Post

cPanel will not downgrade the MySQL server software automatically. You have to remove and re-install the old MySQL version AND re-import your MySQL backups.
Hostgator says it's just a matter of flipping the switch to go up or down. I went from 5.2 to 5.4 with no problems at all and don't anticipate ever having to go down.

Thanks for your input.
magentawave is offline  
Unread 5th Jan 2016, 12:02 PM   #6
Active Warrior
 
PeachCoding's Avatar
 
Join Date: 2011
Location: Atlanta, GA
Posts: 96
Thanks: 0
Thanked 15 Times in 15 Posts
Default
Re: If PHP 5.4 breaks my site would it require major repairs to fix it?
Share on: 
fb share twitter share gplus share more share

If you have access to the WHM side of the cPanel account with root level access then yes you can change the versions of both MySQL and PHP individually or at the same time using easyapache when logged in as root to WHM.

And I fully recommend setting up a development environment to do the upgrade for as I've helped many companies & people fix problems from upgrading PHP or MySQL to newer versions and the problem sizes ranged from as easy as replacing a function name to the new version of it to having to recode entire sections of their websites.

Hope that helps.
PeachCoding is offline  
Closed Thread


Bookmarks

Tags
breaks, fix, major, php, repairs, require, site


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:36 AM.