uw Tue, 06 Sep 2011 12:58:01 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=316255
Log: Reverting to proper --INI-- section usage. Improve SKIPIF to skip test if open_basedir setting is too restrictive during test run for whatever reason. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt U php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt U php/php-src/trunk/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:42:14 UTC (rev 316254) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:58:01 UTC (rev 316255) @@ -2,10 +2,16 @@ LOAD DATA INFILE - open_basedir --SKIPIF-- <?php -require_once('skipif.inc'); -require_once('skipifconnectfailure.inc'); -require_once("connect.inc"); +@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'); + + if (!$IS_MYSQLND) die("skip mysqlnd only, libmysql does not know about open_basedir restrictions"); @@ -30,6 +36,7 @@ --FILE-- <?php @include_once("connect.inc"); + 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 Modified: php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:42:14 UTC (rev 316254) +++ php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:58:01 UTC (rev 316255) @@ -2,10 +2,16 @@ LOAD DATA INFILE - open_basedir --SKIPIF-- <?php -require_once('skipif.inc'); -require_once('skipifconnectfailure.inc'); -require_once("connect.inc"); +@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'); + + if (!$IS_MYSQLND) die("skip mysqlnd only, libmysql does not know about open_basedir restrictions"); @@ -25,10 +31,12 @@ } } ?> +--INI-- +open_basedir="." --FILE-- <?php @include_once("connect.inc"); -ini_set("open_basedir", __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 Modified: php/php-src/trunk/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt =================================================================== --- php/php-src/trunk/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:42:14 UTC (rev 316254) +++ php/php-src/trunk/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2011-09-06 12:58:01 UTC (rev 316255) @@ -2,10 +2,16 @@ LOAD DATA INFILE - open_basedir --SKIPIF-- <?php -require_once('skipif.inc'); -require_once('skipifconnectfailure.inc'); -require_once("connect.inc"); +@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'); + + if (!$IS_MYSQLND) die("skip mysqlnd only, libmysql does not know about open_basedir restrictions"); @@ -25,10 +31,12 @@ } } ?> +--INI-- +open_basedir="." --FILE-- <?php @include_once("connect.inc"); -ini_set("open_basedir", __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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php