From 90952aae2d06185c54b2d3e0c15f49e5d364d6cf Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Fri, 30 May 2003 13:00:17 +0000 Subject: [PATCH] fixed #23779 (CLIENT_LOCAL_FILES with open_basedir) --- ext/mysql/php_mysql.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.50.1