Trouble installing PHPMyAdmin Script since server upgrade - "No package php5-mysql available."

Same problem with 3.5.2.2 or 2.11.11.3

Operating system CentOS Linux 6.3 (64 bit) PHP 5.3 Virtualmin version 3.94.gpl GPL Webmin version 1.600 Kernel: Linux 2.6.32-279.9.1.el6.x86_64 on x86_64

All Virtualmin packages are up to date.

Failing on yum -y install php5-mysql - No package php5-mysql available.

--------------------- Install Logs Follow ----------------------------

Found http://prdownloads.sourceforge.net:80/sourceforge/phpmyadmin/phpMyAdmin-... in cache ..

PHP module mysql is required ..

Installing package php5-mysql ..
Installing package(s) with command yum -y install php5-mysql ..

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.iweb.ca
 * extras: centos.mirror.iweb.ca
 * updates: centos.mirror.iweb.ca
Setting up Install Process
No package php5-mysql available.
Error: Nothing to do

.. install failed!

Module is not available even after installation!

<- Return to list of scripts

Status: 
Active

Comments

Does it also try to install the package php-mysql ? That should be available on CentOS 6 ..

php-mysql is already installed

[root@genesis ~]# yum install php-mysql Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: centos.mirror.iweb.ca * extras: centos.mirror.iweb.ca * updates: centos.mirror.iweb.ca Setting up Install Process Package php-mysql-5.3.3-14.el6_3.x86_64 already installed and latest version Nothing to do

Ok, so it should be already installed then.

Does the file /etc/php.d/mysql.ini exist on your system, and if so what does it contain?

It does exist and contains:

; Enable mysql extension module extension=mysql.so

The file exists as well

... /usr/lib64/php/modules/mysql.so /usr/lib64/php/modules/mysqli.so ...

What output do you get if you run :

php -m | grep mysql

as root at the command line?

Also, what PHP execution mode is set for this domain? You can see this at Server Configuration -> Website Options.

[nteresting - this may shed some light on the issue...

root@genesis caa]# php -m | grep mysql
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/mcrypt.so' - /usr/lib64/php/modules/mcrypt.so: cannot open shared object file:                                                                                         No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_curl.dll' - /usr/lib64/php/modules/php_curl.dll: cannot open shared object                                                                                         file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_gd2.dll' - /usr/lib64/php/modules/php_gd2.dll: cannot open shared object f                                                                                        ile: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_gettext.dll' - /usr/lib64/php/modules/php_gettext.dll: cannot open shared                                                                                         object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_gmp.dll' - /usr/lib64/php/modules/php_gmp.dll: cannot open shared object f                                                                                        ile: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_imap.dll' - /usr/lib64/php/modules/php_imap.dll: cannot open shared object                                                                                         file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_mbstring.dll' - /usr/lib64/php/modules/php_mbstring.dll: cannot open share                                                                                        d object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_mysql.dll' - /usr/lib64/php/modules/php_mysql.dll: cannot open shared obje                                                                                        ct file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_mysqli.dll' - /usr/lib64/php/modules/php_mysqli.dll: cannot open shared ob                                                                                        ject file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_openssl.dll' - /usr/lib64/php/modules/php_openssl.dll: cannot open shared                                                                                         object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_pdo_mysql.dll' - /usr/lib64/php/modules/php_pdo_mysql.dll: cannot open sha                                                                                        red object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_pdo_odbc.dll' - /usr/lib64/php/modules/php_pdo_odbc.dll: cannot open share                                                                                        d object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_pdo_sqlite.dll' - /usr/lib64/php/modules/php_pdo_sqlite.dll: cannot open s                                                                                        hared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_pgsql.dll' - /usr/lib64/php/modules/php_pgsql.dll: cannot open shared obje                                                                                        ct file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_soap.dll' - /usr/lib64/php/modules/php_soap.dll: cannot open shared object                                                                                         file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_sockets.dll' - /usr/lib64/php/modules/php_sockets.dll: cannot open shared                                                                                         object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_sqlite3.dll' - /usr/lib64/php/modules/php_sqlite3.dll: cannot open shared                                                                                         object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_tidy.dll' - /usr/lib64/php/modules/php_tidy.dll: cannot open shared object                                                                                         file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_xmlrpc.dll' - /usr/lib64/php/modules/php_xmlrpc.dll: cannot open shared ob                                                                                        ject file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/module                                                                                        s/php_exif.dll' - /usr/lib64/php/modules/php_exif.dll: cannot open shared object                                                                                         file: No such file or directory in Unknown on line 0
PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater                                                                                         in Unknown on line 0
PHP Warning:  Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and grea                                                                                        ter in Unknown on line 0
mysql
mysqli
pdo_mysql
[root@genesis caa]#
[root@genesis caa]# dir  /usr/lib64/php/modules/
curl.so  fileinfo.so  imap.so  mbstring.so  mysql.so  pdo_mysql.so  pdo_pgsql.so  pdo_sqlite.so  phar.so  sqlite3.so  xmlreader.so  xmlwriter.so  zip.so
dom.so   gd.so        json.so  mysqli.so    odbc.so   pdo_odbc.so   pdo.so        pgsql.so       snmp.so  wddx.so     xmlrpc.so     xsl.so

