Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
That did it thanks. –  opike Feb 12 '13 at 5:46

So the issue is probably here.

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

You are using a 64bit version of the mysqli php package but your libmysqlclient.so.16 you are finding in /usr/lib might be the 32bit version

Run the following

file /usr/lib/libmysqlclient.so.16

Now that is probably a symlink so just keep following it till you get to the file and make sure it is the 64 bit version.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.