• 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

Resolved Plesk fails to update - PHP conflicts?

retro1

New Pleskian
I'm helping a friend prepare his new web server to go live with a Xenforo site. You'll have to forgive my ignorance - I'm not used to Plesk (although it's been fairly straightforward thus far)!

Here are the server specs:
  • Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz (8 core(s))
  • 8Gb RAM
  • 250Gb SSD
  • Plesk Onyx v17.0.17_build1700161028.14 os_CentOS 7
  • CentOS Linux 7.3.1611 (Core)
My friend started to set up the server himself, but he has personal issues to resolve, so asked me to check everything. Here is what he said:
I've updated OS, removed the centos 7 php5 (they don't have 7 as standard yet).
Installed php 7 and opcache for the server. Plesk uses its own internal PHP setup, so it will provide a menu of which one to use (server or plesk). Server is of course faster.

Updated again, then went to plesk and removed all the wordpress and other unnecessary programs like
ruby on rails and CGI support, python, webmail.

Added via plesk fail2ban, kaspersky and spamassasin, php 7.1 support, cloudflare support.

For some reason after every update, plesk will hang the installer. I had to kill the task via CLI for two upgrades, twice; after they were installed, plesk panel works fine but will time out the upgrades page even though it is done upgrading. I have to ask why on the support forum.

I can't say I've encountered the update hang myself. I did some updates (minor stuff), checked security etc. I added Java and Elasticsearch for the better search plugin. All was well.

Now we're getting a salmon bar at the top of the panel:
Failed to update Plesk. To solve this problem, you can send the update log to Plesk support. View the update logs (Feb 17, 2017). View the update logs (Feb 18, 2017). View the update logs (Feb 19, 2017). Copy the logs to your computer before you close this message. To close this message, click here.

The logs had dependency issues.
Loading mirror speeds from cached hostfile
* base: mirror.sjc02.svwh.net
* epel: mirror.n5tech.com
* extras: mirror.supremebytes.com
* updates: repos.lax.quadranet.com
* webtatic: us-east.repo.webtatic.com
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
No package matched to remove: php-common
Attempt to remove 'php-common' to resolve conflict has failed
Attempt to remove 'php70w-common' to resolve conflict has succeeded
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
Attempt to remove 'php70w-common' to resolve conflict has succeeded
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
No package matched to remove: php-common
Attempt to remove 'php-common' to resolve conflict has failed
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
No package matched to remove: php-common
Attempt to remove 'php-common' to resolve conflict has failed
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
No package matched to remove: php-common
Attempt to remove 'php-common' to resolve conflict has failed
No package matched to remove: php71w-common
Attempt to remove 'php71w-common' to resolve conflict has failed
No package matched to remove: php-common
Attempt to remove 'php-common' to resolve conflict has failed
Exception: Failed to solve dependencies:
php71w-common conflicts with php-common-5.4.16-42.el7.x86_64
I disabled the webtatic repo, removed the offending dependencies and ran the plesk installer:
Code:
plesk installer --select-release-current --reinstall-patch --upgrade-installed-components
And enabled webtatic.

All good! Or so I thought. I tried to restart apache and got:
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

systemctl status httpd.service had the following issue:
AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf:
Invalid command 'php_value'

The line is:
php_value session.save_handler "files"

I found this page relating to the matter. I tried adding the LoadServer line (ls /usr/lib64/httpd/modules | grep lib showed that only libphp5.so was present), but this gave me:
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
So I assume it's now running the wrong flavour or PHP. Not being familar with Plesk, I don't know what to do about that.

In Plesk panel, I noticed the following:

xpa8te.jpg


...and if I go to add components, the list of PHP versions is completely missing!

rpm -q httpd php gives:
httpd-2.4.6-45.el7.centos.x86_64
php-5.4.16-42.el7.x86_64

