• Resolved ZeroGravity

    (@zerogravity)


    I updated my cPanel hosting to use PHP7. I now get a white screen and this error.
    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/xxxxxx/public_html/wp-includes/wp-db.php:1549
    I gather it’s something to do with mysql libraries/extensions. What should I have activated. These are the options I have on the PHP selector page. The ones in bold are checked. What should I have checked/unchecked? (apologies for the formatting)

    apcu imagick nd_mysqli pspell trader
    bcmath imap nd_pdo_mysql raphf uuid
    dba inotify oci8 redis wddx
    dbase intl opcache snmp xdebug
    dom json pdo soap xmlreader
    eio ldap pdo_dblib sockets xmlrpc
    enchant lzf pdo_pgsql stats xmlwriter
    fileinfo mailparse pdo_sqlite sysvmsg xsl
    gd mbstring pgsql sysvsem yaml
    gender mcrypt phar sysvshm zip
    gmagick memcached posix tidy
    http mysqlnd propro timezonedb

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ZeroGravity

    (@zerogravity)

    Looks like I needed to activate nd_mysqli. Everything seems to be working now. Would this be correct? Is there anything else I should activate as well?

    I didn’t see much of a performance increase but it is a fairly lightweight site.

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    Enabling the PHP7 OpCode Cache (opcache) will also provide some of the main speed boosts of PHP7, however enabling at least one mysqli extension was all you needed to do to get database connectivity back.

    The only other one there which could be useful to you would be mcrypt which will allow PHP applications a wider range of encryption methods (although WordPress doesn’t leverage any of that under PHP7).

    Thread Starter ZeroGravity

    (@zerogravity)

    Thanks Dion!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP7 – Call to undefined function mysql_connect()’ is closed to new replies.