Bug #73124 [Opn->Csd]: php_ini_scanned_files() not reporting correctly

From: Date: Tue, 28 Nov 2017 22:35:07 +0000
Subject: Bug #73124 [Opn->Csd]: php_ini_scanned_files() not reporting correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212785@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73124&edit=1 ID: 73124 Updated by: nikic@php.net Reported by: john-stevenson at blueyonder dot co dot uk Summary: php_ini_scanned_files() not reporting correctly -Status: Open +Status: Closed Type: Bug Package: *Configuration Issues Operating System: Windows 10 PHP Version: 5.6.26 Block user comment: N Private report: N New Comment: Automatic comment on behalf of john-stevenson@blueyonder.co.uk Revision: http://git.php.net/?p=php-src.git;a=commit;h=6ed242dfc84a9e58f6e03184d99611f2cfb2a265 Log: Fixed #73124: php_ini_scanned_files() Previous Comments: ------------------------------------------------------------------------ [2017-11-16 18:39:56] john-stevenson at blueyonder dot co dot uk Fixed: https://github.com/php/php-src/pull/2921 ------------------------------------------------------------------------ [2016-09-20 11:01:16] john-stevenson at blueyonder dot co dot uk Description: ------------ When PHP has not been compiled using the --with-config-file-scan-dir option, php_ini_scanned_files() does not report additional ini files that have been scanned via the PHP_INI_SCAN_DIR environment variable . However the correct information is shown when running php --ini I realize that this is an edge-case, but PHP_INI_SCAN_DIR is used regardless of the compile option in php_init_config(): https://github.com/php/php-src/blob/1c295d4a9ac78fcc2f77d6695987598bb7abcb83/main/php_ini.c#L609 Whereas in php_ini_scanned_files() this option is required for the data to reported (even though the data exists): https://github.com/php/php-src/blob/fcc6f2df5986bb9615a658cc717b1a92922462d2/ext/standard/info.c#L1388 Test script: --------------- Using a Windows build (so no --with-config-file-scan-dir) create a file named "date.ini" somewhere containing the line: date.timezone = Antarctica/McMurdo Now run the following: set PHP_INI_SCAN_DIR=path\to\somewhere php -r "var_dump(php_ini_scanned_files());var_dump(ini_get('date.timezone'));" Expected result: ---------------- Command line code:1: string(???) "path\to\somewhere\date.ini" Command line code:1: string(18) "Antarctica/McMurdo" Actual result: -------------- Command line code:1: bool(false) Command line code:1: string(18) "Antarctica/McMurdo" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73124&edit=1

« previous php.bugs (#212785) next »