1--TEST-- 2Bug #70943 fopen() can't open a file if path is 259 characters long 3--SKIPIF-- 4<?php 5include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 6 7skip_if_not_win(); 8if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); 9 10?> 11--FILE-- 12<?php 13// Generates a sample file whose path is exactly 259 characters long 14$testFile = __DIR__ . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(__DIR__)).".dat"; 15echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n"; 16touch($testFile); 17 18echo "Opening file... "; 19if ($fp = fopen($testFile, "r")) { 20 fclose($fp); 21 echo "OK", "\n"; 22} 23 24unlink($testFile); 25 26?> 27--EXPECT-- 28Generating a file with a path length of 259 characters... 29Opening file... OK 30