PHP Upgrade issues : Plesk / Redhat 4


PHP Upgrade issues : Plesk / Redhat 4

I was trying to upgrade the PHP version to php5 on a Redhat 4 server with Plesk 8.4 but had many issues, as the redhat mirrors do not have PHP5. PHP5 is available with Redhat 5. I used atomicrocketturtle repository for the installation, here is a guide for the upgrades http://www.atomicorp.com/wiki/index.php/PHP

I then tried the wiki but got errors for up2date

#  up2date php –dry-run
Unresolvable chain of dependencies:
php-domxml-4.3.9-3.22.12 requires php = 4.3.9-3.22.12
php-pear-4.3.9-3.22.12 requires php = 4.3.9-3.22.12
php-sqlite2-1.0.2-200608291859 requires php <= 4.4.0

Later I used yum which too gave me errors for php-pdo and php-xml :

# yum update php
Error: Missing Dependency: php-common = 5.2.5-3.el4.art is needed by package php-pdo

I fixed that error by installing php-pdo

# yum install php-pdo
# yum update php
Error: Missing Dependency: php-common = 5.2.5-3.el4.art is needed by package php-xml
# yum install php-xml

You need to modify the php.ini for the module path, the upgrade will not modify the path to php5

Edit the php.ini to one as below :

; Directory in which the loadable extensions (modules) reside.
;extension_dir = /usr/lib/php4
extension_dir = /usr/lib/php/modules

Now I had previously ioncube installed on the php4 which throwed errors 🙁

# 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 5.2.6 (cli) (built: May  2 2008 11:18:31)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

I installed ioncube loader for php5 using :

# yum install php-ioncube-loader

Still the error was same, I debugged a  lot and found that there was ioncube_loader config file under php.d

# ls /etc/php.d | grep ioncube
ioncube.ini
ioncube-loader.ini

I removed the file ioncube-loader.ini which was for php4 and fixed the upgrade problems.

#  php -v
PHP 5.2.6 (cli) (built: May  2 2008 11:18:31)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies


Hope this helps anyone in mess 🙂

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.