summaryrefslogtreecommitdiff
path: root/ext/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysql')
-rw-r--r--ext/mysql/tests/mysql_query_load_data_openbasedir.phpt8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
index 577ede3752..4e3bfbcf39 100644
--- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
+++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
@@ -13,6 +13,14 @@ if (!$fp = fopen('./simple.csv', 'w'))
fclose($fp);
@unlink('./simple.csv');
+
+require_once("connect.inc");
+if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') {
+ /* could be a remote TCP/IP connection. LOCAL INFILE may not work */
+ if (gethostbyaddr($host) != gethostname()) {
+ die("skip LOAD DATA LOCAL INFILE will fail if connecting to remote MySQL");
+ }
+}
?>
--INI--
safe_mode=0