Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 31436096 bytes)

user1544878 picture user1544878 · Jul 23, 2012 · Viewed 14.2k times · Source

I'm new to Joomla and I'm now using Joomla 1.6

The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message:

"Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 31436096 bytes)
 in C:\AppServ\www\libraries\joomla\filesystem\file.php on line 295"

I've read some relevant messages but didn't get it solved. The phpinfo returns a value which I think may be relevant:

1)upload_max_filesize      local value=200; master value=200

Am I correct? If yes, how can I change it? (I can't remote to the server.)

Answer

Vins picture Vins · Jul 23, 2012

Seems to be you're running out of the allowed memory size.

Try to optimize your code and query.

Also you can change the php ini settings.

Here is the one .htaccess solution

php_value memory_limit 1000M
php_value max_execution_time 6000000

I've added arbitrary values, just change based on your requirements. And put this .htaccess at your projects root folder such that this changes will only be applicable to your project folder...