I have an app currently running on a PHP 5.2 server that I need to migrate to a PHP 5.5 (or 5.6) server. What are the things to look at, what issues might I encounter? Thanks in advance
Asked
Active
Viewed 1.2k times
-1
-
Many things I'm sure. One of which and if you're using MySQL db *by any chance*, would require to switch/convert all `mysql_` to `mysqli_` or PDO. – Funk Forty Niner Feb 06 '15 at 18:06
-
I would start with [the 5.5 migration guide](http://php.net/manual/en/migration55.php) and work back from there. I would also say that you should consider jumping to 5.6 instead of 5.5 (why jump into something less than the latest version?) – Machavity Feb 06 '15 at 18:08
-
Employing a checker tool should be among things to do. Just search "php version compatibility check" and see several results. I've never used any of them though. – qtuan Feb 06 '15 at 18:10
2 Answers
7
Basically, you have to migrate your code from 5.2 to 5.3, then to 5.4, then to 5.5, and then to 5.6. For each Migration, the PHP documentation has listed what you may encounter:
- 5.2 -> 5.3 : http://php.net/manual/de/migration53.php
- 5.3 -> 5.4 : http://php.net/manual/de/migration54.php
- 5.4 -> 5.5 : http://php.net/manual/de/migration55.php
- 5.5 -> 5.6 : http://php.net/manual/de/migration56.php
Look for Backward incompatible changes and deprecated features. Hope I could help.

Khaarkh
- 328
- 2
- 6
7
This is well documented.
- http://php.net/manual/en/migration53.php
- http://php.net/manual/en/migration54.php
- http://php.net/manual/en/migration55.php
- http://php.net/manual/en/migration56.php
Go through each of these one by one. This may be a good time to refactor your application.

Brad
- 159,648
- 54
- 349
- 530