Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Upload large files with PHP

Posted on 2007-03-30
1
Medium Priority
?
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
secondv earned 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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