Professional Web Applications Themes

[PHP] fwrite, fopen, or fread limit? - PHP Development

[snip] Does anyone know if the commands for fwrite, fopen, or fread have memory limits in dealing with large files? I created a system for uploading files to a server. Small files work fine. Larger ones (around 7 megs) do not work at all. [/snip] Have you checked your upload_max_filesize in php.ini?...

  1. #1

    Default RE: [PHP] fwrite, fopen, or fread limit?

    [snip]
    Does anyone know if the commands for fwrite, fopen, or fread have memory
    limits in dealing with large files?

    I created a system for uploading files to a server. Small files work
    fine.
    Larger ones (around 7 megs) do not work at all.
    [/snip]

    Have you checked your upload_max_filesize in php.ini?
    Jay Guest

  2. #2

    Default RE: [PHP] fwrite, fopen, or fread limit?


    Yes, that was it.

    Thanks! :)

    -Mike

     
    > work fine. 
    >
    >
    >[/ref]
    Mike Guest

  3. #3

    Default RE: [PHP] fwrite, fopen, or fread limit?

    I highly doubt that was all. Now uploads bigger than 7megs are allowed, you
    should also make sure your script is able to deal with it files LARGER than
    that. Hmm, maybe this didn't seem to make much sense.

    What I'm talking about is this:

    memory_limit = 8M ; Maximum amount of memory a script may
    consume (8MB)

    When using fwrite you probably load the entire file into memory and have a
    high chance on exceeding the size of 8MB. Or if you're smart you do it line
    by line and there's less problem with it.

    Also I'd like to point you to the "move_uploaded_file" function. Just in
    case you didn't know about it.

    Greetz,
    Wouter

    ( sorry for the messy kinda post. I'm just all too confused about the
    disappointing Matrix Revolutions... I'd like to compare it to a third-level
    rip off of The Lord of the Rings (trilogy) meets Star Wars )

    -----Original Message-----
    From: Mike At Spy [mailto:com]
    Sent: Tuesday 04 November 2003 18:55
    To: Roger Spears
    Cc: php.net
    Subject: RE: [PHP] fwrite, fopen, or fread limit?


    Yes, that was it.

    Thanks! :)

    -Mike

     
    > work fine. 
    >
    >
    >[/ref]

    --
    PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
    http://www.php.net/unsub.php
    Wouter Guest

Similar Threads

  1. fwrite
    By Jean in forum PHP Development
    Replies: 4
    Last Post: April 30th, 04:47 PM
  2. fwrite() help needed
    By Craig Keightley in forum PHP Development
    Replies: 3
    Last Post: September 19th, 07:09 AM
  3. 4.3.2 fopen() problem/limit?
    By Mike Yrabedra in forum PHP Development
    Replies: 1
    Last Post: July 17th, 03:24 PM
  4. [PHP] 4.3.2 fopen() problem/limit?
    By Mike Yrabedra in forum PHP Development
    Replies: 2
    Last Post: July 17th, 01:05 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139