1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Reverting to proper --INI-- section usage. Improve SKIPIF to skip test if open_basedir setting is too restrictive during test run for whatever reason.

This commit is contained in:
Ulf Wendel
2011-09-06 12:58:01 +00:00
parent 48586679c6
commit faeae7ea47
@@ -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");
@@ -25,10 +31,12 @@ if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') {
}
}
?>
--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