Uploading with PHP

Discussion in 'PHP' started by LanceT, Jan 22, 2007.

  1. #1
    I hear that uploading via PHP has file size limits, what are the limits and how can I change them?
     
    LanceT, Jan 22, 2007 IP
  2. BIGC

    BIGC Peon

    Messages:
    612
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to edit it in php.ini file of your server.

    If you dont have zend opti you will find it at etc/php.ini

    Find for

    ;;;;;;;;;;;;;;;;
    ; File Uploads ;
    ;;;;;;;;;;;;;;;;

    ; Whether to allow HTTP file uploads.
    file_uploads = On

    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    ;upload_tmp_dir =

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 2M


    And you can edit the variables

    After editing save and restart apache.
     
    BIGC, Jan 22, 2007 IP
  3. zurc

    zurc Banned

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    change it in the code? or in the php.ini??
     
    zurc, Jan 23, 2007 IP
  4. scriptdance

    scriptdance Active Member

    Messages:
    340
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #4
    php.ini
    upload_max_filesize
    post_max_size
     
    scriptdance, Jan 23, 2007 IP