Upgrading from PHP 4 to PHP 5
Upgrading from MySQL 4.0 to MySQL 4.1
PHP5 was "production released" last July, and MySQL 4.1 became a "GA" release which is their equivalent later in the year. In both cases, the new release is not 100% "plug and play" compatible with the old, and at present most users are still running PHP4 and MySQL 4.0 or even 3.23.
I've been running a
MySQL course the last couple of days and even though the customers are using the older versions, I'm showing them the new too and giving some thoughts / ideas as to how they should work so that their current systems will be easily upgraded in the future.
Things particularly effecting the upgrade of PHP / MySQL systems:
- PHP5 object model slightly different to PHP4 model
- MySQL client libraries no longer bundled with PHP5; new Mysqli functions available in their place
- MySQL login password scheme changed at MySQL 4.1
Note - LOTS of lovely new facilities; here I've just noted issues that may be "gotcha"s when transferring code.
For newcomers to PHP and MySQL, the changes between the versions are small enough for our courses to cover both, with you doing your practicals on whichever setup is most appropriate. If you're an existing PHP / MySQL site and looking to plan your upgrade route, let us know and we can provide you with a day or two of training covering the aspects above and other things such as templated queries, SQLite, XML handling and the PHP5 object model.
(written 2005-01-28, updated 2006-06-05)
Associated topics are indexed under
H114 - Sourcing, installing and configuring PHP [3132] Virtual Hosting with Apache http server - an overall scheme, and avoiding common pitfalls - (2011-01-14)
[2646] Compile but do not run PHP - syntax check only - (2010-02-22)
[2589] Your PHP code does not work? Here is where to start looking. - (2010-01-18)
[2433] Controlling, supressing, enabling PHP error messages - (2009-10-02)
[2317] How to make a Risotto (PHP build style) - (2009-08-02)
[1936] Quick Summary - PHP installation - (2008-12-12)
[1768] What is built in to this httpd and PHP? - (2008-08-23)
[1731] Apache httpd, MySQL, PHP - installation procedure - (2008-08-01)
[1688] cannot restore segment prot after reloc message - PHP / httpd - (2008-06-26)
[1667] Checking server performance for PHP generated pages - (2008-06-06)
[934] Clustering, load balancing, mod_rewrite and mod_proxy - (2006-11-21)
[481] PHP upgrade - traps to watch - (2005-10-31)
[316] Development Environments - (2005-05-19)
S153 - Sourcing, Running and Configuring MySQL [2458] Cant connect to local MySQL server through socket /tmp/mysql.sock - (2009-10-17)
[2445] Securing MySQL on a production server - (2009-10-09)
[2444] Potted MySQL installation - (2009-10-09)
[2426] Which version of MySQL am I running? - (2009-09-26)
[2209] Monitoring and Tuning your MySQL installation - (2009-05-31)
[2085] MySQL - licensing issues, even with using the name - (2009-03-16)
[1935] Summary of MySQL installation on a Linux system - (2008-12-11)
[1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
[1689] Some sideways thoughts on the news - (2008-06-27)
[1131] MySQL - Password security (authentication protocol) - (2007-04-02)
[1123] mysqldump and mysqlrestore - (2007-03-30)
[1095] Apache httpd , browser, MySQL and MySQL client downloads - (2007-02-28)
[907] Browser -> httpd -> Tomcat -> MySQL. Restarting. - (2006-10-28)
[591] Key facts - SQL and MySQL - (2006-02-04)
[535] MySQL permissions and privileges - (2005-12-20)
[515] MySQL - an FAQ - (2005-12-03)
[489] Which MySQL server am I using? - (2005-11-07)
[334] Symbolic links and hard links - (2005-06-02)
S161 - Data Access and Security in MySQL [3270] SQL - Data v Metadata, and the various stages of data selection - (2011-04-29)
[2647] Removing duplicates from a MySQL table - (2010-02-22)
[2263] Mysqldump fails as a cron job - a work around - (2009-06-30)
[2204] Images in a database? How big is a database? (MySQL) - (2009-05-28)
[947] What is an SQL injection attack? - (2006-11-27)
[647] Checking for MySQL errors - (2006-03-15)
[401] What is an SQL injection attack? - (2005-08-02)
[193] The wrong MySQL - (2005-01-29)
Some other Articles
An Open Source course on the Channel IslandsCustomer service - examples to warn usPublished PhotographerCurrent MySQL and PHP paths and upgradesSetting up a training room for a coursePython enginesTuesdays and FridaysPink elephant and appreciationa popular bus number