From:             
Operating system: Linux
PHP version:      5.3.3
Package:          PHP options/info functions
Bug Type:         Bug
Bug description:"-d" parsed inconsistenly when invoked via shebang

Description:
------------
The behavior of PHP when used via shebang line in a script is different
from using it directly:



# cat > ~/test.php

#!/usr/bin/php -n -ddate.timezone=Europe/Lisbon

<?php

exit(42);



# chmod +x ~/test.php



# ~/test.php ; echo $?

Usage: php [options] [-f] <file> [--] [args...]

[...]

  -d foo[=bar]     Define INI entry foo with value 'bar'

[...]

0



However, when used directly from the command line, the space after "-d"
appears to be optional:



# php -n -ddate.timezone=Europe/Lisbon -r 'echo date("H:i");'

07:15

# php -n -d date.timezone=Europe/Lisbon -r 'echo date("H:i");'

07:15





Please make the invocation via shebang behave the same in this regard
(accept "-dfoo=bar")


-- 
Edit bug report at http://bugs.php.net/bug.php?id=52495&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52495&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52495&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52495&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52495&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52495&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52495&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52495&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52495&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52495&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52495&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52495&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52495&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52495&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52495&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52495&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52495&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52495&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52495&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52495&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52495&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52495&r=mysqlcfg

Reply via email to