Wrong PHP version detected

2 posts / 0 new
Last post
#1 Thu, 09/28/2017 - 18:20
fkville

Wrong PHP version detected

Hi, I am using Ubuntu 16.04 I used external ppa to provide PHP 5.6 (I don't want to use PHP 7 at moment for compatibility issues). I am restoring some backup of several virtual_server, I noticed this warning:

WARNING - The following scripts used PHP versions that are not available on this system :

domain.com - RoundCube - Version 5

In Virtualmin > Service I see "PHP 7.0 Configuration" and "PHP 7.1 Configuration" menu, but not 5.6 How can I solve this?

Thank you!

This is my PHP's packages installed list

dpkg -l |grep php

ii libapache2-mod-php7.0 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii libapache2-mod-php7.1 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii php 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (default) ii php-cgi 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (CGI binary) (default) ii php-cli 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all command-line interpreter for the PHP scripting language (default) ii php-common 1:55+ubuntu16.04.1+deb.sury.org+1 all Common files for PHP packages ii php-fpm 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (FPM-CGI binary) (default) ii php-mbstring 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all MBSTRING module for PHP [default] ii php-mysql 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all MySQL module for PHP [default] ii php-pear 1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all PEAR Base System ii php-xml 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default] ii php5.6-common 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP ii php5.6-gd 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 GD module for PHP ii php5.6-json 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 JSON module for PHP ii php5.6-mbstring 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP ii php5.6-mcrypt 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 libmcrypt module for PHP ii php5.6-mysql 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 MySQL module for PHP ii php5.6-readline 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 readline module for PHP ii php5.6-xml 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP ii php5.6-zip 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 Zip module for PHP ii php7.0 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage) ii php7.0-cgi 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (CGI binary) ii php7.0-cli 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language ii php7.0-common 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP ii php7.0-fpm 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php7.0-json 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 JSON module for PHP ii php7.0-mbstring 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP ii php7.0-mysql 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 MySQL module for PHP ii php7.0-opcache 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP ii php7.0-readline 7.0.24-1+ubuntu16.04.1+deb.sury.org+1 amd64 readline module for PHP ii php7.1 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage) ii php7.1-cgi 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (CGI binary) ii php7.1-cli 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language ii php7.1-common 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP ii php7.1-fpm 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php7.1-json 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 JSON module for PHP ii php7.1-mbstring 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP ii php7.1-mysql 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 MySQL module for PHP ii php7.1-opcache 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP ii php7.1-readline 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 readline module for PHP ii php7.1-xml 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP ii webmin-php-pear 1.5 all Webmin module for 'PHP Pear Modules'

Fri, 12/15/2017 - 08:49
isbagsdotru

more detail: https://github.com/virtualmin/virtualmin-gpl/blob/master/php-lib.pl 936 ----- 954

if ($nodotv ne $v) {
# For a version like 5.4, check for binaries like php54 and
# /opt/rh/php54/root/usr/bin/php
$phpn ||= &has_command("php$nodotv-cgi") ||
  &has_command("php-cgi$nodotv") ||
  &has_command("/opt/rh/php$nodotv/root/usr/bin/php-cgi") ||
  &has_command("/opt/rh/rh-php$nodotv/root/usr/bin/php-cgi") ||
  &has_command("/opt/atomic/atomic-php$nodotv/root/usr/bin/php-cgi") ||
  &has_command("/opt/atomic/atomic-php$nodotv/root/usr/bin/php") ||
  &has_command("/opt/rh/php$nodotv/bin/php-cgi") ||
  &has_command("/opt/remi/php$nodotv/root/usr/bin/php-cgi") ||
  &has_command("php$nodotv") ||
  &has_command("/opt/rh/php$nodotv/root/usr/bin/php");
  &has_command("/opt/rh/rh-php$nodotv/root/usr/bin/php");
  &has_command("/opt/rh/php$nodotv/bin/php") ||
  &has_command(glob("/opt/phpfarm/inst/bin/php-cgi-$v.*"));
}
$php_command_for_version_cache{$v} = $phpn;
}

just

ln -sv /usr/local/php56/bin/ /opt/rh/php56/bin

+++++++++++++++++++++++

/opt/rh/php56/bin' ->/usr/local/php56/bin/'

now PHP versions 5.6.32, 7.0.10

isbags.ru