• 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

Question How to add and enable mod_php7.0?

Hotte

New Pleskian
As I only host one website on that dedicated machine (plenty of RAM) I look to use the apache in prefork mode with mod_php7.0 and as less modules as possible.

I allready did install php7.0.22 with all the modules (common,...mysql,zip,xml.... and libap2-mod-php7.0)
cli is running that 7.0.22:
"root@cgn /etc/psa # php -v
PHP 7.0.22-1~dotdeb+8.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.22-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies"

Plesk shows php7.0 in Apache-Settings
apache_php7.png


I did try to change php_handler "module" to run php7.0 but can't chnage by using php_handler update or add

also changing settings in php_versions.json did not help me.

Any suggestions ?
 
Last edited:
I can not add it like this... or replace module 5.6.x with --update

~like this:
plesk bin php_handler \
--update \
-displayname "mod_php7.0.22" \
-path /usr/bin/php-cgi7.0 \
-cli-path /usr/bin/php7.0 \
-phpini /etc/php/7.0/apache2/php.ini \
-type module \
-id "module7.0

OUTPUT (add): Wrong syntax for command's '-type' parameter. 'module' does not match the pattern '/^(cgi|fastcgi|fpm)$/'.

or do i have to wait for debian9 that php7 will become by os vendor ? :)

Should I edit /etc/psa/php_versions.d/php-module.conf ?? SAFE ?
 
Last edited:
Back
Top