image resizing - PHP: Out of memory as soon as upload_max_filesize is set


I am uploading and resizing images on my website and I got an

Out of memory (allocated 89391104) (tried to allocate 20736 bytes)

error. So I set memory_limit = 700M in php.ini. It worked, I could upload the whole form, but the image was not uploaded. I checked the error, it was

The uploaded file exceeds the upload_max_filesize directive in php.ini

Than I addedupload_max_filesize = 50M to php.ini and now I receive the "Out of memory" error again. Any ideas why this could happen and how I can fix it?

People are also looking for solutions to the problem: php - Call to a member function on null error CodeIgniter


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.