Bug #53034 [Ver]: shebang parsing problem
Edit report at http://bugs.php.net/bug.php?id=53034&edit=1
ID: 53034
Updated by: felipe@php.net
Reported by: cpriest at warpmail dot net
Summary: shebang parsing problem
Status: Verified
Type: Bug
Package: Scripting Engine problem
Operating System: CentOS 5.3
-PHP Version: 5.3.3
+PHP Version: 5.2, 5.3, trunk
Block user comment: N
New Comment:
On 5.2 we got an error message "Invalid configuration directive" in the
ini parser instead.
Previous Comments:
------------------------------------------------------------------------
[2010-10-16 18:23:04] felipe@php.net
This is because internally the argv[1] is '-d display_errors=1 -d
display_startup_errors=1' when passing in the shebang line. And we don't
parse such string.
------------------------------------------------------------------------
[2010-10-10 06:48:33] cpriest at warpmail dot net
Description:
------------
Using parameters in shebang line causes script errors, doesn't parse &
process shebang parameters.
Test script:
---------------
#!/usr/bin/php -d display_errors=1 -d display_startup_errors=1
<?
echo "1\r\n";
new a();
echo "2\r\n";
?>
Expected result:
----------------
1
Fatal error: Class 'a' not found in /opt/tools/bin/mysql_dump_parser.php
on line 4
Actual result:
--------------
PHP: syntax error, unexpected TC_STRING in Unknown on line 7
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53034&edit=1
Thread (4 messages)