diff options
| author | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:55:03 +0000 |
|---|---|---|
| committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:55:03 +0000 |
| commit | cb3033080017e05ae7843859f993517252e67e31 (patch) | |
| tree | 675f409de0e4180a660cfe03df518c06aa18d847 /ext/mysql | |
| parent | 64f372fae2876a197996a1753d3659d8fa9d0bb4 (diff) | |
| download | php-git-cb3033080017e05ae7843859f993517252e67e31.tar.gz | |
Merge safe_mode changes into extensions that are in sync in both branches
Diffstat (limited to 'ext/mysql')
| -rw-r--r-- | ext/mysql/php_mysql.c | 4 | ||||
| -rw-r--r-- | ext/mysql/tests/mysql_query_load_data_openbasedir.phpt | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 2c3085fd82..b948fd2158 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -664,7 +664,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } /* 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)) { +#else + if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') && (client_flags & CLIENT_LOCAL_FILES)) { +#endif client_flags ^= CLIENT_LOCAL_FILES; } diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt index a257f5fb81..ff62f4227e 100644 --- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt +++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt @@ -26,7 +26,6 @@ if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') { } ?> --INI-- -safe_mode=0 open_basedir="." --FILE-- <?php |
