• 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.

Question PHP 7.0 on Centos 8.0

  • Thread starter Deleted member 209767
  • Start date
D

Deleted member 209767

Guest
Hi,

I know that Plesk doesn't officially support PHP 7.0 with Centos 8 but i'm hosting an old website which is not compatible with PHP 7.1+ so I need to go back to 7.0

I found this:
It should add PHP 7.0 support to CentOs 8

But will that work with Plesk? After installing the rpm, how do I change the PHP version to 7.0 on a specific domain?
 
Hi ungov,

First of all, be careful because php7.0 and php7.1 are not supported even by PHP itself. "A release that is no longer supported. Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities." (c) PHP: Supported Versions

---

I suppose the page php_handler: PHP Handlers could help you to manage PHP handlers in Plesk.
 
We tried to install PHP version 7.0 in Plesk server, but we are getting the following error,

ERROR: The following component(s) were not found in the product 'Plesk': php7.0. Use the 'list' command to check the names of available components.
 
But will that work with Plesk? After installing the rpm, how do I change the PHP version to 7.0 on a specific domain?

If you were able to install the rpm mentioned above, you can try to configure it with Plesk by the "php_handler" command.


We tried to install PHP version 7.0 in Plesk server, but we are getting the following error,

ERROR: The following component(s) were not found in the product 'Plesk': php7.0. Use the 'list' command to check the names of available components.

It seems was a trying to install php7.0 from Plesk repository but as you mentioned correctly previously "Plesk doesn't officially support PHP 7.0 with Centos" and it means the package/rpm/component was not built by Plesk and does not exist in Plesk repository.
 
We were able to install PHP 7.0 on the server, but MySQL isn't working with this version of PHP. Should we downgrade MySQL or is it possible to run 2 versions
of MySQL simultaneously?

Thanks for the help, appreciate it
 
Could you please show how exactly it couldn't work with MySQL? Any errors? Now it sounds a little bit strange for me :oops:
 
I get Error 500 Internal Server Errror

The other websites hosted on this server don't have any issues. The MySQL issue is only with the domain that was downgraded to PHP 7.0

Here's what I found in the logs

2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/vhosts/mywebsite.net/public_html/mysql2i.class.php:43 Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: Stack trace: Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: #0 /var/www/vhosts/mywebsite.net/public_html/mysql2i.func.php(32): mysql2i::mysql_connect('localhost', '*********', '*********') Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: #1 /var/www/vhosts/mywebsite.net/public_html/db_addons.php(12): mysql_connect('localhost', '********', '****************') Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: #2 /var/www/vhosts/mywebsite.net/public_html/sitemap.php(4): include('/var/www/vhosts...') Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: #3 {main} Apache error
2020-08-11 05:51:31 Warning 162.252.217.88 mod_fcgid: stderr: thrown in /var/www/vhosts/mywebsite.net/public_html/mysql2i.class.php on line 43 Apache error
 
I managed to fix all of the issues by installing the additional extensions packages for PHP 7.0
It seems to be working correctly now. I don't understand why they say PHP 7.0 is incompatible with CentOs 8

Only issue remaining is that I can't get FPM to work. Currently Plesk is running PHP 7.0 FastCGI but the option for FPM Process is not available.

I did install php70-php-fpm.x86_64 but the option to enable FPM is not available in Plesk

1597221802187.png
 
Is there a solution to run PHP 7.0 with a FPM process instead of FastCGI?
 
Back
Top