Submitted by gnilebein on Mon, 06/26/2017 - 03:08
I use phpmyadmin via script installer. But i can not update the script. Virtualmin tries to install php5-mysql. But i use Ubuntu 16.04 with PHP7 and NGinx.
Upgrading phpMyAdmin to version 4.7.1 ..
PHP module mysql is required ..
Enabling module in PHP configuration ..
.. done
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!
Status:
Active
Comments
Submitted by JamieCameron on Mon, 06/26/2017 - 20:47 Comment #1
Is there a
php-mysql
package available for installation on your system?Submitted by gnilebein on Fri, 06/30/2017 - 16:20 Comment #2
Yes it is. And it is already installed.
Submitted by JamieCameron on Sat, 07/01/2017 - 01:16 Comment #3
It looks like Virtualmin isn't detecting it as installed. Which PHP execution mode do you have selected for this domain?
Submitted by gnilebein on Mon, 07/03/2017 - 15:18 Comment #4
Oh, this is strange... I am using nginx. I configured the server to run php as php-fpm. But now when i check the mode under "server configutation" --> "Website options" there is only an option to run php as FCGId (See this screenshot: http://imgur.com/a/VWfmO)
Submitted by gnilebein on Fri, 07/07/2017 - 10:18 Comment #5
Any idea?
Submitted by JamieCameron on Sat, 07/08/2017 - 12:14 Comment #6
What output do you get if you run :
PHPRC=/home/yourdomain/etc php -m
is
mysql
included in the list?Submitted by gnilebein on Sat, 07/08/2017 - 13:00 Comment #7
This is the output:
root@server01:~# PHPRC=/home/gnilebein.de/etc php -m | grep mysql
mysqli
mysqlnd
pdo_mysql
But i am wondering. Why i can not select php-fpm as PHP script execution mode? I have two servers. And it is the same issue on both (Ubuntu 16.04, PHP7, Nginx)
Submitted by JamieCameron on Sat, 07/08/2017 - 22:52 Comment #8
Ok, it looks like the problem is that
mysqli
is listed but notmysql
.If you edit
/home/gnilebein.de/etc/php.ini
, is there anextension=mysql.so
(or similar) line?Submitted by gnilebein on Sun, 07/09/2017 - 05:45 Comment #9
I made some other test. I created an info.php file an check the path for the php.ini. It seems that the server does not use the php.ini from /home/gnilebein.de/etc/php.ini. The server use the php.ini from /etc/php/7.0/fpm/php.ini:
Then i checked the moduls for this php.ini:
root@server01:~# PHPRC=/etc/php/7.0/fpm php -m | grep mysql
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mysql.so' - /usr/lib/php/20151012/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
mysqli
mysqlnd
pdo_mysql
Is the reason because I use php-fpm?
Submitted by JamieCameron on Sun, 07/09/2017 - 11:17 Comment #10
Ok, there's your problem. What's the actual location of
mysql.so
on your system?Submitted by gnilebein on Sun, 07/09/2017 - 12:28 Comment #11
PHP7.0 is shipped with Ubuntu 16.04 LTS. PHP7 does not offer old mysql support. So there is no mysql.so.
Submitted by JamieCameron on Mon, 07/10/2017 - 01:23 Comment #12
Is there any reference to
/usr/lib/php/20151012
in thephp.ini
file though? The issue may be that PHP modules are being loaded from the wrong directory.Submitted by gnilebein on Wed, 07/12/2017 - 15:53 Comment #13
No there is no reference. I did one more test. I switched the php exec mode from fpm to fcgi and it works without any problem. The issue only occurs in fpm mode.
Do you have any idea why?