• 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

Updating apache, php etc..

B

bonjurkes

Guest
Hello,

I have a script that requires php 4.3.10, but php 4.3.9 comes with plesk 8.1.1 . I was using cpanel some time before and as far as i know every hosting panel (plesk or cpanel) updates the apache and other versions by themselves with upgrades. Because they work stable with specified versions of those packages, manually upgrading those packages (apache, php etc.) can broke off panel.

Is this thing applies for plesk also? I mean can i upgrade my current php version by myself (using yum installation packages), or can only those versions updated by plesks update packages for working stable?
 
Yes, you can upgrade PHP, apache, mysql, etc through yum. That is how plesk is designed, to use what the OS vendor provides with the system. It opens things up to much easier customization.

I have PHP 5.2.3 packages available in my archive, in the [atomic] channel.
 
Yep, this is (in my opinion) one of the greatest features of Plesk :D

I was using cpanel some time before and as far as i know every hosting panel (plesk or cpanel) updates the apache and other versions by themselves with upgrades. Because they work stable with specified versions of those packages, manually upgrading those packages (apache, php etc.) can broke off panel.
I think it's only cPanel that does that :p. Every other control panel I've tried (Plesk, ISP-Config, VHCS) all use the vendor's packages (via yum, apt/dpkg, whatever...).
 
Originally posted by atomicturtle
yep, or any other package on the system for that matter. PSA works with the OS updaters, rather than against them.

You can add my archive with the following:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh |sh


I added your repo to my yum and did a yum update php which updated the php4 to php5 but ran into issue (blank page) where the php.ini had extension_dir = /usr/lib/php4 so I removed it and the pages start loading again.


I have not yum update mysql to mysql5 yet but I got a question about it. Does the yum package update the db to work in mysql5 or I need to dump all db including Plesk's own db and restore it after a yum update mysql?


Thank you
Bill
 
Is there any way to install mcrypt/mhash with your install of PHP5?
 
hi atomicturtle! :) :)


I followed all steps from your wiki-link.
But after step 3 i got that strange error:


