ID: 42389 Updated by: [EMAIL PROTECTED] Reported By: webmaster at machostlink dot net -Status: Open +Status: Feedback Bug Type: CGI related Operating System: OSX 10.4.10 PHP Version: 5.2.3 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi I can't reproduce anything like this, even when uploading quite large files so try the snapshot first. (any possibility that this isn't any PHP bug at all..? :) Previous Comments: ------------------------------------------------------------------------ [2007-08-22 20:39:33] webmaster at machostlink dot net 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 this bug report at http://bugs.php.net/?id=42389&edit=1