]> granicus.if.org Git - php/commitdiff
improve open_basedir handling
authorStanislav Malyshev <stas@php.net>
Tue, 6 Sep 2011 19:51:35 +0000 (19:51 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 6 Sep 2011 19:51:35 +0000 (19:51 +0000)
ext/mysql/tests/mysql_query_load_data_openbasedir.phpt

index c2685a572e9df1f9041fa986a0258fd28c802ff3..339d36c9349849722b62256b598955dd6c48f5e6 100644 (file)
@@ -3,11 +3,6 @@ LOAD DATA INFILE - open_basedir
 --SKIPIF--
 <?php
 @include_once("connect.inc");
-
-if (!isset($db)) {
-  die("skip open_basedir setting prevents inclusing of required files");
-}
-
 include_once('skipif.inc');
 include_once('skipifconnectfailure.inc');
 
@@ -31,12 +26,11 @@ if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') {
        }
 }
 ?>
---INI--
-open_basedir="."
 --FILE--
 <?php
 @include_once("connect.inc");
-
+ini_set("open_basedir", __DIR__);
+chdir(__DIR__);
 if (!isset($db)) {
        // run-tests, I love you for not allowing me to set ini settings dynamically
        print "[006] [1148] The used command is not allowed with this MySQL version