PHP execution mode for this domain: Server Configuration -> Website Options

FCGId (run as virtual server owner)

That "Unable to load dynamic library" error looks like a big problem.

What output do you get if you run ldd /usr/lib64/php/modules/mysql.so

[root@genesis caa]# ldd /usr/lib64/php/modules/mysql.so
linux-vdso.so.1 => (0x00007fff143ff000)
libmysqlclient.so.16 => /usr/lib64/mysql/libmysqlclient.so.16 (0x00007fb905731000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb90539e000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fb905166000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fb904f4d000)
libm.so.6 => /lib64/libm.so.6 (0x00007fb904cc9000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007fb904a6d000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007fb9046d3000)
libz.so.1 => /lib64/libz.so.1 (0x00007fb9044bd000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d2ee00000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007fb90425a000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fb904018000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fb903d39000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fb903b34000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fb903908000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fb903704000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fb9034f8000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fb9032f5000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb9030db000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb902ebd000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fb902c9e000)
[root@genesis caa]#

Any ideas?

Could you also try this :

  1. SSH in as root, and then switch to the domain owner user with a command like su -s /bin/sh username
  2. Run PHP to list modules with the command PHPRC=/home/username/etc ; php -m

And let us know what that last command outputs..

Last login: Thu Oct 11 20:27:04 2012 from 70.114.254.220
-sh-4.1$ sudo bash
[sudo] password for xxx:
[root@genesis xxx]# su -s /bin/sh chtechc

sh-4.1$ PHPRC=/home/chtechc/etc ; php -m
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_curl.dll' - /usr/lib64/php/modules/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_gd2.dll' - /usr/lib64/php/modules/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_gettext.dll' - /usr/lib64/php/modules/php_gettext.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_gmp.dll' - /usr/lib64/php/modules/php_gmp.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_imap.dll' - /usr/lib64/php/modules/php_imap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mbstring.dll' - /usr/lib64/php/modules/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mysql.dll' - /usr/lib64/php/modules/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mysqli.dll' - /usr/lib64/php/modules/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_openssl.dll' - /usr/lib64/php/modules/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_mysql.dll' - /usr/lib64/php/modules/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_odbc.dll' - /usr/lib64/php/modules/php_pdo_odbc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_sqlite.dll' - /usr/lib64/php/modules/php_pdo_sqlite.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_pgsql.dll' - /usr/lib64/php/modules/php_pgsql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_soap.dll' - /usr/lib64/php/modules/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_sockets.dll' - /usr/lib64/php/modules/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_sqlite3.dll' - /usr/lib64/php/modules/php_sqlite3.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_tidy.dll' - /usr/lib64/php/modules/php_tidy.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_xmlrpc.dll' - /usr/lib64/php/modules/php_xmlrpc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_exif.dll' - /usr/lib64/php/modules/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'apc' already loaded in Unknown on line 0
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[PHP Modules]
apc
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
libxml
mbstring
mcrypt
memcache
mysql
mysqli
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

That looks OK ..

What if you run php5 -m instead of php -m ?

[

root@genesis layout]# su -s /bin/sh chtechc
sh-4.1$ PHPRC=/home/chtechc/etc ; php5 -m
sh: php5: command not found
sh-4.1$ exit
exit
[root@genesis layout]# sh-4.1$ PHPRC=/home/chtechc/etc ; php5 -m
bash: sh-4.1$: command not found
bash: php5: command not found
[root@genesis layout]# sh: php5: command not found
bash: sh:: command not found
[root@genesis layout]# ^C
[root@genesis layout]# which php5
/usr/bin/which: no php5 in (/sbin:/bin:/usr/sbin:/usr/bin)
[root@genesis layout]#

Is there any chance we could login to your system to see what is going wrong here?

Contact me directly at jcameron@virtualmin.com if that is possible.

Credentials send to jcameron@virtualmin.com

Please free to login and have a look. Note its SSH on port 9444.

You may even feel free to change anytrhing required to "fix" it.

Thanks for your help!

I found the issue - in the etc/php.ini file for the problem domain, the extension_dir was set to /usr/lib/php/modules, but the correct path on your system is /usr/lib64/php/modules . I have corrected that, and it seems to install OK now.

I suspect this incorrect php.ini file was created as part of the migration from cPanel for this domain?