Dan, Currently we have the following:
upload_max_filesize "25M" post_max_size "25M" max_input_time 1800 Since we're on a shared host...I have no clue about the setting for LimitRequestBody. The puzzle is that it doesn't take a large file to cause the problem. Just a file about 2meg will cause the timeout. Jeff ----- Original Message ---- From: Dan Cech <[email protected]> To: NYPHP Talk <[email protected]> Sent: Wednesday, July 22, 2009 1:03:29 PM Subject: Re: [nyphp-talk] PHP Fileupload problem Jeff, You may be falling afoul of one of the configuration options related to file uploads in PHP: upload_max_filesize "128M" post_max_size "50M" max_input_time 600 Or Apache: LimitRequestBody 53000000 The settings above are usually sufficient to allow uploads up to 40MB+, assuming the client is able to upload fast enough to complete the upload in under 10 minutes. Dan Jeff Siegel wrote: > The code is real standard stuff (see below). A user selects a file. > Clicks upload. When the upload is completed a refreshed page appears. > This function works perfectly when I test it and when another > consultant tests it. We are able to upload files of almost any size. > When the upload is complete we see the new refreshed page and the > uploaded file is in the correct directory. Of course...this does not > work when the client does the uploading. The browser seems to time > out when the file is about 1 meg or greater in size. There are no PHP > errors, no PHP timeout errors. Just the browser saying that the page > cannot be displayed. > > I tried the script running off of two different web hosts. It works > for me. It works for the consultant. It doesn't work for the client. > To make matters worse, the client's client has the same problem > uploading files. > > Any thoughts on where else to look? Maybe I'm overlooking something > that is real obvious. > > Jeff -------------- > > function UploadFile($IVF){ > > if($IVF){ $uploaddir = '/home/thisdirectory/'; $newFileName = > RenameFile(trim($_POST['claimantname'])); $uploadfile = $uploaddir . > $newFileName; } else { $uploaddir = '/home/thatdirectory/'; > $newFileName = RenameFile(trim($_SESSION['claimant'])); $uploadfile = > $uploaddir . $newFileName; } > > if(is_uploaded_file($_FILES['userfile']['tmp_name'])){ > if(move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)){ > return 1; > > } else { return 0; } } else { return 0; } } _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php
