Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP File Upload problem with Apache 2.0 Fedora

Status
Not open for further replies.

lyphard

Programmer
Jan 14, 2004
9
CA
My web hosting company upgraded their server from Apache 1.3 to 2 a week ago, and since then I have trouble with my PHP file uploading script which works fine before. The symptom is like this:
* It has no problem uploading files less than 2k.
* When the file is bigger than 2k, the uploading process is extremely slow, and the IE status bar will stuck at 38% for a long time. After that, the file appears to be uploaded, but in fact it is truncated to a size of slightly over 2k.
* When the file is much bigger than 2k, say over 20k, the uploading also stuck at 38%, and after a long time it just never come back again.

Any thoughts on this guys? Thanks.
 
With Apache + PHP, three things can limit the size of a file upload: the Apache runtime configuration directive LimitRequestBody and the PHP runtime configuration directives post_max_size and upload_max_filesize. Generally speaking the relationship among the three should be:

LimitRequestBody > post_max_size > upload_max_filesize

You can check the PHP setting by running a PHP script which consists of:

Code:
<?
phpinfo();
?>

To see the Apache directive, you'll have to look at httpd.conf.

Have your HSP take a look at their configuration.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thank you for your reply. However I dont think it's the PHP or Apache directives that cause the problem. My post_max_size is set to 8M and upload_max_filesize is set to 4M. Even if there's a problem in the directive setting, I'll still get error messages when I try to upload a bigger file, isn't it? But in my case, there aren't any error messages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top