Skip to main content

PHP installation appears to be missing the MySQL extension

Comments

13 comments

  • OooLong
    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.
    0
  • OooLong
    I think I found the problem: [root@ade-423 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 [root@ade-423 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.
    0
  • cPanelMichael
    Hello, You can install the missing extensions for PHP 7.0 with the following command:
    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:
    # ls /opt/cpanel/ea-php70/root/usr/lib64/php/modules|grep mysql mysqli.so mysqlnd.so pdo_mysql.so
    Thank you.
    0
  • OooLong
    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?
    0
  • cPanelMichael
    Hello, Are you using updated versions of the RPMs? You can check this by running the following command:
    yum update
    If so, try reinstalling the RPM with this command:
    yum reinstall ea-php70-php-mysqlnd
    Thank you.
    0
  • OooLong
    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.
    0
  • cPanelMichael
    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.
    0
  • ramorse
    I'm getting the same error on a server. Should I try the yum installs or just open a ticket?
    0
  • cPanelMichael
    I'm getting the same error on a server. Should I try the yum installs or just open a ticket?

    Hello, Check to see if the following thread helps: SOLVED - Fatal error: Call to undefined function mysql_connect() Thank you.
    0
  • ramorse
    The line suPHP_ConfigPath /home/fya/public_html is not in the .htacess file, so no, that thread didn't help.
    0
  • cPanelMichael
    Could you open a support ticket using the link in my signature so we can take a closer look? Thank you.
    0
  • ramorse
    OK. Support ticket: 8899047
    0
  • ramorse
    Apparently, I needed to manually set mysqlnd to be installed when running EA 4. It's not part of the default configuration for PHP 7/7.1. Next time I will know.
    0

Please sign in to leave a comment.