1379 | | mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags ); |
| 1381 | $mysqli_connected = mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags ); |
| 1412 | |
| 1413 | if ( is_resource( $this->dbh ) && $mysqli_connected === false ) { |
| 1414 | $mysql_sock_path = ini_get( 'mysql.default_socket' ); |
| 1415 | $mysqli_sock_path = ini_get( 'mysqli.default_socket' ); |
| 1416 | |
| 1417 | $mysql_connection_error = "mysqli_real_connect() failed and mysql_real_connect() succeeded. Check your mysqli configuration."; |
| 1418 | |
| 1419 | if ( $this->show_errors && $mysql_sock_path && $mysqli_sock_path && ( $mysql_sock_path != $mysqli_sock_path ) ) { |
| 1420 | $mysql_connection_error .= " The mysql socket is $mysql_sock_path. The mysqli socket is $mysqli_sock_path. They should be the same."; |
| 1421 | } |
| 1422 | |
| 1423 | trigger_error($mysql_connection_error, E_USER_WARNING); |
| 1424 | } |