문제

I am doing a file resizer feature, and when I use very high resolution images, I get this fatal error:

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to
 allocate 8884 bytes) in /path/resizer.php on line 35

(resizer.php is the resizer class) Then, when I use ini_set('memory_limit', '64MB');

.. in front of the whole block: if (isset($_FILES....)) ... And i get this fatal error:

 PHP Fatal error:  Allowed memory size of 262144 bytes exhausted (tried to 
allocate 8884 bytes) in path/resizerenter code here.php on line 35

Please note that the allocated memory has decreased while I requested an increase. Please let me know if you know what is wrong. Thanks a lot

도움이 되었습니까?

해결책

check the php.ini setting: memory_limit

Maybe is already more than 64M. In case you can

   ini_set('memory_limit', '128M'); or 256...

Operations with big images can happen to use huge memory!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top