Services: DevOps Thought Leadership | JEE Consulting
Cannot load mysql extension please check your PHP configuration
I use CentOS as it is like RHEL without the branding and more akin to enterprise Linux implementations.
I have looked around the net and not found some simple answers in one place. So you’ve installed CentOS/PHPMyAdmin/PHP/MySQLmore than once you’ll know what is more than likely wrong, but you cannot remember how you did it.
The MySQL PHP module isn’t loaded. First of all, you must find your php.ini. It could be anywhere but if you create a small php file with the phpinfo(); command it will tell you where it is or you can use the following command line in CentOS.
find / -name php.ini
rpm -ql php-mysql | grep mysql.so
Typical result (64 bit Linux)
Other common places include /etc/, /etc/apache/, /etc/php4/apache2/php.ini, /etc/php5/apache2/php.ini or even /usr/local/lib/php.ini
Edit your server’s php.ini and look for the following line. Remove the ‘;’ from the start of the line and restart Apache. Things should work fine now!
if it is missing simply add it.
php.ini should have a line like:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib64/php/modules"
if your mysql.so is located in /usr/lib64/php/modules/mysql.so
Steve Robinson has been working in IT for over 20 years and has provided solutions for many leading brands around the world. Steve specialises in JEE, DevOps and Thought Leadership.
In January 2013, I was awarded the prestigous 'IBM Champion' accolade.
IBM WebSphere Application Server 8.0 Administration Guide
WebSphere Application Server 7.0 Administration Guide
Contact | Articles | Shell Scripts | Java Code | JACL | Jython | WebSphere MQ | WebSphere Message Broker | WebSphere Blog | © Copyright 2006-2013 Robinson (UK) Limited