Uploading a 3 GB file using php

Posted on 2011-05-04
Last Modified: 2012-06-22
Dear Experts,

I am looking to develop a program that allows my users to upload very large files sizing around 3-5gb. I know the default 2mb limit can be overridden in php.ini file. But I guess just that is not enough to upload very large files like full movie videos.

So can anyone of you suggest a method that allows my users to upload 3 GB files to the web server. I am using PHP. Anyway if it is not possible using php, but can be implemented with any other language, please suggest.

Thanks & regards,
Question by:jacobbbc
    LVL 15

    Expert Comment


    create an .htaccess file  in root folder it would resolve ur all execution time issue
    and paste

    RewriteEngine On
    php_value post_max_size 3000M
    php_value upload_max_filesize 3500M
    php_value max_execution_time 600000000
    php_value max_input_time 6000000000
    php_value memory_limit 4500M
    LVL 15

    Expert Comment

    LVL 19

    Accepted Solution

    Well, I will make here an appointment.

    Http protocol is not thinked to upload great amounts of data, so the use of form posts, in any language, to send big files will result in terribly long waits for the postback. Usually ends with users getting tired of wait, thinking that the page has hanged and aborting the proccess.

    The best option to this type of uses usually is to implement a ftp upload. Usually I've worked with third party components for ASP pages to make ftp uploads, but I'm pretty sure that should be developed components to integrate this inside php (maybe even php itself has it's own ftp posting methods).

    I strongly recommend not use http protocol to such size files if you want your project to be succesful.
    LVL 12

    Expert Comment

    by:Mohamed Abowarda
    LVL 107

    Expert Comment

    by:Ray Paseur
    Upload a 3GB file via HTTP?  Probably not a good idea.  PHP has some FTP functions that might be better suited to this.

    But speaking in a practical sense, it might even be better to have the client burn a DVD and send it via courier.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now