From:             stefan at konink dot de
Operating system: Linux 2.6.27
PHP version:      5.2.6
PHP Bug Type:     CGI related
Bug description:  cgi 'leaks' shell_exec output to webserver

Description:
------------
When a php-cgi issues an shell_exec that outputs code that is expected to
be stored in the variable before it. The output is in fact leaked back over
the fcgi connection, which will issue a 500.

I'm using the Cherokee webserver.

Reproduce code:
---------------
$debug = shell_exec('/usr/bin/nohup /usr/bin/inkscape -z
--file='.$svgfile.' --export-width='.$width.' --export-height='.$height.'
--export-png='.$pngfile);


The work around seems to be to add:

.' 2>&1 1>/dev/null'

Expected result:
----------------
Output to be stored in $debug.

Actual result:
--------------
Outputted over the fcgi line:

00000000 2f75 7372 2f62 696e 2f6e 6f68 7570 3a20 /usr/bin/nohup:.
 handler_fcgi.c:83: Parsing error: unknown version


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

Reply via email to