I need to install Joomla on a webserver - first, I wasn't able to install Joomla on my remote webserver, because the installation wasn't able to complete step 1 (don't know why), so I installed it on my local computer and uploaded the finished installation on my webserver. So, everything was fine and I now I have a "working" joomla on my webserver.
BUT: I can log in with my admin username and password and so on, but when I click "logout" I get a blank page, only an empty body-tag.
Looking at the error.log file:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 3094558001 bytes) in [...]/www/libraries/joomla/filter/input.php on line 706
Everytime I want to open the start page, this error is appending to the log file. I googled and searched stackoverflow, but dind't find any solution.
The allowed memory size of this webserver seems to be 128MB, and the script wants to allocate about 3GB? For me this looks like the joomla developers did a bad job here, but I don't know. The funny thing is, when I google that error message, there are a lot ( ! ) of websites that are not working because of that error.
Please help me!
OK I just commented out the few lines of code there and it seems that everything works fine now. So if somebody has the same problem as me, just comment out that few lines and hopefully it works too!
Lines 702-713
// Convert decimal
/*$source = preg_replace_callback('/&#(\d+);/m', function($m)
{
return utf8_encode(chr($m[1]));
}, $source
);
// Convert hex
$source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m)
{
return utf8_encode(chr('0x' . $m[1]));
}, $source
);*/
Related
Today when I tried to edit my site on local I got strange error like this :
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
to allocate 6874029536211531203 bytes) in
D:\wamp64ario\www\owjgraph\wp-includes\functions.php on line 5231
Why it tried to allocate for 6874029536211531203?
Sometimes I get this when I try to reach Login Page, other times in different situations like dashboard or update posts etc.
I tried many things but no success:
My other website in local (with no plugins or various plugins) get the same error.
Increased memory_limit to 256, 512 or 1GB in WAMP but no success.
I heard version 4.9.7 have some memory leak bug so I downgraded to older versions and problem still exists.
Uninstall and reinstall WAMP.
Install other local tools like MAMP.
Clear cache and cookies and use different browser
Install fresh WordPress 4.9.7, 4.9.5 and 4.9.1
None of them solved my problem and I'm really confused.
Is this something wrong with my Windows or registry? How can I debug or trace where this problem is coming from?
Try: Look in your error logs, you may get a trace that will zero in on the problem for you (like an infinite loop).
Locate the line that is throwing the error & determine if it can be refactored to avoid the memory usage.
You can override php's memory allocation in your wp-config, like so:
define( 'WP_MAX_MEMORY_LIMIT' , '512M' ); but this is just a bandaid in my opinion. There is likely something wrong, which you'll need to fix for the long term health of your application.
The same thing is happening to me. If I var_dump stream_get_wrappers() I get weird results with very long lines of gibberish text. I think it's WAMP's fault, because I also get this error in plain php.
Temporary solution for WordPress:
Open wordpress/wp-includes/functions.php and modify wp_is_stream function to look like this:
function wp_is_stream( $path ) {
$wrappers = stream_get_wrappers();
for ($i=0;$i<count($wrappers);$i++) {
if (strlen($wrappers[$i])>100) {
unset($wrappers[$i]);
}
}
$wrappers_re = '(' . join('|', $wrappers) . ')';
return preg_match( "!^$wrappers_re://!", $path ) === 1;
}
I use WampServer 3.0.6 64bit
Prestashop suddenly gives an http 500 error. I turned on error log and got this:
"Fatal error: Out of memory (allocated 709623808) (tried to allocate
130968 bytes) in
/var/www/vhosts/44/252639/webspace/httpdocs/shop.mywebsite.com/classes/Configuration.php
on line 206".
I double checked the Configuration.php on line 206 and it's just a standard prestashop file, nothing weird in it. After all it's an "Out of memory" error so maybe I should increase memory.
phpinfo() shows memory_limit 1024M, which is already pretty much, but maybe I should try 2048M. I tried to create a new custom php.ini but that did not work, because (according to phpinfo) the loaded ini file is searched in this directory: /opt/alt/php56/etc.
My hosting provider does not allow me to edit it, it's read only.
What could I do to solve the problem ?
I did not make a backup yet.
I fixed it. It had nothing to do with not having enough memory or whatever. Someone created a product and that caused errors, I don't know what exactly but for everyone in the future:
Create a backup
Turn off third party modules
Delete all products
Delete cache
etc etc. until your webpage loads correctly again ->
after that, restore your backup and just delete what caused the error.
Hope it will work.
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.
Something very strange started happening yesterday while coding.
I was testing a new function, all was going fine. No issues. Was building json object and print_r on screen each time to check the successful building of the object in a testing method.
As I was implementing it into the codebase, again it was still working fine. I then went off to change a different method, updated code to work with that new method and tested it's related screens and all worked fine still.
Then all of a sudden on page reload (after seeing everything work fine), I'm getting a PHP memory leak error.
Fatal error: Allowed memory size of 1342177280 bytes exhausted (tried to allocate 65488 bytes) in D:\public_html\genesis\system\core\Common.php on line 901
This happens no matter what I isolate.
I've even converted the index page to:
public function index() {
echo 'Hello World';
//$this->buildPage("login");
}
and it still throws the error.
I currently have the this for my memory limit:
memory_limit=2480M
It was at 1280, then I added another 1200 and still no difference.
My other sites are loading fine, just this one. But I can't seem to troubleshoot it at all cause I can't get ANY methods to load.
Has anyone else had this issue?
Any ideas on how to figure it out?
OK so I figure it out, here is what I did and what was happening.
1) First I had to get xDebug installed. (https://xdebug.org/wizard.php)
2) Then I could see the errors when trying to load the page.
I had reached an maximum allowed nesting limit in Codeigniter. This was due to loading models within models and back again. I didn't realise cross model usage was not allowed.
So I moved my class based construct loading of primary models to the autoload.php file.
This got things loading again.
The problem is very very weird. Let me explain a little bit better - We have a multi site built for the client. Until recently we could edit the homepage with no issues. In the meantime we have upgraded the core (it was still working with new core). Just recently whenever I try to edit the homepage I get this error
Fatal error: Out of memory (allocated 42467328) (tried to allocate 64 bytes) in /home/officete/public_html/wp-includes/wp-db.php on line 1557
Ok so the apparent solution was to change the php memory allowance... Well I have increased it on the server via WHM, increased it in htaccess, wp-config and php.ini file to over 1.2GB (never really expected I will have to increase it so much) just for testing reasons. Every time I try to edit the page I get the same god damn error and 42467328 allocation limit doesn't change at all the " 64 bytes" part does though and its between 32-128 bytes so far.
I am stumped. And have no idea what else I can do. I did contact the server provider they say it looks ok from their end.
I am assuming its the amount of data that is being collected it does contain few ACF repeater fields (15 of them... I know... But I haven't built it). I did disable all the plugins the error persists (I know that disabling them don't really change what is being pulled from db).
BTW The line 1557 is the return result function that returns the query in an array.
you page need more execution time.add below code into config file and try:
define('WP_MEMORY_LIMIT', '128M');