summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-16 16:58:19 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-16 16:59:55 +0800
commitbe6fd4ba89e151b68ddd68e53d6a403c2e8eb862 (patch)
treef248aa3560451beee5b41cd0c68cdc2787693fb6 /ext/mysql/php_mysql.c
parente5abc53701ba5a9b58dfaba3b59881c9c410a8e7 (diff)
downloadphp-git-be6fd4ba89e151b68ddd68e53d6a403c2e8eb862.tar.gz
Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
Actually, this only be fixed if php uses mysqlnd
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 8a8a052bf5..90ffb400b9 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -799,6 +799,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
passwd_len = passwd? strlen(passwd):0;
}
+#if !defined(MYSQL_USE_MYSQLND)
/* disable local infile option for open_basedir */
#if PHP_API_VERSION < 20100412
if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) {
@@ -807,6 +808,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
#endif
client_flags ^= CLIENT_LOCAL_FILES;
}
+#endif
#ifdef CLIENT_MULTI_RESULTS
client_flags |= CLIENT_MULTI_RESULTS; /* compatibility with 5.2, see bug#50416 */