whilst php -v gives:
PHP 7.1.2 (cli) (built: Feb 17 2017 13:42:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.2, Copyright (c) 1999-2017, by Zend Technologies

I'm rather stumped here! There was obviously something wrong in the first place... I "solved" the issue of Plesk not updating, but it seems to have updated something poorly and borked mod_php (and apache).

This is getting to the limit of my knowledge, and searches aren't coming up with the answers. Can anyone suggest how I may be able to resolve this? Should I leave the LoadModule I added in httpd.conf or remove it? Should those two commands be giving two different versions of PHP?

Thanks in advance!
 
Have you tried to remove and install the PHP versions using the Tools & Settings -> Updates and Upgrades menu? Screen: https://puu.sh/ubVya/17cb454923.png
I personally only use the PHP 5 from Vendor and PHP 7.0 versions - 7.1 is for testing installed. Screen: https://puu.sh/ubVHy/082c380bd1.png

Try this way, maybe the Plesk installer will remove all unnecessary settings and install the versions right.
Oops... edited... was being thick!

OK, so I found the list there, tried installing PHP7.0 and it said it was successful. Click OK and the spinny thing just goes round and round. Is this normal?

[EDIT 2]

This site can’t be reached
yoursite.com took too long to respond

As that had popped up in a new window, I went back to the original and went back to the tools and settings page. Clicked updates and upgrades... it gives that message again. Tried using the IP address instead of the domain... same.

[EDIT 3]

Followed this guide to kill the hanging autoupdate. Could get back - it wanted me to log in. Clearly there is an issue with updating, as my friend said.

[EDIT 4]

So, now it's working again, I removed PHP 7.1. Operation completed successfully, click OK and... yup, it's hung again.

ps auxxf | grep instal
sudouser 15784 0.0 0.0 112648 960 pts/0 S+ 14:35 0:00 \_ grep --color=auto instal
root 13907 0.0 0.5 222972 41676 ? S 14:24 0:00 /usr/local/psa/admin/bin/autoinstaller --service-mode --enable-xml-output --ssl-cert /usr/local/psa/admin/conf/httpsd.pem --branch release,stable --web-interface --with-ssl --disable-browser
root 13908 0.0 0.2 129116 16192 ? S 14:24 0:00 \_ /usr/local/psa/admin/bin/autoinstaller --service-mode --enable-xml-output --ssl-cert /usr/local/psa/admin/conf/httpsd.pem --branch release,stable --web-interface --with-ssl --disable-browser
(sudouser logged in via SSH, root on panel)
 
Last edited:
It should be under Hosting/PHP interpreter versions.

The Updates and Upgrades site is sometimes not answering for me either, I simply close it, wait 10-20 minutes and open it again.
You should be able to log in with the root user even if the root login is disabled on ssh.

In your case, I would uninstall all versions, (when possible) make a restart, and would install the 5 and 7 again.

If you have not installed packages/plesk updates you could try to install them before.
 
It should be under Hosting/PHP interpreter versions.
In your case, I would uninstall all versions, (when possible) make a restart, and would install the 5 and 7 again.

If you have not installed packages/plesk updates you could try to install them before.
I've uninstalled 7.0 and 7.1. I can't uninstall OS vendor 5 because lots of stuff needs it, including Plesk and Let's Encrypt, which is giving me an SSL certificate for panel. Well, I guess I could.. but I don't want to break things even more!!!

The following components depend on the components you are going to remove or conflict with components you are going to install:

All language localization for Plesk, MagicSpam Embedded Protection, AWStats, Cloudflare ServerShield, Security Advisor, Skins and Color Schemes, Let's Encrypt, Kaspersky Anti-Virus, Plesk Web Server Configuration Troubleshooter, Watchdog system monitoring, Webalizer, Plesk Firewall, Server Health Monitor

These components have been selected for removal below. To confirm removal of all additional components, click Continue. To cancel removal or installation of certain components, select the corresponding option from the actions list.

The following components depend on the components you are going to remove or conflict with components you are going to install, but cannot be implcitly removed:

Plesk

Either confirm that you allow removal of these components by selecting the corresponding option from the actions list or make sure other components that these depend on aren't removed or conflicting ones aren't installed, then click Continue. To abandon components removal click Cancel modifying.

OK... so commenting out lines 31 and 32 in php.conf allowed apache to restart. I still have this issue, though:

$ php -v
-bash: /opt/plesk/php/7.1/bin/php: No such file or directory
Remembering I've uninstalled 7.0 and 7.1, that's not good!

(in /opt/plesk/php there are still 7.0 and 7.1 directories, as well as 5.6. Interesting, as rpm -q php says it's running 5.4)

[EDIT]
Think I have it sorted, now! Once I managed to get apache restarted, a server restart did the trick.

To update to 5.6, should I run update or install 5.6 from the menu and switch?
 
Last edited:
Right, you need the Vendor version to allow plesk to function, too. It was a bad idea, I haven't considered this, sorry.

I think the Vendor version should be 5.6 by now. What does it say under your subscription's php settings?
 
We ended up having the server reinstalled. This fixed the hanging issue and Plesk is no longer failing to update.
 
Back
Top