I have the following line of code, at the start of a function:
$name contains the full server path to the non-publically accessible folder that contains the image, which is a 4.4MB JPG.
Normally when this problem has occurred, PHP needs more memory than is allocated to open the compressed image, and issuing a
ini_set command to raise the member to 128MB solves the problem. However, in this case, it does not. I've tried raising to 256, 512 and 1024MB and still it comes back with an error:
Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 17152 bytes) in /imgprocess.php on line 83.
I've even tried using the (contraband!) -1 to allow unlimited memory, just to see if something was causing it to go sky high, but still no go.
I've tried a different image file incase it was a bad JPG, still no go.
¿Cómo se puede solucionar esto?
EDIT: I should add that PHP isn't in Safe Mode
preguntado el 10 de marzo de 12 a las 16:03