Bug #55648 [Opn->Fbk]: CLI: the ini directives passed with -d to the CLI do not parse constants.

From: Date: Wed, 29 Jun 2016 12:46:52 +0000
Subject: Bug #55648 [Opn->Fbk]: CLI: the ini directives passed with -d to the CLI do not parse constants.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201907@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55648&edit=1

 ID:                 55648
 Updated by:         cmb@php.net
 Reported by:        yaauie@php.net
 Summary:            CLI: the ini directives passed with -d to the CLI do
                     not parse constants.
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            CGI/CLI related
 Operating System:   Windows 7
 PHP Version:        5.4SVN-2011-09-06 (snap)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

I also can't reproduce with PHP 5.4.19 on Windows 10. Apparently,
this issue has been resolved, so please try with a recent version,
Ryan.


Previous Comments:
------------------------------------------------------------------------
[2011-09-15 15:02:05] nikic@php.net

Cannot reproduce on 5.4.0 Beta 1 on Windows 7:

C:\php-5.4.0beta1>php.exe -d "error_reporting=E_ALL" -r "var_dump(error_reportin
g());"
int(32767)

C:\php-5.4.0beta1>php.exe -d "error_reporting=E_ALL&~E_NOTICE" -r
"var_dump(erro
r_reporting());"
int(32759)

Output stays same if I add -n option.

------------------------------------------------------------------------
[2011-09-08 18:49:40] yaauie@php.net

Description:
------------
In posix-based systems, you can set error_reporting from the command line using 
the constants, but on Windows this always fails and results in an 
error_reporting() value of zero. 

This affects test automation, where these directives may be supplied in the INI 
section of a phpt test case. run-tests.php runs these tests by passing their ini-
directives as -d. While run-tests.php explicitly sets the numeric value of these 
constants in the base ini, they do not get explicitly set in phpt-specific 
overrides. Thus, output may be different than expected.

Test script:
---------------
php.exe -n -d "error_reporting=E_ALL" -r "var_dump(error_reporting());"

Expected result:
----------------
int(32767)

# or similar

Actual result:
--------------
int(0)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=55648&edit=1


Thread (4 messages)

« previous php.bugs (#201907) next »