Professional Web Applications Themes

Newbie help - upload problem - PHP Development

I am stuck between my programmer (who is away) and a customer (who is irate) and I know nothing about PHP :-( The customer has the facility to upload images (of any sort) to an imagebank and doents (of any sort) to a doent bank. However, when attempting to upload into the imagebank the following error is reported. Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3 bytes) in /home/nas06ent/g/*domain*/user/htdocs/lib/class.pdfbank.inc.php on line 286 (The ISP has an upload limit of 8 meg but the file in question was a 500k image file (jpg extension)). Line 286 ...

  1. #1

    Default Newbie help - upload problem

    I am stuck between my programmer (who is away) and a customer (who is irate)
    and I know nothing about PHP :-( The customer has the facility to upload
    images (of any sort) to an imagebank and doents (of any sort) to a
    doent bank. However, when attempting to upload into the imagebank the
    following error is reported.

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    allocate 3 bytes) in
    /home/nas06ent/g/*domain*/user/htdocs/lib/class.pdfbank.inc.php on line 286

    (The ISP has an upload limit of 8 meg but the file in question was a 500k
    image file (jpg extension)).

    Line 286 in class.pdfbank.inc.php reads $thisfile=explode(" ",$thisfile);

    Could anyone throw any light on this, specifically if you think its an ISP
    problem or a coding problem? (I am puzzled as to why the PHP file is named
    class.pdfbank.inc, but that may be just be me displaying my ignorance.

    I'd be very grateful for any help and advice.

    Ted


    Ted Rogers Guest

  2. #2

    Default Re: Newbie help - upload problem

    "Ted Rogers" <tedhotmail.com> wrote in message
    news:1066242707.8421.0echo.uk.clara.net...
    > I am stuck between my programmer (who is away) and a customer (who is
    irate)
    > and I know nothing about PHP :-( The customer has the facility to upload
    > images (of any sort) to an imagebank and doents (of any sort) to a
    > doent bank. However, when attempting to upload into the imagebank the
    > following error is reported.
    >
    > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    > allocate 3 bytes) in
    > /home/nas06ent/g/*domain*/user/htdocs/lib/class.pdfbank.inc.php on line
    286
    >
    > (The ISP has an upload limit of 8 meg but the file in question was a 500k
    > image file (jpg extension)).
    >
    > Line 286 in class.pdfbank.inc.php reads $thisfile=explode(" ",$thisfile);
    >
    > Could anyone throw any light on this, specifically if you think its an ISP
    > problem or a coding problem? (I am puzzled as to why the PHP file is named
    > class.pdfbank.inc, but that may be just be me displaying my ignorance.
    >
    > I'd be very grateful for any help and advice.
    I would suggest it's a coding problem but what are the dimensions of the
    file? If it's more than 2,300,000 pixels you're going to hit 8Mb by the time
    you've converted it into a 24bit color image and done anything with it.
    Therefore, you may be doing some sort of image manipulation or maybe adding
    it to a PDF (judging by the script name) that may take you over that limit.
    Does your script work with a smaller file? If this is a JPEG, try reducing
    the quality to 400Kb, 300Kb, etc or by clipping it to a physically smaller
    image.

    Paulus


    Paulus Magnus Guest

  3. #3

    Default Re: Newbie help - upload problem

    I am not exactly sure, but the error you are getting is not because of the
    size of file. It is the amount of memory your script is consuming and looks
    like its consuming more than 8 M. You should probably change

    memory_limit = 8M ;

    this line in php.ini to allow more memory.

    sanjay

    "Ted Rogers" <tedhotmail.com> wrote in message
    news:1066242707.8421.0echo.uk.clara.net...
    | I am stuck between my programmer (who is away) and a customer (who is
    irate)
    | and I know nothing about PHP :-( The customer has the facility to upload
    | images (of any sort) to an imagebank and doents (of any sort) to a
    | doent bank. However, when attempting to upload into the imagebank the
    | following error is reported.
    |
    | Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    | allocate 3 bytes) in
    | /home/nas06ent/g/*domain*/user/htdocs/lib/class.pdfbank.inc.php on line
    286
    |
    | (The ISP has an upload limit of 8 meg but the file in question was a 500k
    | image file (jpg extension)).
    |
    | Line 286 in class.pdfbank.inc.php reads $thisfile=explode(" ",$thisfile);
    |
    | Could anyone throw any light on this, specifically if you think its an ISP
    | problem or a coding problem? (I am puzzled as to why the PHP file is named
    | class.pdfbank.inc, but that may be just be me displaying my ignorance.
    |
    | I'd be very grateful for any help and advice.
    |
    | Ted
    |
    |


    s a n j a y Guest

  4. #4

    Default Re: Newbie help - upload problem


    "s a n j a y" <someonesomewhere.com> wrote in message
    news:z4hjb.2141$8x2.1336302newssrv26.news.prodigy .com...
    > I am not exactly sure, but the error you are getting is not because of the
    > size of file. It is the amount of memory your script is consuming and
    looks
    > like its consuming more than 8 M. You should probably change
    >
    > memory_limit = 8M ;
    >
    > this line in php.ini to allow more memory.
    >
    > sanjay
    >
    Thanks Sanjay

    Unfortunately I am using a commercial ISP with a reseller account and they
    won't make such changes on the server boxes. Its strange as I have had 5 or
    6 other such sites built (by other programmers) and they work fine. This one
    has been built by a new guy (albeit based on the others).

    Incidentally, I just ried uploading a 100k text file to the doent bank
    and get the same error........

    Ted


    Ted Rogers Guest

  5. #5

    Default Re: Newbie help - upload problem

    I dont know of any other way to do this. If you would like to try use "php
    Allowed memory size of 8388608 bytes exhausted" in google.

    sanjay


    "Ted Rogers" <tedhotmail.com> wrote in message
    news:1066255060.12120.0dyke.uk.clara.net...
    |
    | "s a n j a y" <someonesomewhere.com> wrote in message
    | news:z4hjb.2141$8x2.1336302newssrv26.news.prodigy .com...
    | > I am not exactly sure, but the error you are getting is not because of
    the
    | > size of file. It is the amount of memory your script is consuming and
    | looks
    | > like its consuming more than 8 M. You should probably change
    | >
    | > memory_limit = 8M ;
    | >
    | > this line in php.ini to allow more memory.
    | >
    | > sanjay
    | >
    | Thanks Sanjay
    |
    | Unfortunately I am using a commercial ISP with a reseller account and they
    | won't make such changes on the server boxes. Its strange as I have had 5
    or
    | 6 other such sites built (by other programmers) and they work fine. This
    one
    | has been built by a new guy (albeit based on the others).
    |
    | Incidentally, I just ried uploading a 100k text file to the doent bank
    | and get the same error........
    |
    | Ted
    |
    |


    s a n j a y Guest

  6. #6

    Default Re: Newbie help - upload problem

    "Ted Rogers" <tedhotmail.com> wrote in message
    news:1066255060.12120.0dyke.uk.clara.net...
    >
    > "s a n j a y" <someonesomewhere.com> wrote in message
    > news:z4hjb.2141$8x2.1336302newssrv26.news.prodigy .com...
    > > I am not exactly sure, but the error you are getting is not because of
    the
    > > size of file. It is the amount of memory your script is consuming and
    > looks
    > > like its consuming more than 8 M. You should probably change
    > >
    > > memory_limit = 8M ;
    > >
    > > this line in php.ini to allow more memory.
    > >
    > > sanjay
    > >
    > Thanks Sanjay
    >
    > Unfortunately I am using a commercial ISP with a reseller account and they
    > won't make such changes on the server boxes. Its strange as I have had 5
    or
    > 6 other such sites built (by other programmers) and they work fine. This
    one
    > has been built by a new guy (albeit based on the others).
    >
    > Incidentally, I just ried uploading a 100k text file to the doent bank
    > and get the same error........
    It appears that you've got a loop in your script that's consuming resources
    but only a programmer could help to figure out the problem.

    Paulus


    Paulus Magnus Guest

Similar Threads

  1. images upload-newbie
    By gamike in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: November 20th, 10:49 PM
  2. Problem with CGI::Upload using IIS v5.1
    By BGorman in forum PERL Modules
    Replies: 2
    Last Post: November 17th, 03:38 PM
  3. [PHP] file upload problem
    By Jim Lucas in forum PHP Development
    Replies: 9
    Last Post: October 20th, 08:03 PM
  4. Upload problem
    By pomana in forum PHP Development
    Replies: 8
    Last Post: September 8th, 03:29 AM
  5. File Upload Problem - nothing in /tmp
    By Leigh Riley in forum PHP Development
    Replies: 1
    Last Post: August 27th, 09:28 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