php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53368 CLI fails to interpret shorthand in "-d memory_limit=" in shebang line
Submitted: 2010-11-20 23:19 UTC Modified: 2010-11-21 17:59 UTC
From: bbi5291 at gmail dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.3SVN-2010-11-20 (snap) OS: GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 + 44 = ?
Subscribe to this entry?

 
 [2010-11-20 23:19 UTC] bbi5291 at gmail dot com
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-21 14:56 UTC] felipe@php.net
-Package: CGI related +Package: Scripting Engine problem
 [2010-11-21 14:59 UTC] felipe@php.net
This issue is related to bug #53034
 [2010-11-21 17:59 UTC] felipe@php.net
-Status: Open +Status: Wont fix
 [2010-11-21 17:59 UTC] felipe@php.net
This is an OS dependent issue, see http://www.in-ulm.de/~mascheck/various/shebang/#splitting
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 12:01:32 2024 UTC