SOLVED PHP installation appears to be missing the MySQL extension

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
I'm getting this error to my site when using ea-php70 with suphp handlers. I checked other already made thread on this issue and there were no problem with suphp_configpath as it's not present in the public_html/.htaccess file. I'm not exactly sure how to tackle this issue. If I revert to php56 cgi handler then I no longer get this error but I want to get it to work with php70 as suphp. Any idea why it say that? Thanks in advance.
 
  • Like
Reactions: jmcabandara

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
Actually since i'm using php-fpm the handlers didn't matter. As long as I switch to php56 then I no longer get that error.
 

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
I think I found the problem:

[[email protected] public_html]# ls /opt/cpanel/ea-php70/root/usr/lib64/php/modules
bcmath.so calendar.so ctype.so curl.so dom.so ftp.so gd.so imap.so json.so mbstring.so mcrypt.so mysqli.so mysqlnd.so opcache.so pdo_mysql.so pdo.so pdo_sqlite.so phar.so posix.so simplexml.so sockets.so sqlite3.so tokenizer.so wddx.so xmlreader.so xml.so xmlwriter.so xsl.so zip.so
[[email protected] public_html]# ls /opt/cpanel/ea-php56/root/usr/lib64/php/modules
bcmath.so ctype.so dom.so gd.so json.so mcrypt.so mysqlnd_mysql.so pdo_mysqlnd.so pdo_sqlite.so posix.so sockets.so tokenizer.so xmlreader.so xmlwriter.so
calendar.so curl.so ftp.so imap.so mbstring.so mysqlnd_mysqli.so mysqlnd.so pdo.so phar.so simplexml.so sqlite3.so wddx.so xml.so xsl.so

The php70 is missing these files in the modules mysqlnd_mysqli.so, mysqlnd_mysql.so, pdo_mysqlnd.so

How do I go about properly installing these files to ea-php70? Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

You can install the missing extensions for PHP 7.0 with the following command:

Code:
yum install ea-php70-php-mysqlnd
Here's the list of modules in the directory you referenced after installing the RPM with the above command:

Code:
#  ls /opt/cpanel/ea-php70/root/usr/lib64/php/modules|grep mysql
mysqli.so
mysqlnd.so
pdo_mysql.so
Thank you.
 
  • Like
Reactions: Patrik

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
Michael,

I already have ea-php70-php-mysqlnd installed in Easyapache 4. These files are not on found in
/opt/cpanel/ea-php70/root/usr/lib64/php/modules: mysqlnd_mysqli.so, mysqlnd_mysql.so, pdo_mysqlnd.so

Any idea why?
 

Attachments

Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

Are you using updated versions of the RPMs? You can check this by running the following command:

Code:
yum update
If so, try reinstalling the RPM with this command:

Code:
yum reinstall ea-php70-php-mysqlnd
Thank you.
 

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
Michael,

I did what you said, yum update and then reinstall. Those files are still missing in php70, yet they are there in php55 and php56. Do you think just copying those files over to php70 make it work just the same? Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

Manually moving those files into place is not advised. Could you open a support ticket using the link in my signature so we can take a closer look?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Could you open a support ticket using the link in my signature so we can take a closer look?

Thank you.