Solved

Upload large files with PHP

Posted on 2007-03-30
1
233 Views
Last Modified: 2007-03-30
Hi

I need to upload large files (10 to 30Mo) using a web form. How can I prevent from the famous "timeout" returned by the browsers after a few seconds? The action run after the submission of the form is scripted in PHP 5.2
0
Comment
Question by:diegomirner
1 Comment
 
LVL 4

Accepted Solution

by:
secondv earned 50 total points
ID: 18822340
At the beginning of your script:

set_time_limit(0);

Also, add this to your uploader directory's .htaccess (where the script performing the uploader is)

php_value max_input_time 0

And do you have php configured to allow uploads that large? ( upload_max_filesize and post_max_size )?

If not, you can add this to the .htaccess as well:

php_value upload_max_filesize 40M
php_value post_max_size 40M
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question