how to upload file of large size

Discussion in 'PHP' started by rafiqasad, Jan 11, 2007.

  1. #1
    Here is my code but it not work properly. I want to upload a file that is of size 50mb but fail to do so
    
    <td><label for="file">Filename:</label></td>
    								<input type="hidden" name="upload_max_filesize" value="30000000000000000" />
    								<input type="hidden" name="max_input_time" value="30000" />
    								<input type="hidden" name="max_execution_time" value="30000" />
    								<input type="hidden" name="post_max_size" value="30000" />
    								<input type="hidden" name="memory_limit" value="30000000000000000000000000" />								
    								<td><input type="file" name="userfile" id="file" class="button"/></td>
    
    move_uploaded_file($_FILES["userfile"]["tmp_name"], "../file/" . $filename)
    
    PHP:

     
    rafiqasad, Jan 11, 2007 IP
  2. Notorious

    Notorious Well-Known Member

    Messages:
    903
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    145
    #2
    you have to increase the post_max_size in the php.ini
     
    Notorious, Jan 11, 2007 IP
  3. rafiqasad

    rafiqasad Member

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    this will not work
     
    rafiqasad, Jan 11, 2007 IP
  4. rafiqasad

    rafiqasad Member

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    this is not working i am increasing the value in post_max_size
     
    rafiqasad, Jan 11, 2007 IP
  5. B.V.E.

    B.V.E. Peon

    Messages:
    106
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Try changing both post_max_size and upload_max_filesize in your php.ini file. Optionally, you might also try increasing the memory_limit var (normally set to only 8MB) Let us know if this solves your problem :)
     
    B.V.E., Jan 11, 2007 IP
  6. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #6
    koolasia, Jan 11, 2007 IP