News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Cannot access error log in Admin

Started by awolexpat, June 16, 2012, 12:18:24 PM

Previous topic - Next topic

awolexpat

Hi everyone,
Apologies if this has been covered elsewhere but a search didn't reveal it. I have the oddest problem in that whenever I click on my error log link(s) I get a blank white screen. I can access all the other logs except that one. This has only become apparent to me today and before it was working as it should. Everything else (I think) is working OK. I have downloaded the error log from my cPanel and the relevant entry (I think) is the following:

QuotePHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 77393921 bytes) in /public_html/forum/Themes/default/Errors.template.php on line 162

However I think this error may just be symptomatic of some other problem, as I have a similar error for several other files, such as:

QuotePHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 77393921 bytes) in/public_html/forum/Sources/Load.php(2442) : eval()'d code on line 162

and

QuotePHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 77391722 bytes) in /public_html/forum/Sources/Twitter/TwitterHooks.php on line 401

There is also this little bunch of errors prior to those which have repeated as well:

QuotePHP Notice:  Use of undefined constant WIRELESS - assumed 'WIRELESS' in /public_html/forum/Sources/Subs.php on line 2821
PHP Notice:  Use of undefined constant WIRELESS_PROTOCOL - assumed 'WIRELESS_PROTOCOL' in /public_html/forum/Sources/Subs.php on line 2832
PHP Notice:  Undefined index: REQUEST_URL in /public_html/forum/Sources/Subs.php on line 2952

Prior to those there is an absolute avalanche of the following error, which prompted me to turn off the relevant mod (Bad Behaviour) which when i looked today at the mod page is not currently available for download, so makes me wonder if there is a connection.

QuotePHP Fatal error:  require_once(): Failed opening required '/public_html/forum/Sources/bad-behavior/bad-behavior/banned.inc.php' (include_path='.:/usr/php/53/usr/lib64:/usr/php/53/usr/share/pear') in /public_html/forum/Sources/bad-behavior/bad-behavior/core.inc.php on line 24

However I still could not access the error log after turning it off, as well as logging out, clearing the browser cache and logging in again. I have spoken to my host on their live chat and went through a few possibilities but nothing has changed.They upped the memory in the php.ini as well but to no avail. So I am a bit stumped. I use SMF 2.0.2 and have a ton of mods (more than 60), but the only recent change has been to update Simple Portal to the latest version, and also TapaTalk and Bad Behaviour. I also installed the beta EU Cookie Law one but that, Tapatalk and BB were last Sunday (10th June) and I have been accessing the error log since then. In terms of timing Simple Portal is the possible culprit but no one else is (apparently) having this problem, so that's why i am posting.

Anyone got any ideas? (Please...)

Elmacik

Would you try truncating the log table by running this query from phpmyadmin:

TRUNCATE TABLE `smf_log_errors`

Where smf_ is your table prefix.
Home of Elmacik

awolexpat

Many thanks Elmacik, that has allowed me to access the error log. If at all possible, can you explain why this might have happened and how I can avoid it happening in the future?

Elmacik

Probably you had countless of errors logged, and since it was too big; it was exhausting the server to show you the results. How you can avoid this? Turn on error logging for a little while; go to board index and view an arbitrary topic. Then disable error logging again and see what you have in the logs. Fixing those errors will help.
Home of Elmacik

awolexpat

Thanks again, and I will do as you suggest; no further problems since your fix so I am guessing that you are right - I have been a little slack in dealing with the errors that appear and thought I should leave them until I had some spare time! Actually I think it would be a good idea if some of the more common error messages were referenced on SMF to explain both what they mean and how to deal with them - I'm sure there are others like me who don't have much idea on the best way to handle the different types of error, how important they are or how they crop up in the first place. It would be great if there was some sort of mod that could assist in identifying or helping with this alternatively. I'm sure it would cut down the number of help requests on this forum!

Elmacik

#5
It's nearly impossible to solve those kind of errors with an automated script. Because there are tons of customizations which are already being checked for errors before approval. Think of that a couple of knowledgeable people look for it and cannot find; how comes that an automated script finds and understands and solves. :P

It could only lead you to the place where the error is happening; and this is what SMF error logging does already.
Home of Elmacik

awolexpat

OK, that's fair enough, just an idle thought really. I still think some sort of repository of errors on SMF would be a useful addition though, as a starting point for people before they come to the forum asking for help. The problem I often find is that the linked line of code that is highlighted as 'causing' the error rarely is the root cause, which can be very confusing when it is encountered.

Advertisement: