From:             webmaster at machostlink dot net
Operating system: OSX 10.4.10
PHP version:      5.2.3
PHP Bug Type:     CGI related
Bug description:  PHP+Apache2+mod_fcgid kills all processes after submit

Description:
------------
When using a simple upload form to submit a file, all php4-cgi & php5-cgi
processes (parent & children) are killed and server throws "500 Internal
Server Error" message. This happens ONLY when filesize is larger then 4KB.

Apache error.log from vhost
---------------------------
[warn] (35)Resource temporarily unavailable: mod_fcgid: write data to
fastcgi server error

Apache error.log from main/default server
-----------------------------------------
mod_fcgid: process /Volumes/home/www/vhost1/public_html/test.php(2293)
exit(communication error), terminated by calling exit(), return code: 0

I am not sure now, after reading other (older) bug reports  regarding  
cgi problems, if this is not an older issue as well!? However, since I
could not find many similarities to these posts I decided to file this
one.

I am running PHP 4.4.7 & PHP 5.2.3 as CGI using mod_fcgid 2.2 and Apache
2.2.4



Reproduce code:
---------------
<?php
$uploaddir = '/tmp/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
    echo "File is valid, and was successfully uploaded.\n";
} else {
    echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "</pre>";

?>
<form enctype="multipart/form-data" action="<?=$_SERVER['PHP_SELF']?>"
method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>

Expected result:
----------------
File is valid, and was successfully uploaded.
Here is some more debugging info:Array
(
    [userfile] => Array
        (
            [name] => test.jpg
            [type] => image/jpeg
            [tmp_name] => /Volumes/home/www/vhost1/tmp/phpcYOdvd
            [error] => 0
            [size] => 24852930
        )

)

Actual result:
--------------
Error 500
Internal Server Error
...

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

Reply via email to