Solved

Upload large files with PHP

Posted on 2007-03-30
1
236 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

713 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