Bug #55648 [NEW]: CLI: the ini directives passed with -d to the CLI do not parse constants.
From: yaauie
Operating system: Windows 7
PHP version: 5.4SVN-2011-09-06 (snap)
Package: CGI/CLI related
Bug Type: Bug
Bug description:CLI: the ini directives passed with -d to the CLI do not parse constants.
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 bug report at https://bugs.php.net/bug.php?id=55648&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55648&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55648&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55648&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55648&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55648&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55648&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55648&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55648&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55648&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55648&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55648&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55648&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55648&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55648&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55648&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55648&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55648&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55648&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55648&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55648&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55648&r=mysqlcfg
Thread (4 messages)
- yaauie@php.net