Dotster VPS Upgrade to PHP 5 and MySQL 5
// May 7th, 2007 // Technology Bits
I recently purchased a Dotster VPS and needed to get it upgraded to have PHP 5 and MySQL 5, rather than version 4 of both. These machines run CentOS, so the best plan was to use yum.
Unfortunately, yum is not installed initially, so the first step was to get and install all the prerequisites plus yum:
export MIRROR=http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/
wget ${MIRROR}python-sqlite-1.1.7-1.2.i386.rpm
wget ${MIRROR}sqlite-3.3.3-1.2.i386.rpm
wget ${MIRROR}python-urlgrabber-2.9.8-2.noarch.rpm
wget ${MIRROR}python-elementtree-1.2.6-4.2.1.i386.rpm
wget ${MIRROR}yum-2.4.3-1.c4.noarch.rpm
rpm -Uhv python-elementtree-1.2.6-4.2.1.i386.rpm
rpm -Uhv python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uhv sqlite-3.3.3-1.2.i386.rpm
rpm -Uhv python-sqlite-1.1.7-1.2.i386.rpm
rpm -Uvh yum-2.4.3-1.c4.noarch.rpm
Once that is in place, you need to enable CentOS Plus. Go into /etc/yum.repos.d/CentOS-Base.repo and under [centosplus] change “enabled=0″ to “enabled=1″.
Now you can simply execute ‘yum update’ and it should install both MySQL 5 and PHP 5 with all the necessary prerequisites (plus a number of other things…)
Update: A few other things to do:
- Remove /etc/php.d/ioncube-loader.ini This file will cause weirdness with PHP and throw “Failed loading /usr/lib/php4/php_ioncube_loader_lin_4.3.so: /usr/lib/php4/php_ioncube_loader_lin_4.3.so: undefined symbol: zend_hash_add_or_update” in /var/log/httpd/error_log
- Change php.ini memory_limit to be increased from the default of 8M, I recommend at least 32MB
- Tune your MaxClients setting in /etc/httpd/conf/httpd.conf I couldn’t begin to make a recommendation here…
Do this at your own risk, this could mess up your entire system. Be sure to have a good backup before starting this process.




[...] care because I want Apache 2.2.4, and while it’s pretty easy to get MySQL & PHP 5 on a CentOS/Plesk box, Apache 2.2 is a bit more of a [...]
Hey, thanks a bunch for this little helper post. I just upgraded to a VPS and had php4 and mysql4, so this helped speed up the transition process 10 fold. Thanks again.
One word - LIFESAVER! I’m in the process of transferring several of my sites to a new VPS with a new company, which only offers CentOS as the OS…which is fine, but I’m used to FC6. I wasn’t sure if I could just upgrade software without screwing up Plesk or what (not used to having a control panel to get in my way)
Really helpful.
WOW!
I was pretty worried, but it was just smooth and easy. :)
THANKS!
had two centos 4.4 boxes this worked a charm.
Had to recompile suexec but only took a few mins.
Many thanks
It is worth mentioning that you should upgrade your MySQL databases as well, so that you can take advantage of some of the zoomy new features in 5.
mysql_upgrade -u admin –password=XXXXXXXX
You can get the ioncube loader message to go away by downloading the free ioncube loaders from this page
http://www.ioncube.com/loaders.php
the reason it is complaining is that now it only has the old loaders for php 4.3.
since you have just upgraded to php5 you only need to upload the ioncube php5 loaders to get rid of that message.
to do that do something like
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
make sure you go to ioncube and select the package that is right for your system. the random link above is the tar file for the linux x86-64 server
then just copy the ioncube loader into the same directory that the complaints are coming from. in the case above it’s
/usr/lib/php4/php_ioncube_loader_lin_4.3.so
so you need to copy
/usr/lib/php4/php_ioncube_loader_lin_5.0.so
into the same directory then the ioncube loaders can be activated.
I followed exactly step by step your kindly provided recommendations, but yummy on my CentOS4.6 machine only upgraded the centos kernel on yum update. sql is still 4
Good help thanks,
I’ve upgrade my PHP to v 5 without any issue
but i have an error in the beginning of this upgrade for Mysql and now i should take some help from friends.
Regards
Dimi