Bug #53034 [Opn->Ver]: shebang parsing problem

From: Date: Sat, 16 Oct 2010 16:23:05 +0000
Subject: Bug #53034 [Opn->Ver]: shebang parsing problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155249@lists.php.net to get a copy of this message
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:             Open
+Status:             Verified
 Type:               Bug
-Package:            Unknown/Other Function
+Package:            Scripting Engine problem
 Operating System:   CentOS 5.3
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#155249) next »