Debian - Symfony 2 - The file "file" exceeds your upload_max_filesize ini directive (limitation is 2048 kb). (500 - internal server error)

I am trying to deploy my Symfony 2 application on a debian server. The site works very well. However, I encounter this problem for uploading an image ...

I am trying to upload an image and my RestFul API returns this error:

The file "file.JPG" exceeds your upload_max_filesize ini directive (limit is 2048 kb). (500 Internal Server Error)

I checked on the Internet how to solve this problem. Apparently I need to change the value

upload_max_filesize = 2M

I changed the value for 20M. I also changed post_max_size. My new configuration:

upload_max_filesize = 20M
post_max_size = 20M

After the upgrade, I restarted the server with this command:

/etc/init.d/apache2 reload

This does not change anything. I still have the same error: / I am root, so this is not a permission issue. With php info, I found php.ini, so I think I'm modifying the correct file.

I do not see other solutions ...

+4
1

@nifr , php php , phpinfo(). Loaded Configuration file, , , php -i | grep "Configuration File".

php, php.ini. , phpinfo().

+3

Source: https://habr.com/ru/post/1525849/


All Articles