We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

No data received error while uploading images

Hey everyone. I get a 'no data received' error while uploading images. I upload images and after that I crop them to specific sizes using Imagick Adapter. The problem shows up when I try to upload several images in all browsers. For one or two images it works fine. Has anyone got a similar problem or might direct in any way to the solution?

Thanks for all replies! :)



43.9k

Hi,

did you check "max_file_uploads" directive in php.ini ?



3.0k
edited Sep '14

That's a dump from phpinfo:

max_execution_time 30 30

max_file_uploads 20 20

max_input_nesting_level 64 64

max_input_time 60 60

max_input_vars 1000 1000

memory_limit 128M 128M

post_max_size 8M 8M

Do you think it might be a post_max_size? What's funny, the problem occured for the first time after moving the application from localhost to Linux based server.



43.9k

are these values the ones from your server ?

regarding post_max_size, php doc says:

If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty



3.0k

I'll try to compare each value and see what will happen. So far I've changed a value of postmaxsize and the problem still occurs.



43.9k
edited Sep '14

check also upload_max_filesize directive ...



3.0k

I think I figured it out. I'll have to contact with admin of my server probably but it turned out that max_file_uploads is set to 20 on my server while it is 100 on localhost. After sending an image in its natural size and saving it on my server and after cropping it to 6 different sizes I save 7 files. Multiplying by 3 it gives 21 files that are saved. I tried to do the same but cropping only to 5 sizes what gives 3x6 = 18 files and it works (the same photos).

I am not sure if that's the reason. I'll give a feedback when I already know.



43.9k

good luck ;-)