phpMydmin script installer broken when php7.0 is installed

Webmin Version: 1782

When a person goes to "virtualmin" Then goes to install scripts and tries to install phpmyadmin the GPL version will state that the script is not installable that php5 needs to be installed...

On my system I have installed php7

The to be installed script phpMyAdmin (4.5.3.1) does support php as is clearly stated on their website..

phpMyAdmin 4.5.3.1

Released 2015-12-25, see release notes for details.

Current version compatible with PHP 5.5 to 7.0 and MySQL 5.5.
https://www.phpmyadmin.net/downloads/

Status: 
Closed (fixed)

Comments

Can you post the exact error message that you are getting when you try to install phpMyAdmin?

Also, is PHP 7 installed in addition to an older distribution-provided PHP version, or is it the only version?

its the only version installed no PHP5 version installed (removed by php7.0 installation)

http://i.imgur.com/sWg9X9X.png

[quote] This script can not be installed because the PHP version 5 is required. This script can not be installed, because this virtual server does not meet the requirements: Could not work out exactly PHP version [/quote]

If you go to Server Configuration -> Website Options, what PHP versions does it show are active for the domain?

Hi,
For me (php 7.0.2) who gets the same error:
PHP versions installed: No versions found!
Nicolas.

ima getting the following message

Dutch: "Website opties kunnen niet worden bewerkt, omdat er geen Apache virtuele host voor xtremeweb-hosting.net poort 80 is gevonden!"

English: "Website options can not be edited, because there is no Apache virtual host for xtremeweb-hosting.net port 80 found!"

Wich is quite true --> site is configured to be running nginx @ 80

Ok .. the use of Nginx may be the real cause here.

If you go to System Settings -> Features and Plugins, is the Nginx plugin enabled and the Apache feature disabled?

What is the location of the version 7 php or php-cgi command on your system?

It looks like the issue is that Virtualmin isn't finding it in any of the expected directories.

Hi,
From Checking Configuration > The following PHP versions are available : 7.0.2 (/bin/php-cgi)

Nicolas.

And if you run /bin/php-cgi -v , what does it output?

PHP 7.0.2 (cgi-fcgi) (built: Jan 6 2016 15:25:32)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies

Ok, I think I see the bug now. We will fix this in the next Virtualmin release, but the work-around is to run :

ln -s /bin/php-cgi /bin/php70-cgi

No improvement :-(
php-fpm is installed on the server, is that this may be causing the problem?

Yes, that may also cause problems - have you manually configured Nginx to use it?

yes, do you want some files?

Yes, I'd be interested to see your Nginx config file (or at least the server block for this domain).

/etc/nginx/nginx.conf

user  nobody;
# no need for more workers in the proxy mode
worker_processes  2;
error_log  /var/log/nginx/error.log info;
worker_rlimit_nofile 20480;
events {
worker_connections 5120; # increase for busier servers
use epoll; # you should use epoll here for Linux kernels 2.6.x
}
http {
server_name_in_redirect off;
server_names_hash_max_size 10240;
server_names_hash_bucket_size 1024;
include    mime.types;
default_type  application/octet-stream;
server_tokens off;
# remove/commentout disable_symlinks if_not_owner;if you get Permission denied error
# disable_symlinks if_not_owner;
# sendfile on;
sendfile off;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout  5;
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied any;
gzip_http_version 1.1;
gzip_min_length  1000;
gzip_comp_level  6;
gzip_buffers  16 8k;
# You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU
gzip_types    text/plain text/xml text/css application/x-javascript application/xml image/png image/x-icon image/gif image/jpeg application/javascript application/xml+rss text/javascript application/atom+xml;
ignore_invalid_headers on;
client_header_timeout  3m;
client_body_timeout 3m;
send_timeout     3m;
reset_timedout_connection on;
connection_pool_size  256;
client_header_buffer_size 256k;
large_client_header_buffers 4 256k;
client_max_body_size 100M;
client_body_buffer_size 128k;
request_pool_size  32k;
output_buffers   4 32k;
postpone_output  1460;
proxy_temp_path  /tmp/nginx_proxy/;
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:5m max_size=1000m;
# client_body_in_file_only on;
client_body_in_file_only off;
log_format bytes_log "$msec $bytes_sent .";
log_format custom_microcache '$remote_addr - $remote_user [$time_local] '
        '"$request" $status $body_bytes_sent '
        '"$http_referer" "$http_user_agent" nocache:$no_cache';
include "/etc/nginx/vhosts/*";
}

/etc/nginx/vhosts/test.com

server {
          error_log /var/log/nginx/vhost-error_log warn;
          listen 51.254.220.147:80;
  server_name test.com www.test.com;
          #access_log /usr/local/apache/domlogs/test.com-bytes_log bytes_log;
          access_log /var/log/nginx/test.com_access_log combined;
          root /home/test/public_html;
          #location / {
          location ~*.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
          expires 1M;
          try_files $uri @backend;
          }
          location / {
  error_page 405 = @backend;
          add_header X-Cache "HIT from Backend";
          proxy_pass http://51.254.220.147:8080;
          include proxy.inc;
  include microcache.inc;
          }
          location @backend {
          internal;
          proxy_pass http://51.254.220.147:8080;
          include proxy.inc;
  include microcache.inc;
          }
          location ~ .*\.(php|jsp|cgi|pl|py)?$ {
          proxy_pass http://51.254.220.147:8080;
          include proxy.inc;
  include microcache.inc;
          }
          location ~ /\.ht {
          deny all;
          }
        }

