Bug #71234 [Nab]: INI files are loaded even invoked as -n --version
| From: | miloslav dot hula at gmail dot com | Date: | Tue, 29 Dec 2015 10:45:42 +0000 |
| Subject: | Bug #71234 [Nab]: INI files are loaded even invoked as -n --version | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198277@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71234&edit=1
ID: 71234
User updated by: miloslav dot hula at gmail dot com
Reported by: miloslav dot hula at gmail dot com
Summary: INI files are loaded even invoked as -n --version
Status: Not a bug
Type: Bug
Package: phpdbg
PHP Version: 7.0.1
Block user comment: N
Private report: N
New Comment:
I don't understand the example you posted.
When I'm trying:
strace /home/milo/php/php-7.0.1 -n --version 2>&1 | less
strace /home/milo/php/php-cgi-7.0.1 -n --version 2>&1 | less
There are no INI loadings in system calls trace.
Btw. order of -n and --version matters.
Previous Comments:
------------------------------------------------------------------------
[2015-12-29 10:26:42] laruence@php.net
this seems by design, and it only affects -h and --version
and we have the same behavior in cli sapi:
$ sapi/cli/php -n --version
PHP 7.0.3-dev (cli) (built: Dec 23 2015 12:12:24) ( NTS DEBUG )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
------------------------------------------------------------------------
[2015-12-29 10:11:34] miloslav dot hula at gmail dot com
Description:
------------
phpdbg tries to load
php.ini files when invoked as -n --version.
Actual result:
--------------
open("./php-phpdbg.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/milo/bin/php-bin/7.0.0/lib/php-phpdbg.ini", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("./php.ini", O_RDONLY) = 4
# When you have php.ini in CWD, it can lead to unexpected errors like
$ /home/milo/php/phpdbg-7.0.1 -n --version
Xdebug requires Zend Engine API version 220131226.
The Zend Engine API version 320151012 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of
Xdebug.
phpdbg 0.5.0 (built: Dec 29 2015 08:49:43)
PHP 7.0.1, Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71234&edit=1