Fixed 1.1 beta 1 Fatal Error when logging in as admin after upgrading

Marcus

Well-known member
A regular user can login. The admin gets this message right after he enters the login data and clicks on "login":

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 76 bytes) in /.../library/XenForo/Permission.php on line 80
This message is only displayed when on debug modus. If I disable the debug modus, I get an empty page.
This error occurs when the admin is redirected to index.php
The admin can login to the ACP.
 

Jake Bunce

XenForo moderator
Staff member
Your permissions are big :eek:. How many forums and groups do you have?

Make sure you are not running in debug mode. Debug mode increases memory usage. If you have enabled debug in the library/config.php file then you need to remove this code from that file to disable debug mode:

Code:
$config['debug'] = 1;
You can also try increasing the memory_limit. See this post.

You might also have to edit the library/XenForo/Application.php file (regarding this thread):

Code:
		@ini_set('memory_limit', 128 * 1024 * 1024);
 

Jake Bunce

XenForo moderator
Staff member
This message is only displayed when on debug modus. If I disable the debug modus, I get an empty page.
Oh OK.

A blank page is often a suppressed error. Try adding this line to your library/config.php file:

Code:
ini_set('display_errors', true);
Or add this to a .htaccess file on your server (only works on Apache servers):

Code:
php_value display_errors 1
That may reveal an error message on the blank page.
 

Marcus

Well-known member
I have put your ini_set to config.php, this is the message for an admin with debug modus disabled now:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8208 bytes) in /.../public_html/y/library/XenForo/Permission.php on line 80
 

Mike

XenForo developer
Staff member
It really shouldn't be using that much memory there - makes me really curious what is going on. (Most pages will just use a few MB.)

Unfortunately, PHPs memory errors are nightmarish to debug as they really don't give a good idea of what's happening (no way to catch, so no stack trace).

Is this a local install, or is it something I could access? With FTP and admin CP details, I should be able to track down where is using so much memory.
 

Mike

XenForo developer
Staff member
This happened to be caused by 10,000+ items awaiting moderation. I made some changes to save the memory there, though I'll still probably need to paginate the moderated items page as well.
 
Top