Localhost upload image error

I am getting a consistent php POST / 500 error when attempting to upload this particular image on localhost, but not on remote host:

karikis-workshop.jpg JPEG 2000x1116 2000x1116+0+0 8-bit sRGB 2.518MB 0.000u 0:00.000

/edit
Resizing the image 50% with imagemagick works:

karikissmall.jpg JPEG 1000x558 1000x558+0+0 8-bit sRGB 651KB 0.000u 0:00.010
edit/

This is the full error:

POST http://localhost/curro/tiottc/panel/pages/editions/appraisal-obtenente/exhibitions/mendelson-copper/upload?csrf=3ua1y80EebG3Wv5nnxNq2Ltc5Yj9Od0B 500 (Internal Server Error)
r @ panel.min.js?v=2.5.5:formatted:9432
s @ panel.min.js?v=2.5.5:formatted:9436
t.upload @ panel.min.js?v=2.5.5:formatted:9446
i @ panel.min.js?v=2.5.5:formatted:9920
(anonymous) @ panel.min.js?v=2.5.5:formatted:9947
dispatch @ panel.min.js?v=2.5.5:formatted:4727
g.handle @ panel.min.js?v=2.5.5:formatted:4619

I can’t find anything in apache2 error logs, unsure about the level of error reporting tho.

Thanks

The image is 2.5mb in size. Check these two settings in PHP.ini on your local:

upload_max_filesize = 10M
post_max_size = 10M

Set them to 10M if they are low. I suspect one or both of them is lower then 2.5mb.

Might also be worth checking the value of the memory limit:

memory_limit = 64M

It needs to be high enough to work with large images. I would set it to 128mb.

1 Like

You are right, my upload max is 2M.

solved!

Thank you very much