Results 1 to 9 of 9
  1. #1

    PHP filesize limits

    I am putting together a script to allow users to upload files to my server through my members area.

    Does anyone know if there is a limit on the size of the files that can be transfered using PHP?

    One of my programmers has told me the limit is 2mb without the script timing out, does anyone know if this is true, and if so any way around it?

    All advise appreciated.

    Thanks

  2. #2
    Join Date
    Nov 2005
    Location
    USA
    Posts
    874
    Not sure the exact limit (there are so many tweals) I know it is way more the 2MB though.... Also depends on your server resource and link speed.
    GS RichCopy 360 Enterprise - Voted #1 for data migration and replication in terms of performance and features. Replicate data across between servers in the same network, WAS, or even across the internet

  3. #3
    Join Date
    Mar 2004
    Posts
    1,301
    if you own your server, you can change the file size limit from 2 MB to larger - just modify the file php.ini

  4. #4
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    3,104

    Lightbulb

    Quote Originally Posted by orbitz
    if you own your server, you can change the file size limit from 2 MB to larger - just modify the file php.ini
    some webhost allow to do on shared hosting and php.ini besed per user directory.
    Low Cost Storage VPS plans at webprovps.com
    VPS Price Match Guarantee on: All our range of DDOS protected XEN HVM VPS
    == Contact us for any online solution development or managed / unmanaged vps hosting ==

  5. #5
    Join Date
    Mar 2005
    Location
    Athens, Greece
    Posts
    1,528
    Ask kindly your webhost to increase the limit to a reasonable size (most hosts I use have set the limit to 8M).

  6. #6
    Join Date
    Jul 2005
    Location
    A Gigopolis In The Making
    Posts
    316
    my host set it to 5MB. I personally request them to remove it after some time.
    NoFrillsLogo.com - Never pay more for your logo!

    Professional Design & Low Prices. We Design Until You are Satisfied Guaranteed!
    Click Here To Boost Your Company Profit With a Real Logo

  7. #7
    Join Date
    Jun 2005
    Location
    CA, USA
    Posts
    140
    Is there a way to change it in your .htaccess file? I know I can change certain php variables like turing global vars on or off etc. this way. (CPanel User)

    Robert Davis

  8. #8
    Join Date
    Mar 2006
    Posts
    965
    By creating a new PHP info file with:

    PHP Code:
    <?php
    @phpinfo();
    ?>
    you should be able to run that file from your web browser and see the upload limit size before time out occurs.

  9. #9
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    Even if you change this to a large number, the browser may timeout waiting for your file to transfer over. There is a reason for the limit
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

Posting Permissions

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