~ Question --- Upload Size Limits ?

Discussion in 'Programming' started by jleeinc, Dec 8, 2010.

  1. #1
    We have a script that uploads images and documents as well as audio files ... if i understand correctly, default limits are like 2mb or 8mb .... but our client is needing to upload some files that are in the 50-100mb size range .... is there an easy way of increasing file upload limits? I've read about the php.ini and/or .htaccess but not 100% if that is what we need or not ... also, this site is on a shared server ...

    Any insight and/or help is more than appreciated ...


    Thanks in advance, Jerimy.
     
    jleeinc, Dec 8, 2010 IP
  2. bm4web

    bm4web Well-Known Member

    Messages:
    718
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    The script that you are using was written in php?
     
    bm4web, Dec 8, 2010 IP
  3. Yuuko008

    Yuuko008 Member

    Messages:
    682
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    33
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I suggest that you upload using ftp software. Is the site wordpress?
     
    Yuuko008, Dec 8, 2010 IP
  4. jleeinc

    jleeinc Well-Known Member

    Messages:
    408
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    As Seller:
    100% - 0
    As Buyer:
    100% - 1
    #4
    @bm4web - yes it's php scripting

    @Yuuko008 - i agree, we certainly can upload via ftp, but I'm trying to make it easier for the client ... and no this project is not Wordpress


    Thanks
     
    jleeinc, Dec 8, 2010 IP
  5. bm4web

    bm4web Well-Known Member

    Messages:
    718
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    OK, fine you can able to upload only 8mb of files maximum as of now? also contact you server support regarding this... one more thing ask them to increase server timeout...

    Are you getting timeout error...
     
    bm4web, Dec 8, 2010 IP
  6. helloguys12345678

    helloguys12345678 Greenhorn

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    All the other people are asking the wrong question. Just change the max upload limit in your php.ini
    Depending on the host, some allow you to change it yourself while other hosts need you to contact them.
     
    helloguys12345678, Dec 8, 2010 IP
  7. itliberty

    itliberty Peon

    Messages:
    1,173
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Is the script yours? Are you sure the restriction isnt in the script itself (if you didnt write it). Just another place to look. php.ini coltrols this but so do many scripts (mine do anyway)!
     
    itliberty, Dec 8, 2010 IP
  8. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    You were on the right track with the .htaccess and php.ini suggestions. Basically, the max upload limit is a PHP server setting; depending on the configuration of the server, you can possibly tweak it.

    For example, if you're running an Apache web server you could create an .htaccess file in your document root and in it use:
    php_value post_max_size 50M
    php_value upload_max_filesize 50M
    php_value max_execution_time 900
    Code (markup):
    This will essentially allow you to upload files up to 50M with a maximum execution time of 15 minutes.

    If that doesn't work, you could try creating a custom php.ini file in your document root:
    post_max_size = 50M
    upload_max_filesize = 50M
    max_execution_time = 900
    Code (markup):
    If that doesn't work, you'll need root access to the server to make a global change to the server. If you're on a shared host, you've got no chance, as they won't tweak the server configuration for a single account. If you do have root access, you'll have to edit the php.ini file at a root level (the exact folder it will be found in depends on your OS and PHP version).
     
    Alex Roxon, Dec 9, 2010 IP