From: Georg Richter Date: Fri, 30 May 2003 13:00:17 +0000 (+0000) Subject: fixed #23779 (CLIENT_LOCAL_FILES with open_basedir) X-Git-Tag: BEFORE_FD_REAPPLY~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90952aae2d06185c54b2d3e0c15f49e5d364d6cf;p=php fixed #23779 (CLIENT_LOCAL_FILES with open_basedir) --- 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);