• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

How and why did Plesk uninstall itself following a PHP upgrade?

aaronadams

New Pleskian
Well, that was a harrowing evening.

Two days ago, I needed to ditch the ancient version of PHP provided by CentOS 5.9. I decided to add the IUS repository and install the latest version of PHP 5.3.

I replaced the php53 package provided by CentOS with the php53u package provided by IUS. It worked perfectly; websites were still working, Plesk was still working, and PHP was correctly reporting its new version number.

Today, I got an email that my sites were all down. Sure enough, they were – and imagine my surprise when I discovered Plesk was missing! Completely and totally uninstalled.

I reinstalled Plesk, and then re-updated PHP – and everything is now working again.

PHP is definitely updated:

Code:
$ php -v
PHP 5.3.21 (cli) (built: Jan 17 2013 12:33:50) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.
$

I've verified the dependencies in my RPM database:

Code:
$ rpm -Va --nofiles
$

I've asked yum if any upgrades are available:

Code:
$ yum upgrade
Loaded plugins: downloadonly, fastestmirror, priorities, replace
Loading mirror speeds from cached hostfile
 * base: mirror.flhsi.com
 * epel: mirror.hiwaay.net
 * extras: mirror.ash.fastserv.com
 * ius: mirror.rackspace.com
 * updates: mirror.wiredtree.com
Setting up Upgrade Process
No Packages marked for Update
$

I've even verified the dependency chain manually, and sure enough, plesk-core can use php53u:

Code:
$ rpm -q plesk-core --requires | grep php
psa-php-configurator >= 1.6.2
$ rpm -q --whatprovides psa-php-configurator
psa-php53-configurator-1.6.2-cos5.build110120608.16
$ rpm -q psa-php53-configurator --requires | grep php
psa11-php-fakepackage  
php5-ioncube-loader >= 4.0.14
php53  
php53-gd  
php53-imap  
php53-mbstring  
php53-mysql  
php53-xml  
php53-cli  
php53-pdo  
php53-sqlite2  
$ rpm -q --whatprovides php53
php53u-5.3.21-1.ius.el5
$

So, how and why did Plesk become uninstalled in the first place; and how do I prevent it from happening again?
 
Clue number one: the Plesk auto-updater doesn't seem to think PHP is installed at all.

I'm guessing it's specifically looking for the php53 package, and not looking for packages that provide php53.

Any way that could be fixed? I can't be the only person using the IUS repository to keep PHP up to date.
 

Attachments

  • Screen Shot 2013-02-18 at 1.00.15 AM.png
    Screen Shot 2013-02-18 at 1.00.15 AM.png
    78.5 KB · Views: 4
Sorry, but I do not understand for what it is necessary to add additional repository, etc. if you can use native Plesk method for PHP 5.3 installation?

/usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component php53
 
Because on RHEL/CentOS 5.9, that installs an obscenely outdated version of PHP 5.3 from the official RHEL/CentOS repository.
 
I did figure out how to trick Plesk into believing the php53 package is installed, thanks to various blog posts: I created and installed an empty RPM, with PHP version 5.3.3000.

Here's my rpm.spec, for anyone else who needs to do this:

Code:
Summary: Dummy PHP 5.3 package for Plesk.
Name: php53
Version: 5.3.3000
Release: 1
License: Public
Group: Applications/System
Requires: php53u
%description
Empty PHP RPM
%files

Since the package is named php53, the Plesk updater sees it; and since the version number is 5.3.3000, yum will never try to replace it with a "newer" version of PHP 5.3 found in the CentOS repository.

Hopefully this wards off any more breakage until Plesk is updated to actually use the RPM database to see if PHP is installed, no matter the package name.
 
Back
Top