From:             cs at ecn dot purdue dot edu
Operating system: Solaris 10
PHP version:      5.2.9
PHP Bug Type:     *Web Server problem
Bug description:  File descriptor leak

Description:
------------
mod_php contains a potential file descriptor leak on Solaris 10 when 
script executes "exit()".

Reproduce code:
---------------
<?php exit(0); ?>

The change in behavior is due to the addition of HAVE_BROKEN_GETCWD for
Solaris 10. In php_execute_script, a file descriptor is opened to hold the
current working directory, but is not closed in the case where php code may
not return to this function after executing a script. mod_php isn't aware
of the resource that was allocated and not freed.

Expected result:
----------------
Normally web server runs for days without resource trouble. In the 
case where a PHP script does an "exit(0)", the web server will run 
out of file descriptors and will need restarting.


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

Reply via email to