Hosting

Lunarpages VPS Update PHP4 to PHP5

php5How to update the Lunarpages Web Hosting vps php4 to php5?
I am using the wordpress as my blog platform,which is the best php CMS in the world I think; and use Lunarpages web hosting as my server.I bought a VPS from Lunarpages, I have use their hosting for many years, their service and servers are very great.This is the reason why I am not change to other web hosting.
I am also a newbie on technical,I do know nothing on server, I can use Cpanel, but for VPS, they use Plesk, and they use PHP4 on their servers, which in stable they think.Yesterday,I want to use a cool wordpress gallery plugin, but it can not work on php4, so I have to update the php4 to php5.
Here are the steps. Do not following the official steps, they can not work anymore, I got failed and find the steps on how to update your VPS PHP script.Here we go.

  1. Login to the server as root via ssh. I use putty to access my server.
  2. Install yum using the following commands:
    rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
    rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
    rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
  3. The next step isĀ  add Atomic repository that contains PHP for Linux Plesk servers and update PHP and MySQL:
    rpm -ivh http://www.atomicorp.com/channels/atomic/centos/4/i386/RPMS/atomic-release-1.0-10.el4.art.noarch.rpm
    rpm --nodeps -e php-domxml
    yum update php*
    yum update mysql*
    yum install php-xml
  4. Remove yum if you are done with software installations using “yum upgrade” or installing other packages can break the VPS:
    rpm -e `rpm -aq | grep yum`
  5. If you have finished the steps, you may get some error just like:yum update mysql*
    Importing Additional filelist information for dependency resolution
    Traceback (most recent call last):
    File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
    File "/usr/share/yum-cli/yummain.py", line 138, in main
    (result, resultmsgs) = base.buildTransaction()
    File "__init__.py", line 343, in buildTransaction
    File "depsolve.py", line 254, in resolveDeps
    File "depso

    File “depsolve.py”, line 73, in whatProvides
    File “repos.py”, line 285, in populateSack
    File “mdcache.py”, line 106, in getFilelists
    File “mdcache.py”, line 90, in _getGeneric
    File “mdcache.py”, line 62, in _unpickle
    EOFError

    and more error just like
    Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: cannot open shared object file: No such file or dir ectory in Unknown on line 0
    If you do not know what’s wrong with the server, you can check the Apache logs.
    Where is the Apache logs? : If you use Lunarpages VPS, you can find here: Virtuozzo ->File Manager->/var/httpd/
    Check the logs find what’s wrong.

    The most error on these VPS is:

    Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: cannot open shared object file: No such file or dir ectory in Unknown on line 0
    You may find that mysql.so is under file php4, you have to change the path.
    Where can you find the mysql.so now?
    You can find the mysql.so here: /usr/lib/php/modules ,remember this path.

    Then you have to change the php.ini
    Where is the php.ini? : /usr/lib/php/modules

    Find /usr/lib/php4/mysql.so
    Change the path to
    /usr/lib/php/modules/mysql.so

    ok, it’s over

  6. Reboot your server use this command via ssh:
    /etc/init.d/httpd restart

Okay, enjoy your php5!

Also, if you want to use the best cheap VPS, you can consider the Lunarpages VPS