A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearLarge File Upload Errors with PHP - page 1
User InfoPosts
Large File Upload Errors with PHP#1
I have an image upload for a slideshow, and the users are continuously uploading files that are 2MB plus. Files under this size work fine, but files over the size cause what looks like a browser timeout.

Here are my php ini settings:

Max memory allocation: 12M
Max file upload size: 10M
Max HTTP Post size: 10M
Max execution time: 60
Max input parsing time: 120

These settings are in the configuration file itself, and I can change them directly. Changes show up when using phpinfo().

I am running on an apache server and php 4.3.9(client(s choice, not mine). The apache server(s request limit is set to default, which I believe is somewhere around 2GB?

When I use the firebug network monitor, it does look like I am not receiving a full response from the server, though I am not too experienced at using this tool. Things seem to be timing out at around 43 seconds.

All the help I can find on the net points to the above settings as the culprits, but all of those settings are much higher than this 2MB file and the 43 second time out.

Any suggestions at where I can go from here to solve this issue?

Here are relevant php ini settings from phpinfo(). Let me know if I need to post any more.

file_uploads On On
max_execution_time 60 60
max_input_nesting_level 64 64
max_input_time 120 120
memory_limit 12M 12M
post_max_size 10M 10M
safe_mode Off Off
upload_max_filesize 10M 10M
upload_tmp_dir no value no value

posted date: 2009-04-16 09:06:00

Re: Large File Upload Errors with PHP#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-16 09:06:01

Re: Large File Upload Errors with PHP#3
Where are those settings? If you(re using .htaccess then your Apache configuration might not be allowing you to override those settings.I(d suggest checking with a phpinfo() call if those settings are indeed being applied or not:<?php phpinfo();?>

posted date: 2009-04-16 09:10:00

Re: Large File Upload Errors with PHP#4
If it(s a shared host, your host might have set a limit to override yours.Otherwise, try making the POST limit higher than the file upload size. AFAIK, uploads are POSTED.

posted date: 2009-04-16 09:13:00

Re: Large File Upload Errors with PHP#5
I have the ability to edit the php ini file on this particular server, and they are showing up in php info. This is one of the reasons why this particular problem is really bothering me. I have no problem telling people to upload smaller files, but I have an interesting problem to solve now. ;)

posted date: 2009-04-16 09:14:00

Re: Large File Upload Errors with PHP#6
Could you please post your PHP.ini settings? I mean, just those affecting files uploads.

posted date: 2009-04-16 09:17:00

Re: Large File Upload Errors with PHP#7
I just bumped the POST limit up to 11M, 1M over the file upload size. I am sending a small about of text data with the file, about 30 characters max. Nothing has changed unfortunately.

posted date: 2009-04-16 09:20:00

Re: Large File Upload Errors with PHP#8
Post has been updated!

posted date: 2009-04-16 09:29:00

Re: Large File Upload Errors with PHP#9
Sorry pal, I just don't have any clue then :( Good luck!

posted date: 2009-04-16 09:36:00

Re: Large File Upload Errors with PHP#10
Thanks for the help anyway! I appreciate the quick response. If I ever get this working, I will try to post the answer.

posted date: 2009-04-16 09:37:00

Re: Large File Upload Errors with PHP#11
If the problem is due to the Host overriding your timeout, you can look for a host that still uses Apache 1: In Apache 1 the local .htaccess overrides the global setting even for the timeout.Otherwise, there are dozens of Java applett uploaders available for just a few dollars (Google it). They split the file, upload the parts and put the parts back together transparently.This is a guaranteed fix for timeout, and has the added advantage of letting users pause and resume their upload, see the progress, et all.(Flash based uploaders don(t have this advantage.)

posted date: 2009-04-16 09:41:00

Re: Large File Upload Errors with PHP#12
Make sure you have error reporting activated in php.ini: display_errors = On; this might give you a clue about what(s going on. Production servers usually (should) have error reporting disabled.I recently had a similar problem, and increasing the memory_limit setting worked for me. If you read files content into variables, each variable will take about as much memory as the file size, increasing the scripts memory requirements.

posted date: 2009-04-16 10:03:00

select page: « 1 2 »
Copyright ©2008-2017 www.momige.com, all rights reserved.