ID: 42389 Updated by: [EMAIL PROTECTED] Reported By: webmaster at machostlink dot net Status: Open Bug Type: CGI related Operating System: OSX 10.4.10 PHP Version: 5.2.3 New Comment:
Regarding any PHP 4 fixes, see php.net for latest NEWS: "PHP 4 end of life announcement" This isn't any critical issue so it's very unlikely it will get fixed in PHP 4 (even if there were any more releases of PHP 4..) And I still think this isn't PHP bug. Do you know if PHP is outputting any errors? Do you have logging enabled? Are you sure you haven't hit any limits set in php.ini for max size for uploaded file for example..? Previous Comments: ------------------------------------------------------------------------ [2007-08-23 11:41:18] webmaster at machostlink dot net Ok, I checked the latest CVS snapshot but the problem still remains the same. I forgot to mention in my inital post that I am using Apache2 with mod_suexec for permissions. But that seems to work fine according to suexec.log and apache2 error.log files. Thought I mention it now anyway just in case. ------------------------------------------------------------------------ [2007-08-23 09:13:53] webmaster at lifedit dot com Right, I was taken that already in consideration and posted a report on "mod_fcgid users bug tracker" as well. But looking at the history of somewhat related php-cgi problems and bug reported I think it is more likely to be a PHP bug. My problem is that I have a hosting service and I rely on both PHP5 & PHP4 because I do have clients who still have PHP4 applications they want to run. So even if it does work with the latest CVS (which I will try out) I still have a need for this feature to run on PHP4 as well. :( ------------------------------------------------------------------------ [2007-08-23 09:06:04] [EMAIL PROTECTED] 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..? :) ------------------------------------------------------------------------ [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