|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-03 05:13 UTC] sniper@php.net
[2005-02-11 01:00 UTC] php-bugs at lists dot php dot net
[2007-09-03 13:37 UTC] wvdm at vodamail dot co dot za
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
Description: ------------ I'm hosting a costumer, who uses an old script written for php 3.x. If at the same time some visitors uploads an image, apache "crashed". The load average jumps to 50 > an there is no possible to connect to the server via ssh anymore. In the error.log i get i.e. the following messages: [Sat Jan 29 01:35:30 2005] [warn] child process 24784 still did not exit, sending a SIGTERM Reproduce code: --------------- <form ENCTYPE="multipart/form-data" name=info method=post ACTION="page.upload.php"> <table> <tr> <td>Datei:</td> <td> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000"><input name="userfile" type="file" <? echo $styleform3; ?>> <INPUT TYPE="hidden" NAME="code" value="1"><br> <INPUT TYPE="hidden" NAME="user" value="<? echo $user;?>"></td> </tr> ... if (is_uploaded_file ($userfile)){ $dir = "/var/kunden/webs/web1/tmp/"; move_uploaded_file($userfile,$dir.$userfile_name) ; } Expected result: ---------------- When I upload an image, which is more than 100000 bytes big, cause of the html-code <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000"> it's given, i get an php error, that the script gets no data. Apache breaks the transfer to php, cause the image is bigger then 100000 bytes. Actual result: -------------- If you delete the hmtl-tag <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000"> an add in your script a check, written in php, for the size and may be the type of the file, you won't get an apache "crash".