• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Upgrade to PHP5?

T

thedust2010

Guest
What is the easiest way to upgrade my machine to use PHP 5? I tried:

yum update php

but it just checks for latest version of PHP 4. I have CentOS 4.3 and Apache 2 running. I'm obviously not a server expert. I'd like to handle the installation as automatically as possible... any suggestions?
 
Plesk uses the PHP version installed by the OS you're running Plesk on. Since the latest version of CentOS 4 has PHP 4 you're getting PHP 4. Actually almost all distributions are still on PHP 4. I know Fedora Core 4 runs PHP 5, but I think that might be the only Red Hat-style Linux that has it now and is supported for running Plesk.

That being said, it is possible to add third party repositories like Atomic Rocket Turtle's atomic-bleeding channel to your yum configuration and install PHP 5 from there.
 
Some problems in a critical LAMP application have had as recommendation to upgrade PHP from 4.3.x to 5.x . I run Plesk 8.0 on RHEL4.
Would a simple tarball download, configure - make - make install do it ?
 
Thank you breun for the hint to ATR, but I am confussed about the yum thing.

Could I simply download all the PHP5 related RPMs found there and do the traditional rpm -ivh install ?
 
You could just download the rpms, but please use rpm -U (upgrade) instead of rpm -i (install) or you'll have both PHP4 and PHP5 packages installed.

But like the bottom of the page says: it's not recommended to use a yum channel of rpms without yum. Instructions for yum are at the bottom of the page (use atomic-bleeding instead of atomic is you want the PHP5 rpms). Be aware that these rpms are in the bleeding channel for a reason.
 
Originally posted by breun
You could just download the rpms, but please use rpm -U (upgrade) instead of rpm -i (install) or you'll have both PHP4 and PHP5 packages installed.

But like the bottom of the page says: it's not recommended to use a yum channel of rpms without yum. Instructions for yum are at the bottom of the page (use atomic-bleeding instead of atomic is you want the PHP5 rpms). Be aware that these rpms are in the bleeding channel for a reason.

I use the ART RPMS without Yum all the time, it does not harm if you install the rpms propperly, ala rpm -Uvh rpmname.rpm

Furthermore, I've used the ART PHP 5.0.4 rpms on RHEL3 & RHEL4 with both Plesk 7.5.4 and 8.0 and they work flawlessly as far as I can tell.
 
I have ART's php 5.0.4 on my CentOS 4.3 box and it works great. I think they are in his atomic-testing channel. The atomic-bleeding channel holds the 5.1 rpms which I haven't tried yet and they are much less tested.
 
After doing the rpm -Uvh on all the atomic-bleeding RPMS (for PHP 5.1.2 on RHEL4) with apparent success, simply calling php from the command line throws me a lot of warnings/errors :

[root@myhost:/depot] # php -v
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
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/domxml.so' - /usr/lib/php/modules/domxml.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: undefined symbol: mysql_set_character_set in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sitebuilder.so' - /usr/lib/php/modules/sitebuilder.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.1.2 (cli) (built: Feb 20 2006 13:17:07)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Bad thing ...
Think about stepping back...
 
Correction on the atomic-bleeding channel.. its not that they arent well tested... its more like they arent tested at all :p Im working on backports from FC5.
 
Thanks atomicturtle - will be looking forward for updates.
For the while I stepped back to PHP 4.3.x (a full server restore).
Will come back, it is not a definitive abandon.
 
You could use php 5.0, thats in atomic-testing, which actually is tested. I'll probably push that down to the main atomic channel shortly
 
[root@myhost:/depot] # php -v
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

I'm actually not surprised by this error. ionCube Loader for PHP 4.3 won't work with PHP 5.1. Upgrade ionCube too.
 
Thanks breun for your tips about IonCube, and the stepping back (did a server restore just because I had the script for this and it not (yet) a production server). Will post any news about this issue.
 
Back
Top