Ok, I see the problem now - Virtualmin has a bug that triggers in the case where a system ONLY has php 7 installed. We will fix this in the next release.

Status: Active » Fixed

Sorry but not fixed in the new release 5.01 :-(

This script cannot be installed, as it requires PHP version 5. This script cannot be installed, as this virtual server does not meet its requirements : Could not work out exact PHP version

Hi same issue for me, in that I upgraded to php7 then tried to install roundcube on an existing Virtual Server with the installer script. Somehow because the Virtual Server already existed from when the server ran php5 the script installer issues this command:

Installing package php5-mysql ..
Installing package(s) with command apt-get -y -f install php5-mysql ..

Reading package lists...
Building dependency tree...
Reading state information...
Package php5-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-mysql' has no installation candidate

Yet on new Virtual Servers that have been added after the server upgrade and start off on Php7 use the correct version and install Roundcube no probelm with the same script installer.

I don't use NGINX.

Could this be the issue also effecting others here... Or maybe my issue is a little different?

Hi just an update. I fixed this problem by going to 'Services > Configure Website' then 'Edit Directives' and changing:

FCGIWrapper /home/domainname/fcgi-bin/php5 .php
FCGIWrapper /home/domainname/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/domainname/fcgi-bin/php7.0.fcgi .php7.0

to:

FCGIWrapper /home/domainname/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/domainname/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/domainname/fcgi-bin/php7.0.fcgi .php7.0

and then ran the script installer for that Virtual Server again and Roundcube then installed no problem. Hope this helps someone else who has upgraded php in future.

:)

For anyone who's seeing this problem with PHP 7 - are you using the PHP version that came with your Linux distribution, and if so which distro and version was it?

Hi Jamie, yes just using the stock Ubuntu 16.04 php7 that came with the distro upgrade if that helps at all.

Thanks again.

I just did a test on a fully updated Ubuntu 16 system with Virtualmin 5.04 and PHP 7, and was able to install phpMyAdmin just fine - Virtualmin didn't complain at all about a missing PHP version.

Hi Jamie,

The issue occurred for me on Virtual Servers that were already installed on 14.04 before the upgrade. Then after the upgrade, trying to install roundcube on that server gave me that error. Maybe it was just my setup?

That may be the cause, if the 14.04 system had only PHP 5, and the 16 system had only PHP 7?

Hi yes that was exactly how it went down. Thanks :)

Ah ... that would explain it. Unfortunately when an OS upgrade happens that changes the PHP version, Virtualmin doesn't have a chance to update the Apache config to use the new paths. I'll look into a way to better detect that an upgrade like this has happened..

Hi,

When trying to install the Roundcube script I get the following error:

found https://github.com:443/roundcube/roundcubemail/releases/download/1.3.0/r... in cache ..

PHP module mysql is required .. Installing package php5-mysql .. Installing package(s) with command apt-get -y -f install php5-mysql .. Reading package lists... Building dependency tree... Reading state information... Package php5-mysql is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'php5-mysql' has no installation candidate .. install failed! Module is not available even after installation!

I'm on Ubuntu 16.04 with the following settings:

On Server configurations > PHP Versions I have the first of two identical 7.0.21 versions checked. There are no other versions available.

On Server configuration > Website options > PHP Information I have the following> PHP versions installed 7.0.21, 7.0.21

However I see two identical sets of these modules, one for PHP 5 and the other for PHP 7.0:

calendar cgi-fcgi Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl zip zlib

I purged everything php5 so I don't understand why these are still here.

I have a couple of sites working well on the server yet I can't install a new version of Roundcube...

Any thoughts on how to solve this?

Many thanks