summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2011-09-06 12:58:01 +0000
committerUlf Wendel <uw@php.net>2011-09-06 12:58:01 +0000
commit64cca9fb957a56c16aa732ec074de09bb99e3fc3 (patch)
tree00f7fe90c933723326f0bda99a247cbc5da822dc
parent1e30a4ecb0fdfffecc4f040b1046264a02024cee (diff)
downloadphp-git-64cca9fb957a56c16aa732ec074de09bb99e3fc3.tar.gz
Reverting to proper --INI-- section usage. Improve SKIPIF to skip test if open_basedir setting is too restrictive during test run for whatever reason.
-rw-r--r--ext/mysql/tests/mysql_query_load_data_openbasedir.phpt13
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
index ff62f4227e..c2685a572e 100644
--- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
+++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
@@ -2,9 +2,15 @@
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 @@ open_basedir="."
--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