Re: Problems Uploading a File



NN wrote:
On Wed, 12 Nov 2008 06:25:45 +0100, "J.O. Aho" <user@xxxxxxxxxxx>
wrote:

NN wrote:
I have a script that uploads a JPG and then resizes it. it works fine
with files up to abouot 1.6M, but when i try a file that is about 4M i
get the following error message:

Fatal error: Out of memory (allocated 33292288) (tried to allocate
15552 bytes) in path-to/includes/file-upload-resize.inc.php on line 83

looking at the php.ini of my hosting service i gatherer the following:
memory_limit 40M 40M
You need to increase the amount allowed memory used,

memory_limit = 128M

thank you for your advice.
unfortunately, my server doesn't allow an increase in memory since
it's a shared server.
i'll have to limit the uploads to about 2MB.

The problem you have has to do with the amount of RAM you allow PHP to use,
and it needs more to be able to use gd. This hs nothing to do with the amount
of disk space and according to what you wrote earlier you are assigning 40MB
at the moment. I hope it don't say what you wrote in your php.ini, as that
ain't a correct syntax.


--

//Aho
.



Relevant Pages

  • Re: Problems Uploading a File
    ... get the following error message: ... Out of memory (tried to allocate ... it's a shared server. ... The problem you have has to do with the amount of RAM you allow PHP to use, ...
    (alt.php)
  • Re: New and Delete memory operators
    ... > I need an amount of memory and I do it with "new".The function is ... > finished and I have to free that memory. ... If you have a bug that writes data incorrectly into the heap it can ...
    (comp.programming)
  • Re: Problems Uploading a File
    ... get the following error message: ... Out of memory (allocated 33292288) (tried to allocate ... it's a shared server. ...
    (alt.php)
  • Re: Memory errors
    ... amount of memory ... what is happening immediately before the error message is received ... In computer terms corrupt is corrupt! ...
    (microsoft.public.excel.misc)
  • Re: New and Delete memory operators
    ... >I need an amount of memory and I do it with "new".The function is ... >finished and I have to free that memory. ... you allocated or because you overwrote some other bit of memory you allocated ...
    (comp.programming)