mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
only do this magic on non-win32 platforms
This commit is contained in:
parent
042f9081a8
commit
e9f5fb53f3
@ -272,12 +272,15 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
|
||||
}
|
||||
}
|
||||
|
||||
if (vars[2].optval && strcmp("localhost", vars[2].optval)) {
|
||||
host = vars[2].optval;
|
||||
port = atoi(vars[3].optval);
|
||||
} else {
|
||||
#ifndef PHP_WIN32
|
||||
if (vars[2].optval && !strcmp("localhost", vars[2].optval)) {
|
||||
host = ".";
|
||||
unix_socket = vars[4].optval;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
host = vars[2].optval;
|
||||
port = atoi(vars[3].optval);
|
||||
}
|
||||
dbname = vars[1].optval;
|
||||
if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, 0) == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user