Solved

Upload large files with PHP

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set a time limit on Wordpress Cookie function. 3 53
SSL unsecure page mystery 17 47
Select Query Fails in PHP but not in TERMINAL Mysql 9 33
Joomla Editing 3 24
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 …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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 look for a specific file type in a local or remote server directory using PHP.

752 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