Allowed memory size exhausted in both Joomla and Drupal - php

I am trying to set up a website using Joomla and this is the error I get after accessing localhost (right after successful installation process):
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 98304 bytes) in [...]\default_item.php on line 77
The same thing happens when using Drupal (before installation though). I have already tried changing php.ini (in location given by Joomla itself, so it's the right one. Interestingly, website on localhost does not work, while admin panel on localhost/administrator works, that's where I got the file location from) to look like this:
memory_limit = 512M
I also tried putting ini_set('memory_limit', '512M'); inside the script indicated in error and freeing some of my RAM, but still - no success.
I use WebServ, which uses Apache 2.2.6 and PHP 5.2.5.
What more can I do to overrun this problem?
Edit:
Output of phpinfo(); for Joomla

ini_set('memory_limit', '-1'); overrides the default PHP memory limit.
By the way look out for never ending loops. It might be causing the error.

Related

Fatal error in WordPress, "Allowed memory size of X bytes exhausted"

I am a WordPress beginner and I have only rudimentary knowledge about CSS and HTML. I have built a WordPress blog in the last days, and it was working well. But since two days I couldn't login and couldn't open the page (but I haven't touch the page since about one week, I don't know what happened). This is what was shown:
Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 30720 bytes) in /home/u0087038969/public_html/wp-admin/includes/deprecated.php on line 533
I suggested that one of the installed plugins caused this trouble. That's why I changed the name of the plugin file via FileZilla, so that I get access to WordPress again. Then I tried to reactivate the plugins gradually to find the trouble-maker. Still it's not really working. What can I do to go about solving the problem?
p.s. I used the following wp plugins: mail poet, all in one seo and contact form 7.
The problem is your installation is requiring more memory than you have available for your site. If you are using a shared hosting environment, you might be at a loss in increasing your memory allotment.
Try updating your wp-config file:
define('WP_MEMORY_LIMIT', '256MB');
If you can change your PHP.ini file you can adjust this:
php_value memory_limit 256MB
Your host seems to have this set incredibly low if it's giving you a memory error at 50MB.

Wordpress memory error

I just installed a plug in I had purchased named "Timely Pro". Its an interactive calender program that allows the administrator to post new events with a description and images. Whenever I go into the back end and try view all of the events I've created, it throws this error:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /home/content/75/10928675/html/wp-includes/wp-db.php on line 1551
I changed my memory limit in both php.ini and wp-config to 512M
php.ini: memory_limit = 512M
wp-config.php: define('WP_MEMORY_LIMIT', '512M');
Changing this did nothing for the error. Does anyone know any other definitions somewhere that could be causing this error?
A couple of things you could check/try:
Verify that you've restarted Apache.
Verify that you are editing the right php.ini file. I use MAMP and each version of PHP naturally has its own copy. I made this mistake once before.
Check your Apache config's memory limit (e.g., httpd.conf). This SO answer might be of help: https://stackoverflow.com/a/14573923.

WordPress: Upload Plugin stuck at "Unpacking the packageā€¦", Getting Memory Size Limit Error

I just did a fresh install of WordPress 3.2.1. I've uploaded and activated one plugin with no problem - Contact Form 7. I'm attempting to install Really Simple Captcha, since it goes along with Contact Form 7.
But, when I go to install it (either upload from my computer or install from WP, doesn't make a difference), it gets stuck at "Unpacking the package...". I check my server error logs, and they have the following:
PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 311296 bytes) in <mysite>/wp-includes/class-simplepie.php on line 4186, referer: <mysite>/wp-admin/index.php
I've searched this error, and they recommend changing the memory limit to 64m or 128. I tried this, but I still get the same "Allowed memory size of 16777216 bytes" error - even though I've changed the memory limit, it still shows the same number.
I've added define('WP_MEMORY_LIMIT', '128M'); to /wp-config.php and to /wp-includes/default-constants.php . I've also added ini_set("memory_limit","64MB"); to /wp-config.php .
I tried another solution of adding AddType x-mapp-php5 .php to .htaccess, but that wouldn't load my site - gave me error [warn] Cannot get media type from 'x-mapp-php5'
What the heck am I doing wrong?
You need to change the memory_limit in the php.ini for your server. Changing it at runtime has typically no effect (on shared hosting anyway), much less the WP_MEMORY_LIMIT constant.
If safe_mode and other restrictions are not enabled, then php_value via .htaccess or in a .user.ini for CGI setups might work.
For me the problem solved with disabling "JCH OPTIMIZE" Plugin

Memory limit issues when attempting to run Wordpress site locally

I'm working on a wordpress website and I'm attempting to set up a local test-environment for development purposes. I'm running the MAMP (Mac Apache MySQL PHP) stack.
I'm running into the following error:
Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 4864 bytes) in /Users/casey/Documents/workspaces/yofreesamples.com/wp-includes/functions.php on line 1174
I've attempted to increase the memory limit by modifying line 28 in wp-config.php:
define('WP_MEMORY_LIMIT', '2024MB');
and by including the following value in index.php
ini_set('memory_limit','64M');
without any luck for any memory values I've tried. I'm relatively new to wordpress, anyone have any idea what's going on?
Perhaps the MAMP configuration doesn't allow you to override the memory limit programmatically. Set it in php.ini as described here.

wordpress Fatal error: Out of memory

I have set php memory limit from whm to 256M from WHM > PHP Configuration Editor.
Even so, my wordpress website and admin is showing me an error like below.
Fatal error: Out of memory (allocated 36175872) (tried to allocate 30720 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 14272
Fatal error: Out of memory (allocated 35127296) (tried to allocate 1966080 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 5427
I also tried to add following line to the top of wp-config.php, but no luck and same error.
define('WP_MEMORY_LIMIT', '128M');
can anyone suggest me or tell me what may be the solution?
I finally think I've solved the White Screen of Death from PHP out of memory Fatal Errors.
Full details here: http://www.isthisyourhomework.com/how-to-fix-the-wordpress-white-screen-of-death/
If setting the WordPress and PHP memory limits doesn't work for you, try adding/edditing the following line in either your Apache conf files. I didn't have access to those, so I added the following line to the .htaccess file in my WP server's document root:
RLimitMEM max
Many hosts have set limits on each user on shared-use servers. The above setting will unfetter your server and banish the WSOD.
The SimplePie people reckon that this is caused by a bug in PHP. It was fixed in PHP version 5.3. Upgrading might help.
Newer versions of SimplePie use less memory but still suffer from the same PHP bug that causes lots of cached items to cause you to use loads of memory.
Did you change the memory limit in php.ini(or through WHM service configuration page)? If so, try rebooting Apache

Categories