1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Files
archived-php-src/ext/standard/tests/bug73124.phpt
johnstevenson 6ed242dfc8 Fixed #73124: php_ini_scanned_files()
Additional ini files are reported using the --ini option, but not by
`php_ini_scanned_files()`, which relied on PHP_CONFIG_FILE_SCAN_DIR.
2017-11-28 23:33:48 +01:00

25 lines
650 B
PHP

--TEST--
Bug #73124 (php_ini_scanned_files relied on PHP_CONFIG_FILE_SCAN_DIR)
--SKIPIF--
<?php
if (!empty(PHP_CONFIG_FILE_SCAN_DIR)) die("Skip: PHP_CONFIG_FILE_SCAN_DIR must not be available");
?>
--FILE--
<?php
$tempDir = sys_get_temp_dir();
putenv('PHP_INI_SCAN_DIR='.$tempDir);
$inifile = $tempDir.DIRECTORY_SEPARATOR.'scan-dir.ini';
@unlink($inifile);
file_put_contents($inifile, "\n");
$php = getenv('TEST_PHP_EXECUTABLE');
passthru('"'.$php.'" -r "print_r(php_ini_scanned_files());"');
putenv('PHP_INI_SCAN_DIR=');
@unlink($inifile);
?>
--EXPECTREGEX--
.*[\/\\]scan-dir\.ini.*|.*[\/\\]scan-dir\.ini
Done