From: Operating system: GNU/Linux PHP version: 5.3SVN-2010-11-20 (snap) Package: CGI related Bug Type: Bug Bug description:CLI fails to interpret shorthand in "-d memory_limit=" in shebang line
Description: ------------ Version: "PHP 5.3.4RC2-dev (cli) (built: Nov 20 2010 16:50:58)" Configured with all settings default. Note that the script below should be invoked as "./test.php" rather than "php test.php" (for example) in order to reproduce the bug. The bug is not present in the 5.2 snapshots. Test script: --------------- #!/usr/bin/php -d memory_limit=16M -n <? echo fgets(STDIN) + fgets(STDIN) . "\n"; ?> Expected result: ---------------- The script is intended to read two integers, one per line, from standard input and print their sum to standard output. Actual result: -------------- PHP prints the error message "Could not startup." and quits. However, the expected result is seen when "16M" is replaced with "16777216" in the shebang line, and also when php is explicitly invoked (e.g., "php test.php") regardless of whether the shorthand is used. -- Edit bug report at http://bugs.php.net/bug.php?id=53368&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53368&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53368&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53368&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53368&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53368&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53368&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53368&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53368&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53368&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53368&r=support Expected behavior: http://bugs.php.net/fix.php?id=53368&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53368&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53368&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53368&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53368&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53368&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53368&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53368&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53368&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53368&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53368&r=mysqlcfg