I'm facing problem while trying new installation of magento on server. When I extract the zip file and access by browser then that bellow error comes:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 64314 bytes) in C:\HostingSpaces\mygarden\mygarden.pk\wwwroot\app\Mage.php on line 907

I changed memory limit to 256 in .htaccess and also changed memory limit in php.ini file.

but issue never resolved, please reply me with good solution



1 Answer 1


Bumping your memory limit to 512M should help with your situation. Try that and see if you still have issues.

Are you on shared hosting? Does your provider allow you to tweak your settings?

In PHP.ini:

memory_limit 512M

In .htaccess:

php_value memory_limit 512M

  • in which file? in php.ini file or .htaccess file?
    – mawais24
    Jan 5, 2015 at 7:06
  • i change memory limit 256 to 512 in php.ini file but still got same error :-(
    – mawais24
    Jan 5, 2015 at 7:12
  • 536870912 bytes exhausted ...
    – user2857
    Jan 5, 2015 at 10:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.