What I found with this one is that it appears to use a symlink. It might not on your server setup.
I am using MariaDB10, and it appears that when cPanel updated this time (it doesnt always happen, and I have seen this on our other server using Plesk), it breaks the symlink.
It was showing
mysqli.so -> /opt/alt/php55/etc/mysql10./mysqli.so
When it should have been:
mysqli.so -> /opt/alt/php55/etc/mariadb10/mysqli.so
So the below fixes it (but maybe only until next update :P )
cd /opt/alt/php55/usr/lib64/php/modules
unlink mysql.so
ln -s /opt/alt/php55/etc/mariadb10/mysql.so /opt/alt/php55/usr/lib64/php/modules/mysql.so
unlink mysqli.so
ln -s /opt/alt/php55/etc/mariadb10/mysqli.so /opt/alt/php55/usr/lib64/php/modules/mysqli.so
unlink pdo_mysql.so
ln -s /opt/alt/php55/etc/mariadb10/pdo_mysql.so /opt/alt/php55/usr/lib64/php/modules/pdo_mysql.so
Just make sure that the symlinks are actually broken, and your directory structure may be different.
You would also need to check the other directories
/opt/alt/php53/usr/lib64/php/modules
/opt/alt/php54/usr/lib64/php/modules
/opt/alt/php56/usr/lib64/php/modules
Hope this helps someone
Announcement
Collapse
No announcement yet.
php selector missing mysql, mysqli extension
Collapse
X
-
Hi,
I have the same problem.
No matther what php version I select in cpanel php selector, the mysql is not loaded into the sistem. I receive "Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available."
/opt/alt/php53/etc/php.d.all/mysql.ini exists
Is there anything else I need to do ? I have fallowed this tutorial to setup php selector http://docs.cloudlinux.com/index.htm...d_support.html
thanks.
Leave a comment:
-
You can copy missing .ini file from another php version directory.
For example, mysql.ini, mysqli.ini, pdo_mysql.ini should be copied from /opt/alt/php53/etc/php.d.all to /opt/alt/php54/etc/php.d.all
Then you should execute # cagefsctl --rebuild-alt-php-ini
Leave a comment:
-
php selector missing mysql, mysqli extension
Hello,
I have been using cloudlinux with cpanel for a while and enable selector. I am checking the php version 5.4 in my selector, it does not have mysql and mysqli extension available to tick like the other version.
Anyone has the same issue and how to fix it?
Regards,
GeekTags: None
Leave a comment: