php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75159 7.2 does not parse additional .ini files
Submitted: 2017-09-05 15:52 UTC Modified: 2017-11-30 10:58 UTC
From: anrdaemon at freemail dot ru Assigned: ab (profile)
Status: Closed Package: *Configuration Issues
PHP Version: 7.2.0RC1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
6 + 33 = ?
Subscribe to this entry?

 
 [2017-09-05 15:52 UTC] anrdaemon at freemail dot ru
Description:
------------
I've duplicated an exsisting 7.1.9 setup to check the 7.2RC1 binaries, and much to my surprise discovered that it does not pick the configuration.
Reading through php --ini, it sees the PHP_INI_SCAN_DIR and correctly displays the paths to scan for additional configuration files, but does not load even a single one.

Test script:
---------------
php --ini
dir C:\usr\sbin\php-7.2-extra\conf.d C:\usr\sbin\php-7.2.0RC1\conf.d

Expected result:
----------------
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\usr\sbin\php-7.2.0RC1\php-cli.ini
Scan for additional .ini files in: C:\usr\sbin\php-7.2-extra\conf.d;C:\usr\sbin\php-7.2.0RC1\conf.d
Additional .ini files parsed:      C:\usr\sbin\php-7.2-extra\conf.d\00-core.ini,
C:\usr\sbin\php-7.2-extra\conf.d\00-date.ini,
C:\usr\sbin\php-7.2-extra\conf.d\00-extensions.ini,
C:\usr\sbin\php-7.2-extra\conf.d\00-mail.ini,
C:\usr\sbin\php-7.2-extra\conf.d\10-mbstring.ini,
C:\usr\sbin\php-7.2-extra\conf.d\10-session.ini,
C:\usr\sbin\php-7.2-extra\conf.d\bz2.ini,
C:\usr\sbin\php-7.2-extra\conf.d\crypto.ini,
C:\usr\sbin\php-7.2-extra\conf.d\curl.ini,
C:\usr\sbin\php-7.2-extra\conf.d\exif.ini,
C:\usr\sbin\php-7.2-extra\conf.d\fileinfo.ini,
C:\usr\sbin\php-7.2-extra\conf.d\ftp.ini,
C:\usr\sbin\php-7.2-extra\conf.d\gd2.ini,
C:\usr\sbin\php-7.2-extra\conf.d\gettext.ini,
C:\usr\sbin\php-7.2-extra\conf.d\gmp.ini,
C:\usr\sbin\php-7.2-extra\conf.d\iconv.ini,
C:\usr\sbin\php-7.2-extra\conf.d\imap.ini,
C:\usr\sbin\php-7.2-extra\conf.d\intl.ini,
C:\usr\sbin\php-7.2-extra\conf.d\ldap.ini,
C:\usr\sbin\php-7.2-extra\conf.d\mysql.ini,
C:\usr\sbin\php-7.2-extra\conf.d\openssl.ini,
C:\usr\sbin\php-7.2-extra\conf.d\phar.ini,
C:\usr\sbin\php-7.2-extra\conf.d\shmop.ini,
C:\usr\sbin\php-7.2-extra\conf.d\sockets.ini,
C:\usr\sbin\php-7.2-extra\conf.d\sqlite.ini,
C:\usr\sbin\php-7.2-extra\conf.d\tidy.ini,
C:\usr\sbin\php-7.2-extra\conf.d\xdebug.ini,
C:\usr\sbin\php-7.2-extra\conf.d\xsl.ini


 Volume in drive C is SysWin7        Serial number is 76a3:5886
 Directory of  C:\usr\sbin\php-7.2-extra\conf.d\*

05.09.2017  18:44         <DIR>    .
05.09.2017  18:44         <DIR>    ..
10.02.2016  03:45             110  .readme
14.08.2017  17:14             588  00-core.ini
25.12.2016  01:21              43  00-date.ini
12.05.2017  21:54           1 893  00-extensions.ini
25.12.2016  01:24             514  00-mail.ini
25.12.2016  01:19             182  10-mbstring.ini
20.03.2017  18:35             158  10-session.ini
25.12.2016  01:15              32  bz2.ini
09.12.2016  02:25              40  crypto.ini
25.12.2016  01:16              34  curl.ini
25.12.2016  03:04              34  exif.ini
25.12.2016  03:11              40  fileinfo.ini
25.12.2016  03:10              32  ftp.ini
25.12.2016  01:32              63  gd2.ini
11.12.2016  22:11              40  gettext.ini
25.12.2016  01:16              32  gmp.ini
25.12.2016  01:19             113  iconv.ini
25.12.2016  01:16              34  imap.ini
09.12.2016  02:54              62  intl.ini
10.02.2016  04:00              55  ldap.ini
11.08.2017  12:24           3 014  mysql.ini
25.12.2016  01:17              40  openssl.ini
27.02.2016  20:42              33  phar.ini
25.12.2016  03:33              36  shmop.ini
25.12.2016  01:17              40  sockets.ini
24.12.2016  11:52              42  sqlite.ini
09.12.2016  02:53             419  tidy.ini
21.06.2017  13:11             738  xdebug.ini
20.03.2017  18:23              32  xsl.ini
               8 493 bytes in 29 files and 2 dirs    118 784 bytes allocated
      27 116 150 784 bytes free

 Volume in drive C is SysWin7        Serial number is 76a3:5886
 Directory of  C:\usr\sbin\php-7.2.0RC1\conf.d\*

05.09.2017  18:50         <DIR>    .
05.09.2017  18:50         <DIR>    ..
                   0 bytes in 0 files and 2 dirs
      27 116 150 784 bytes free


Actual result:
--------------
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\usr\sbin\php-7.2.0RC1\php-cli.ini
Scan for additional .ini files in: C:\usr\sbin\php-7.2-extra\conf.d;C:\usr\sbin\php-7.2.0RC1\conf.d
Additional .ini files parsed:      (none)


 Volume in drive C is SysWin7        Serial number is 76a3:5886
 Directory of  C:\usr\sbin\php-7.2-extra\conf.d\*

05.09.2017  18:44         <DIR>    .
05.09.2017  18:44         <DIR>    ..
10.02.2016  03:45             110  .readme
14.08.2017  17:14             588  00-core.ini
25.12.2016  01:21              43  00-date.ini
12.05.2017  21:54           1 893  00-extensions.ini
25.12.2016  01:24             514  00-mail.ini
25.12.2016  01:19             182  10-mbstring.ini
20.03.2017  18:35             158  10-session.ini
25.12.2016  01:15              32  bz2.ini
09.12.2016  02:25              40  crypto.ini
25.12.2016  01:16              34  curl.ini
25.12.2016  03:04              34  exif.ini
25.12.2016  03:11              40  fileinfo.ini
25.12.2016  03:10              32  ftp.ini
25.12.2016  01:32              63  gd2.ini
11.12.2016  22:11              40  gettext.ini
25.12.2016  01:16              32  gmp.ini
25.12.2016  01:19             113  iconv.ini
25.12.2016  01:16              34  imap.ini
09.12.2016  02:54              62  intl.ini
10.02.2016  04:00              55  ldap.ini
11.08.2017  12:24           3 014  mysql.ini
25.12.2016  01:17              40  openssl.ini
27.02.2016  20:42              33  phar.ini
25.12.2016  03:33              36  shmop.ini
25.12.2016  01:17              40  sockets.ini
24.12.2016  11:52              42  sqlite.ini
09.12.2016  02:53             419  tidy.ini
21.06.2017  13:11             738  xdebug.ini
20.03.2017  18:23              32  xsl.ini
               8 493 bytes in 29 files and 2 dirs    118 784 bytes allocated
      27 116 150 784 bytes free

 Volume in drive C is SysWin7        Serial number is 76a3:5886
 Directory of  C:\usr\sbin\php-7.2.0RC1\conf.d\*

05.09.2017  18:50         <DIR>    .
05.09.2017  18:50         <DIR>    ..
                   0 bytes in 0 files and 2 dirs
      27 116 150 784 bytes free


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-13 09:45 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2017-09-13 09:45 UTC] ab@php.net
Thanks for the report. Though, i don't reproduce the behavior. Setting PHP_INI_SCAN_DIR seems to work. The only case where the additional ini is not read in is when -n is passed, but that's expected. There must be likely yet another factor to reproduce.

Thanks.
 [2017-09-14 09:39 UTC] anrdaemon at freemail dot ru
Wish I know what was that. I tried some variations, including supplying only one path in the env var, but to no avail.
Is there anything I can do to trace this down further?
 [2017-09-19 14:25 UTC] anrdaemon at freemail dot ru
I've tested RC2 in a Win7 VM with minimal environment changes.
Same behavior. The directory to scan is recognized, but not ini files are read according to php --ini.

SET PHP_INI_SCAN_DIR=C:\php\conf.d
"C:\php\php.exe" --version
PHP 7.2.0RC2 (cli) (built: Sep 14 2017 00:12:44) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
"C:\php\php.exe" --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\php\php-cli.ini
Scan for additional .ini files in: C:\php\conf.d
Additional .ini files parsed:      (none)
dir "C:\php\conf.d"

 Volume in drive C is unlabeled      Serial number is 3411:6507
 Directory of  C:\php\conf.d\*

19.09.2017   2:49         <DIR>    .
19.09.2017   2:49         <DIR>    ..
10.02.2016   3:45             110  .readme
14.08.2017  17:14             588  00-core.ini
25.12.2016   1:21              43  00-date.ini
12.05.2017  21:54           1 893  00-extensions.ini
25.12.2016   1:24             514  00-mail.ini
25.12.2016   1:19             182  10-mbstring.ini
20.03.2017  18:35             158  10-session.ini
25.12.2016   1:15              32  bz2.ini
09.12.2016   2:25              40  crypto.ini
25.12.2016   1:16              34  curl.ini
25.12.2016   3:04              34  exif.ini
25.12.2016   3:11              40  fileinfo.ini
25.12.2016   3:10              32  ftp.ini
25.12.2016   1:32              63  gd2.ini
11.12.2016  22:11              40  gettext.ini
25.12.2016   1:16              32  gmp.ini
25.12.2016   1:19             113  iconv.ini
25.12.2016   1:16              34  imap.ini
09.12.2016   2:54              62  intl.ini
10.02.2016   4:00              55  ldap.ini
11.08.2017  12:24           3 014  mysql.ini
25.12.2016   1:17              40  openssl.ini
27.02.2016  20:42              33  phar.ini
25.12.2016   3:33              36  shmop.ini
25.12.2016   1:17              40  sockets.ini
24.12.2016  11:52              42  sqlite.ini
09.12.2016   2:53             419  tidy.ini
21.06.2017  13:11             738  xdebug.ini
20.03.2017  18:23              32  xsl.ini
               8 493 bytes in 29 files and 2 dirs    118 784 bytes allocated
         904 630 272 bytes free
 [2017-09-29 06:09 UTC] anrdaemon at freemail dot ru
RC3 - same issue.
 [2017-11-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2017-11-06 02:33 UTC] anrdaemon at freemail dot ru
What "feedback" did you expect?
"This is still an issue" spam?
Ok, here it is: RC5, same issue.
 [2017-11-15 09:19 UTC] ab@php.net
-Status: No Feedback +Status: Feedback
 [2017-11-15 09:19 UTC] ab@php.net
This issue should be fixed as per reproducer in bug #75159, please check.

Thanks.
 [2017-11-15 09:20 UTC] ab@php.net
Bug #75525 is correct.

Thanks.
 [2017-11-15 23:10 UTC] anrdaemon at freemail dot ru
Seems fine for php-7.2.r97b046a 
Or at the very least, the files reported loaded and the settings look right according to the included files.
Thanks!
 [2017-11-16 09:27 UTC] ab@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: ab
 [2017-11-16 09:27 UTC] ab@php.net
Good news. Thanks for the check!
 [2017-11-30 10:49 UTC] ininflamable at gmail dot com
Windows Server 2008R2 Standard
set PHP_INI_SCAN_DIR=c:\usr\etc\php
c:\usr\php\php.exe --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\usr\php\php.ini
Scan for additional .ini files in: c:\usr\etc\php
Additional .ini files parsed:      (none)

Windows 10 (x64)
set PHP_INI_SCAN_DIR=c:\usr\etc\php
c:\usr\php\php.exe --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File:         C:\usr\php\php.ini
Scan for additional .ini files in: c:\usr\etc\php
Additional .ini files parsed:      c:\usr\etc\php\php.ini
 [2017-11-30 10:51 UTC] ininflamable at gmail dot com
Sorry, the php version:
c:\usr\php\php.exe -v
PHP 7.2.0 (cli) (built: Nov 28 2017 23:48:49) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
 [2017-11-30 10:58 UTC] ab@php.net
@ininflamable it was fixed short before and not included into GA, snapshots are still the target for the tests and 7.2.1 is where it will appear.

Thanks.
 [2017-11-30 11:03 UTC] ininflamable at gmail dot com
Windows 2012R2 Standard:
php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\usr\php\php.ini
Scan for additional .ini files in: c:\usr\etc\php
Additional .ini files parsed:      c:\usr\etc\php\php.ini
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC