Home > PHP > Upgrade to PHP 5 and MySQL 5

Upgrade to PHP 5 and MySQL 5

March 8, 2008 Posted by KP

There is really no any reason to continue using PHP 4 and MySQL 4 except being lazy. The upgrade was quite smooth and took about 1.5 hours including compiling time.

Upgrade MySQL 4.0.27 to MySQL 5.0.51a
This guide explained it very well, just follow it.

Note:
1. mysql_upgrade will repair tables automatically when needed.

2. After running mysql_upgrade, mysql server should be restarted.

3. mysql_upgrade can be executed more than one time with the ‘-f’ option. e.g. if you see lots of errors during mysql_upgrade, you may want to make sure all tables are OK.

Upgrading PHP 4.4.8 to 5.2.5
I started with this guide, but I didn’t use portupgrade for such major upgrades. Anyway, it’s basically the same, list all PHP related packages, delete them first, install them manually.

Note:
1. It seems that lang/php5-extensions has included all PHP related packages, just check those you required.

2. Apache configuration file needs some changes:
DirectoryIndex: I simply replaced ‘php4′ with ‘php5′
AddType: Added the following lines:

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>

Bookmark and Share


Related Posts:

Filed Under: PHP

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Links

  • Dedicated Servers
  • Meta