You are here: Re: imagecreatefromjpeg problem « PHP Programming Language « IT news, forums, messages
Re: imagecreatefromjpeg problem

Posted by bernie on 10/15/30 11:19

Andy Hassall wrote:
> OK, this points straight to memory_limit being enabled. A 600k JPEG will
> decompress to several megabytes of raw image data in memory.
>

Thanks for the reply. Yeah, I thought the same thing at first.
memory_limit is set to 8M according to phpinfo(). This is the same as
my dev server, so I didn't think that was the issue.

>
> You may well have enough memory for the first image, then you run out on the
> second.
>

I am making two images (for each image uploaded, im just testing with
one image though). I tried commenting out each of them one at a time, I
get the same result.

> Check what memory_limit is set to in php.ini.
>
> http://uk2.php.net/manual/en/ini.core.php#ini.memory-limit
>
> You might be able to override it to a higher value.
>

Ah, this is the ticket. I didn't realy think of looking into this for
the above reasons, but I created an .htaccess file with this line:

php_value memory_limit "16M"

I can now upload, size, and thumbnail all three images.

Thanks again for your help!
--
bernie

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация