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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bbi5291 at gmail dot com
New email:
PHP Version: OS:

 

 [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 22:01:31 2024 UTC