MyBB Community Forums

Full Version: Simulate error to check if error.log is working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I am using MyBB for a while now but I never see any entry in the error.log file. Is there a simple way to simulate an error so that I can be confident its correctly configured ?
Thanks for any ideas you can offer!
try visiting any non-existing page on your forum (eg. forumurl/abcdef.php) and then check the error log
(2013-09-12, 04:29 PM).m. Wrote: [ -> ]try visiting any non-existing page on your forum (eg. forumurl/abcdef.php) and then check the error log

That may show as a 404 not found in the access logs but it's unlikely it would be parsed by PHP (If PHP is trying to execute every file requested, something is seriously wrong).

A better way would be to add some gibberish to the top of index.php, load up the homepage, and then check the error log. Of course you should removed it after.
^ oh, Thank You Nathan.
It seems the errors are logged in the error.log in the log directory for apache i.e /var/log/apache2 and not forumurl/error.log as I expected.

Thanks for quick response!

(2013-09-12, 04:37 PM)Nathan Malcolm Wrote: [ -> ]
(2013-09-12, 04:29 PM).m. Wrote: [ -> ]try visiting any non-existing page on your forum (eg. forumurl/abcdef.php) and then check the error log

That may show as a 404 not found in the access logs but it's unlikely it would be parsed by PHP (If PHP is trying to execute every file requested, something is seriously wrong).

A better way would be to add some gibberish to the top of index.php, load up the homepage, and then check the error log. Of course you should removed it after.

I tried your suggestion adding some gibberish in index.php. I got a parse error and that gets logged in /var/log/apache2/error.log.
The error.log I was originally inquiring about is the one defined under Server and Optimization Options > Error Logging Location which nothing is logged in and I'm wondering how I can check if its working?