Reputation: 540
I created a joomla site on my shared hosting this morning. Everything was going great, I was uploading content. And suddenly when I went to create my third category, I got the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /home/mysite/public_html/libraries/phputf8/utils/unicode.php on line 208
I tried max_execution
in a custom php.ini but it has still not helped me.
I am unable to contact my hosting company as they do not have a support forum or anything.
Is there any way to repair this issue?
Upvotes: 3
Views: 8248
Reputation: 101
I just had a customer with a very similar problem. They have a cPanel site, where the default memory allotment was set as 32M. I found another forum where they suggested adding the line below to both the index.php in the Joomla home space, and also in the index.php file in the administrator folder. Worked like a charm. I added it directly below the opening php tag.
ini_set('memory_limit','64M');
This answer was found at http://www.robertwent.com/blog/joomla/19-joomla-increase-php-local-memory-limit-without-changing-server-settings
Hope it works for you
(this is my first "answer" on this site ... apologies if I've not answered in the the site's official way)
Upvotes: 0
Reputation: 5615
@Dasun is right, 32 mb is an awful lot of memory:
turn the debug feature on (administrator -> global configuration -> system -> debug system) and you'll see who's eating up so much memory. If you can't get rid of the module/component, try to enable cache with a long timeout.
And definitely change hosting provider as soon as possible!
Upvotes: 2
Reputation: 9330
Yep get a new host — how they function without a means of contacting them is beyond me.
The error is saying that you've only got a 32Mb allowance for PHP to run in and when PHP tried to allocate more than that it failed.
You could try increasing the setting for PHP in a site based php.ini
file. e.g.
memory_limit=64M;
Or, if a local php.ini
doesn't work you could try adding in this to the top of your .htaccess
(assuming you're on a LAMP server)
php_value memory_limit 64M
If your host allows it this will override the memory_limit
setting for just that site.
Upvotes: 0