PHP 8.5.0 Alpha 4 available for testing

Voting

: nine minus four?
(Example: nine)

The Note You're Voting On

Zane, MegaLab.it
14 years ago
My script was unable to complete: Fatal error: Allowed memory size of XX bytes exhausted (tried to allocate XX+n bytes).

I found out that PHP handles images in uncompressed format: my input image was 8768x4282@32 bit => ~150 MB per single in-memory copy.

As a solution, you can either check the dimensions and reject anything too big or, as I did, use ini_set('memory_limit','1024M'); on the page start (if your server has enough on board memory).

<< Back to user notes page

To Top