Error message with phpmyadmin when starting up apache

opike asked:

I’m trying to get phpmyadmin working with mysql(mariadb fork).

I get this error message in the browser when I try to access phpmyadmin:

> phpMyAdmin - Error The mysqli extension is missing. Please check your
> PHP configuration. <a href="Documentation.html#faqmysql"
> target="documentation"><img src="themes/dot.gif" title="Documentation"
> alt="Documentation" class="icon ic_b_help" /></a>

So I added the following line to /etc/php.ini:

extension=/usr/lib64/php/modules/mysqli.so

Now when I start up apache, I get the following error in php_errors.log:

[12-Feb-2013 00:09:44] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

Here is the output of an ldd command on mysqli.so:

[ollie@localhost modules]$ ldd mysqli.so
        linux-vdso.so.1 =>  (0x00007fffd29ff000)
        libmysqlclient.so.16 => not found       
        libz.so.1 => /lib64/libz.so.1 (0x00007ffd84b10000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ffd848d9000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007ffd846c0000)    
        libm.so.6 => /lib64/libm.so.6 (0x00007ffd8443b000)        
        libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007ffd841e0000)
        libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007ffd83e46000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffd83ab2000)                
        libfreebl3.so => /lib64/libfreebl3.so (0x00007ffd83850000)        
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ffd8360e000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ffd8332e000)              
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ffd8312a000)        
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ffd82efe000)      
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ffd82cf9000)                  
        /lib64/ld-linux-x86-64.so.2 (0x00007ffd84f5f000)                      
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ffd82aee000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ffd828eb000)      
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ffd826d0000)          
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffd824b3000)        
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ffd82293000) 

I confirmed that libmysqlclient.so.16 is under /usr/lib. I tried adding /usr/lib to my LD_LIBRARY_PATH environment variable but that had no effect.

Here are some more details on my environment:

CentOS: 6.3

PHP: 5.3.3

DB version:

mysql Ver 15.1 Distrib 5.5.29-MariaDB, for Linux (x86_64) using readline 5.1

My answer:


You also need to install the MariaDB-compat RPM to provide compatibility with system packages that were built against a lower version of MySQL. The current filename is MariaDB-5.5.29-centos6-x86_64-compat.rpm which you can find at any mirror site.

If this fails to resolve the issue, report a bug to MariaDB.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.