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

From: Date: Sun, 21 Nov 2010 16:58:39 +0000
Subject: Bug #53034 [Ver->Wfx]: shebang parsing problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156266@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:             Verified
+Status:             Wont fix
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   CentOS 5.3
 PHP Version:        5.2, 5.3, trunk
 Block user comment: N
 Private report:     N

 New Comment:

This is an OS dependent issue, see
http://www.in-ulm.de/~mascheck/various/shebang/#splitting


Previous Comments:
------------------------------------------------------------------------
[2010-10-16 18:26:25] felipe@php.net

On 5.2 we got an error message "Invalid configuration directive" in the
ini parser instead.

------------------------------------------------------------------------
[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)

« previous php.bugs (#156266) next »