Wordpress memory error - php

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.

Related

PHP out of memory error does not reflect memory_limit setting in php.ini

When I try to install a package to Contao using the Composer client I get an error:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 134217728 bytes) in phar://D:/wamp/www/myproject/composer/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220
I am really confused. My PHP memory limit is set at 512M. phpinfo() confirms it. But 1073741824 is a gigabyte! And it still isn't enough, as if the script totally disregards the PHP memory limit (where?) and even a gigabyte isn't enough!?!?
What can I do? I read about RLimitMEM, but I can not find such a setting anywhere on WAMPServer.
I found the answer.
I searched the project for memory_limit and found out, that the composer client attempts to set a memory limit in system/modules/!composer/src/Runtime.php There is this line: #ini_set('memory_limit', '1024M'); I changed it to #ini_set('memory_limit', '2048M'); essentially doubling the available memory, and it worked.
It is recommended to use the so called detached mode for the composer client. If you have a proper CLI environment available, you'll have no memory limit and no maximum execution time. Also both of these limits can be controlled via command line arguments.
However, this does not work in all hosting environments. See this Wiki entry for more details: https://github.com/contao-community-alliance/composer-client/wiki/Execution-modes

Open Cart Fatal error: Allowed memory size Issue

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 38312699 bytes) in
/home1/eshoppaz/public_html/vqmod/vqcache/vq2-system_engine_controller.php
on line 58
How do I go about resolving this issue?
You have to change the memory_limit on the root and within the admin folder, I noticed that nobody pointed this out and it worked for me.
If you have access to the php.ini file, set the memory_limit option to 128M.
If you don't have access to it, you can try to set it in the .htaccess with:
php_value memory_limit 128M
If you change it on php.ini file don't forget restart the server after change the value.
Your server have the memory_limit set to 64Mb and Open Cart need a little more (with your error it needs 36Mb more). Also i seen on other forums that people set memory_limit to 256M to avoid problems.
I hope this help you.

Allowed memory size exhausted in both Joomla and Drupal

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.

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

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