• Hi Everyone,

    I was trying to install wordpress on a Centos 7 VM

    I built apachehttpd from source
    I built php7 from source
    I built mysql-community-server from source
    I tested that httpd is up and running and phpinfo() is ok

    and then then I downloaded the latest wordpress 4.5.3 tar gz, extracted and try to install, the install.php simply gave error that mysql_connect() is not a defined function (I know thats the case in php7).

    I did some googling, not many people seem to be complaining php7 does not support mysql_connect() because of wordpress installation. and it seem that mysqli or pdo is the new way to go.
    I actually built php with the option
    ‘–with-apxs2=/usr/local/src/apachehttpd/httpd-2.4.20/install/bin/apxs’ ‘–with-pdo-mysql’ ‘–enable-embedded-mysqli’

    is wordpress php7 ready? or is there some tweak I need to do?

    below is some of my phpinfo() output.
    mysqlnd enabled
    Version mysqlnd 5.0.12-dev
    Loaded plugins mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
    API Extensions pdo_mysql

    PDO support enabled
    PDO drivers sqlite, mysql

    PDO Driver for MySQL enabled
    Client API version mysqlnd 5.0.12-dev – 20150407

    Module Authors
    Module Authors
    MySQL driver for PDO George Schlossnagle, Wez Furlong, Ilia Alshanetsky, Johannes Schlueter
    MySQLi Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel
    MySQLnd Andrey Hristov, Ulf Wendel, Georg Richter, Johannes Schlüter

    please if someone see what I am missing let me know.

Viewing 1 replies (of 1 total)
  • Borge

    (@joeborge0914)

    TRy adding these in the php.ini

    extension=pdo.so
    extension=pdo_sqlite.so
    extension=sqlite.so
    extension=pdo_mysql.so
    extension=gd2.so
    extension=curl.so
    extension=mbstring.so
    extension=mcrypt.so
    extension=mysqli.so
    extension=mysql.so
    extension=pdo_mysql.so

Viewing 1 replies (of 1 total)
  • The topic ‘php7 mysql_connect()’ is closed to new replies.