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.

My php.ini says:

Additional .ini files parsed

    /etc/php53/php.d/curl.ini,   
 /etc/php53/php.d/fileinfo.ini, /etc/php53/php.d/json.ini, /etc/php53/php.d/mysqli.ini,
 /etc/php53/php.d/mysql.ini, /etc/php53/php.d/pdo_mysql.ini, /etc/php53/php.d/phar.ini, 
/etc/php53/php.d/zip.ini

mysqli.ini is loaded.. But still i get this,

PHP Fatal error: Class 'mysqli' not found

  • i tried enabling dynamic loading and initialize php scripts with dl("mysqli.so");
  • i also tried recompiling the php source:

    ./configure --with-mysql=/usr/lib64/mysql --with-
    mysqli=/usr/lib64/mysql/mysql_config
    

even this didn't work. Can anybody help me solve my problem?

  1. Red Hat Enterprise Linux Server release 5 (Tikanga).
  2. x86_64 GNU/Linux.
  3. No access to RHN.

Thanks.

share|improve this question
1  
If you don't have an active Red Hat subscription, either purchase one, or convert the system to CentOS. –  Michael Hampton Oct 20 '12 at 4:02
    
how did you install php? –  GioMac Aug 30 '13 at 21:46

2 Answers 2

If you're using php5.5.x then:

$ sudo yum install php55-mysqlnd

or:

$ yum install php[your version]-mysqli or mysql 

If you're greater than 5.3:

$ yum install php[your version]-mysqlnd
share|improve this answer

So... php -i and phpinfo() does not shown this module?

Check /etc/php53/php.d/mysqli.ini for extension="mysqli.so" Find your extension dir like "php -i|grep extension_dir" Check extension path for this module (for example: ls -lha /usr/lib64/php/modules/mysqli.so) If moudule exist, check all needed libs for this mod (ldd /usr/lib64/php/modules/mysqli.so) If module does not exist, install it. (i assume, you are custom compiling php, so u can find this extension in ext/mysqli of php source. Just make && make install it, or u see some errors during install) Also, you may find some usefull information about missing or incompatible modules in stdout from php -i.

share|improve this answer
    
yes phpinfo() does not show this module!!! php -i|grep extension_dir shows extension_dir => /usr/lib64/php53/modules => /usr/lib64/php53/modules ls -lha /usr/lib64/php53/modules/mysqli.so shows -rwxr-xr-x 1 root root 130K Aug 23 06:58 /usr/lib64/php53/modules/mysqli.so ldd /usr/lib64/php53/modules/mysqli.so shows libs phpinfo –  nuthan Feb 4 '12 at 6:58
    
@nuthan I am running into the same issue. were you able to resolve this issue? –  Salton Feb 8 at 0:01
    
@Salton Its been a quiet long time. The issue was resolved, but I dont remember exactly how it did. Sorry for that. Anyway, what issues r u facing now? –  nuthan Feb 10 at 9:15

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.