summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2003-05-30 13:00:17 +0000
committerGeorg Richter <georg@php.net>2003-05-30 13:00:17 +0000
commit90952aae2d06185c54b2d3e0c15f49e5d364d6cf (patch)
tree4546664f43edc9a351843f0066fda2ea053213ac /ext/mysql/php_mysql.c
parentfab253438129e25c547c909f646e544354b55e91 (diff)
downloadphp-git-90952aae2d06185c54b2d3e0c15f49e5d364d6cf.tar.gz
fixed #23779 (CLIENT_LOCAL_FILES with open_basedir)
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 4ff77fc294..14ba53f6c1 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -557,6 +557,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
WRONG_PARAM_COUNT;
break;
}
+ /* disable local infile option for open_basedir */
+ if (strlen(PG(open_basedir))) {
+ client_flags ^= CLIENT_LOCAL_FILES;
+ }
+
if (z_host) {
SEPARATE_ZVAL(z_host); /* We may modify z_host if it contains a port, separate */
convert_to_string_ex(z_host);