Config php ini file for upload files

Oto Shavadze picture Oto Shavadze · Sep 4, 2012 · Viewed 19.5k times · Source

I have a page for upload files, In .htaccess file I have this:

php_value upload_max_filesize 40M
php_value post_max_size 40M

I have an img, with size 1.6 MB. When I am trying to upload this image, I obtain the error below.

Fatal error: Allowed memory size of 54525952 bytes exhausted (tried to allocate 3600 bytes) in....

Does anyone know how to solve this problem?

Answer

diEcho picture diEcho · Sep 4, 2012

if you can cant access php.ini on server then write below in your .htaccess file

php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M