Code:
mv /etc/php.ini.rpmnew /etc/php.ini
mv: cannot stat `/etc/php.ini.rpmnew': No such file or directory

the same with step 4?! I restarted my machine several times, without effect :( :(


My system is nearly the same like bonjurkes's:

  • Cent OS 4
  • PLESK 8.1.1
  • PHP Version 4.3.9


zapp (a-lot hell yeah!)
 
Originally posted by atomicturtle
Ive got a wiki page for PHP upgrades here:
http://www.atomicorp.com/wiki/index.php/PHP

There are a few extra steps you need to go through when its a major update like that.

Mysql 4 to 5 is pretty painless, at most you might have to run mysql_fix_privilege_tables.

Thank you for the wiki and I'll update my mysql tonight after backing up the db. Ill keep the mysql_fix_privilege_tables in mind.


Bill
 
Originally posted by atomicturtle

Mysql 4 to 5 is pretty painless, at most you might have to run mysql_fix_privilege_tables. [/B]

Yup your right!

"yum update mysql" then *BOOM* and done. Probably the fastest yum update I ever seen! I am at 5.0.27 and I was coming from 4.1.20


Thanks

Bill
 
Originally posted by CBiLL
Yup your right!

"yum update mysql" then *BOOM* and done. Probably the fastest yum update I ever seen! I am at 5.0.27 and I was coming from 4.1.20


Thanks

Bill
Yep, it's basically the same on Debian (I updated 4.1.15 to 5.0.41 via the dotdeb.org repository) :)
On Debian, doing
Code:
apt-get remove mysql-server-4.1 mysql-client-4.1
Followed by:
Code:
apt-get install mysql-server-5.0 mysql-client-5.0
Will upgrade MySQL with all databases intact :)
 
PHP is the only update that does get complicated, and only if you're making a major change (4->5). For just about everything else, like spamassassin, mysql, clamav, etc. Its just a straight "yum update" type event.

Apache is one exception. I use a common standardized design, and build for all the supported platforms at once (CentOS 3/4/5, RHEL 3/4/5, Fedora 4/5/6/7). Because of dependency issues, I'd have to update a lot of other support packages (pcre, apr, etc) for older distributions like CentOS3, and then all the packages that use those packages. That list gets really big really fast. :p
 
Just to clarify, upgrading mysql to 5.x.x will not impact plesk will it since uses the local mysql 4 installation?

I heard some people say that once you upgrade to mysql 5 then plesk can no longer do a status on the service and that will cause other problems down the road - is that true in this case?

If I do not use MySQL locally for customers (two centralized db mysql servers instead of local) does this still need to be done for php5?
 
I'm trying to do the PHP 4 to 5 upgrade on PLesk 8.11, Centos 4.4 following the instructions at
http://www.atomicorp.com/wiki/index.php/PHP

The repos are setup but when I run

Yum install php-pear I get
Error: Missing Dependency: php = 4.3.9-3.22.5 is needed by package php-pear

Code:
[root@ ~]# yum install php-pear
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
atomic                    100% |=========================|  951 B    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php-pear.x86_64 0:4.3.9-3.22.5 set to be updated
---> Package php-pear.noarch 1:1.5.0-5.el4.art set to be updated
--> Running transaction check
--> Processing Dependency: php >= 5.1.0-1 for package: php-pear
--> Processing Dependency: php = 4.3.9-3.22.5 for package: php-pear
--> Processing Dependency: php-cli for package: php-pear
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php-cli.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php.x86_64 0:5.2.3-1.el4.art set to be updated
--> Running transaction check
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-domxml
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-gd
--> Processing Dependency: php-common = 5.2.3-1.el4.art for package: php
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-imap
--> Processing Dependency: php-common = 5.2.3-1.el4.art for package: php-cli
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-mbstring
--> Processing Dependency: php = 4.3.9-3.22.5 for package: php-pear
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-mysql
--> Processing Dependency: php = 4.3.9-3.22.3 for package: php-ldap
--> Processing Dependency: php <= 4.4.0 for package: php-sqlite2
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php-gd.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-mysql.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-mbstring.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-common.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-pdo.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-imap.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-ldap.x86_64 0:5.2.3-1.el4.art set to be updated
---> Package php-xml.x86_64 0:5.2.3-1.el4.art set to be updated
--> Running transaction check
--> Processing Dependency: php = 4.3.9-3.22.5 for package: php-pear
--> Finished Dependency Resolution
Error: Missing Dependency: php = 4.3.9-3.22.5 is needed by package php-pear
 
No not at all, remember everyone using FC6 have been using mysql 5 with PSA for a while now. Theres nothing in it that effects PSA on 8.1. Only older versions, like 8.0 and 7.5 have problems with mysql 5.
 
Now that I look closer it doesn't look like the php5 was a "clean" install as it missed something

Code:
# php -v
Failed loading /usr/lib/php4/php_ioncube_loader_lin_4.3.so:  /usr/lib/php4/php_ioncube_loader_lin_4.3.so: cannot open shared object file: No such file or directory
PHP 5.2.3 (cli) (built: Jun  7 2007 08:59:02)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with the ionCube PHP Loader v3.1.31, Copyright (c) 2002-2007, by ionCube Ltd.

looks like there was a residual ini file in /etc/php.d

Code:
/etc/php.d/ioncube-loader.ini
zend_extension=/usr/lib/php4/php_ioncube_loader_lin_4.3.so

This needed to be manually removed, and once I restarted apache after that php5 seemed to be ok :)
 
Yeah Ive got that bit in the wiki, whenever you update PHP youve got to update your extensions as well. Thats the 4.3 version of ioncube there. I did put out an update to the plesk package:

php-ioncube-loader-3.0-2

If you run "yum update" it should catch that. Its set up to automatically detect the php version, and adjust the ini setting accordingly.
 
Yeah, as it happened I ended up with both versions installed - I had to manually remove the old one, no biggie :)

Im not sure if this is just a coincidence, but not even a full half hour after I updated mysql on the test box ( I did all the php stuff first and seperately) plesk as a whole just took a dump and quit.
 
Back
Top