SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    please help me with file upload upto 100mb in php

    Hi Everyone
    i am trying to upload files with filesize upto 100mb.
    I am successfull to upload on localhost as i have configured php.ini for
    some variables.
    as
    1) upload_max_filesize
    2) post_max_size
    3) max_execution_time
    4) max_input_time
    5) memory_limit

    But i want to make this thing via code, as on shared server i wont be able
    to have access to php.ini file,...

    so i tried to do this with ini_set() function which is not working ..
    and i am not able to upload the bigger sized files withiout configuring
    php.ini which i desperately want to.

    Please help me. Its really urgent.

    Thanks & Reards.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Moved to PHP where the question is more appropriate.

    Honestly, the quickest answer would be to switch hosting scenarios. Then again, I doubt if you will find too many shared hosts that will let you handle stuff like this. I would not want my random $5.00 a month accounts uploading 100mb files via PHP either.

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,156
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    resources

    It may be that your shared host does not want you to over-ride some settings. You could move to a dedicated host, that way you don't have to worry about your scripts bogging down the server and upsetting other site owners. Or maybe you could use FTP instead?

  4. #4
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I think your best option is to upgrade to a dedicated web server with lots of bandwidth and memory. The internet connections must be huge aswel.

    It would probably be more suitable to allow the uploaders limited(if you want) FTP accounts, which means they can add a file to an upload folder, but not have access to anything else. It would probably be faster than HTTP upload aswell.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  5. #5
    SitePoint Wizard Hammer65's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln Nebraska
    Posts
    1,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The reason ini_set doesn't work, is that by the time your code is executed, the file has already been deposited on the server. The file goes in tmp before script execution. It is part of the HTTP request, your script is part of the response.

    Same goes for trying to set register_globals or magic_quotes via ini_set. You may be able to use httaccess to set those values but FTP is a much better solution than HTTP file upload for things that big. You could run a cron to transfer files from a ftp drop box to wherever they needed to be.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •