php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74815 php.exe fails with a combination of INI entries at startup
Submitted: 2017-06-26 14:43 UTC Modified: 2017-06-27 15:26 UTC
From: mlocati at gmail dot com Assigned: ab (profile)
Status: Closed Package: Reproducible crash
PHP Version: 7.2.0alpha2 OS: Windows 10
Private report: No CVE-ID: None
 [2017-06-26 14:43 UTC] mlocati at gmail dot com
Description:
------------
I'm on Windows 10.0.15063 64 bit, testing PHP 7.2.0alpha2 VC15 x86 Thread Safe.

PHP.exe fails with a combination of entries in the INI file: see the following console session:

C:\Dev\PHP7.2>php -n -v
PHP 7.2.0alpha2 (cli) (built: Jun 20 2017 20:28:13) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies

C:\Dev\PHP7.2>php -n -r "echo 1+1;"
2
C:\Dev\PHP7.2>php -n -d error_log=errors.log -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -r "echo 1+1;"

With this last command, php.exe fails (a popup tells me that "CLI stopped working").

If I omit one of the four INI entries above (any of them), PHP.exe works.
With all the four entries above it stops working.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-27 03:11 UTC] requinix@php.net
-Summary: php.exe fails with a combination of INI entries +Summary: php.exe fails with a combination of INI entries using -d -Status: Open +Status: Verified -Package: *General Issues +Package: Reproducible crash
 [2017-06-27 03:11 UTC] requinix@php.net
Reproduced, but I'm having a hard time getting a backtrace. Can you?
http://bugs.php.net/bugs-generating-backtrace-win32.php

As far as I can tell the problem is during the attempt to open (or write to?) the error_log when PHP says at startup that track_errors is deprecated.
 [2017-06-27 07:25 UTC] mlocati at gmail dot com
> -Summary: php.exe fails with a combination of INI entries
> +Summary: php.exe fails with a combination of INI entries using -d

This issue is valid even if the INI entries are defined in an INI file, not only with the "-d" option.


> Reproduced, but I'm having a hard time getting a backtrace. Can you?

Sure! Here it is:

vcruntime140.dll!memcpy(unsigned char * dst, unsigned char * src, unsigned long count) line 668

php7ts.dll!virtual_open(const char * path, int flags, ...) line 1595

php7ts.dll!php_log_err_with_severity(char * log_message, int syslog_type_int) line 666

php7ts.dll!php_error_cb(int type, const char * error_filename, const unsigned int error_lineno, const char * format, char * args) line 1138

php7ts.dll!zend_error_va_list(int type, const char * format, char * args) line 1247

php7ts.dll!zend_error(int type, const char * format, ...) line 1374

php7ts.dll!php_module_startup(_sapi_module_struct * sf, _zend_module_entry * additional_modules, unsigned int num_additional_modules) line 2351

php.exe!php_cli_startup(_sapi_module_struct * sapi_module) line 431

php.exe!main(int argc, char * * argv) line 1362
 [2017-06-27 07:47 UTC] requinix@php.net
-Summary: php.exe fails with a combination of INI entries using -d +Summary: php.exe fails with a combination of INI entries at startup
 [2017-06-27 07:47 UTC] requinix@php.net
lol, I tried with php.ini but I forgot about the -n.
 [2017-06-27 15:26 UTC] ab@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: ab
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC