From:             
Operating system: Ubuntu
PHP version:      5.3.3
Package:          CGI related
Bug Type:         Bug
Bug description:PHP crash/failure when called from bash-completion

Description:
------------
Calling PHP shell-scripts in any way (even if it doesn't do anything) from
a bash-completion script causes the bash-completion script to fail
(pressing TAB causes erratic spacing and tabbing at the console rather than
producing options for completion). Bash and Perl calls work fine.



This refers to calling PHP in any of the following ways:

o php -r '..'

o php script.php

o ./script.php (this references '/usr/bin/php' with a shebang at the top)



I even tried calling Perl from the Bash, and then calling PHP from the
Perl. No change in behavior. I tried with both 5.2 and the latest version
of 5.3 .





Test script:
---------------
No test script necessary. Executing "php -r ''" in a bash completion script
causes the failure.



Contents of ~/completiontest can be found at:



 
http://www.randomingenuity.com/phpbugreference/20101010-2054_completiontest.php





You can commit this to the current bash-completion configuration by
executing:



  ~$ . completiontest



To test without PHP, just comment-out the PHP call.

Expected result:
----------------
dus...@ubuntu:~$ . completiontest

dus...@ubuntu:~$ completiontest --<TAB><TAB>

--help     --verbose  --version

dus...@ubuntu:~$ completiontest --



Actual result:
--------------
dus...@ubuntu:~$ . completiontest

dus...@ubuntu:~$ completiontest --        |<-- Cursor moves to here.



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

Reply via email to