Title: php7 mysql_connect()
Last modified: September 1, 2016

---

# php7 mysql_connect()

 *  [jimmytorontosports](https://wordpress.org/support/users/jimmytorontosports/)
 * (@jimmytorontosports)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-mysql_connect/)
 * 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](https://wordpress.org/support/users/joeborge0914/)
 * (@joeborge0914)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php7-mysql_connect/#post-7548234)
 * 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.

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [mysql_connect](https://wordpress.org/support/topic-tag/mysql_connect/)
 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [Borge](https://wordpress.org/support/users/joeborge0914/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/php7-mysql_connect/#post-7548234)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
