Page 4 of 6

Re: phpBB3 Error Logging Tool

Posted: Sun Aug 03, 2008 8:20 am
by intel352
i don't even see the need to keep a constant history. maybe 1 month max.

and if a log hits 1gb, someone is in serious trouble :-) many users would max out their hosting acct fast like that, lol

Re: phpBB3 Error Logging Tool

Posted: Mon Aug 04, 2008 12:04 am
by 3Di
IMO this MOD is like a TOOL that's used for debugging purposes (see developpers/modders), I reached 150 MB in a month.

Re: phpBB3 Error Logging Tool

Posted: Mon Aug 04, 2008 7:39 am
by intel352
Agreed this is geared mostly for devs, but even tho I'm not developing anything for phpBB, I still prefer to keep tabs on errors ;-)

Re: phpBB3 Error Logging Tool

Posted: Tue Aug 05, 2008 12:31 am
by 3Di
Agreed, some kind of improvement then will be nice. ;)

Re: phpBB3 Error Logging Tool

Posted: Tue Aug 05, 2008 9:20 pm
by ham1299
Highway of Life wrote:How about per-week and not > 1GB. That way you could have 52 logs after a year instead of 365 log files. :P
That would be perfect! :)

Re: phpBB3 Error Logging Tool

Posted: Wed Aug 06, 2008 1:14 am
by 3Di
Highway of Life wrote:It just needs to detect filesize and rotate once the file size reaches 1GB
2GB seems to be the maximum.. BTW.

Re: phpBB3 Error Logging Tool

Posted: Tue Sep 09, 2008 8:41 pm
by MartectX
I keep getting loads of SQL errors recently... how can I enable the detailed admin output with the query and line of file executing it?

Re: phpBB3 Error Logging Tool

Posted: Tue Sep 09, 2008 8:48 pm
by Highway of Life
OPEN config.php

ENABLE: DEBUG and DEBUG_EXTRA

Re: phpBB3 Error Logging Tool

Posted: Tue Sep 09, 2008 9:06 pm
by MartectX
Hmm... yes thanks but I meant just for logging in error.log (don't want to harass users with technobabble :D); I gave it a try and it works well thus far, now just wait till some errors get into my net:

OPEN includes/db/dbal.php

FIND

Code: Select all

	/**
	* display sql error page
	*/
	function sql_error($sql = '')
	{
		global $auth, $user, $config;
ADD, AFTER

Code: Select all

		// LOG SQL ERRORS
		global $phpbb_root_path;
FIND

Code: Select all

		if (!$this->return_on_error)
		{
			$message = 'SQL ERROR [ ' . $this->sql_layer . ' ]<br /><br />' . $this->sql_error_returned['message'] . ' [' . $this->sql_error_returned['code'] . ']';
ADD, AFTER

Code: Select all

			// LOG SQL ERRORS
			{
				$error_log = $phpbb_root_path . '/store/php_error.log';

				$backtrace = get_backtrace();

				$error_msg = 'SQL ERROR [ ' . $this->sql_layer . ' ]<br /><br />' . $this->sql_error_returned['message'] . ' [' . $this->sql_error_returned['code'] . ']';
				$error_msg .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
				$error_msg .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
				$error_msg .= '<br />';

				$error_timestamp = date('d-M-Y  H:i:s Z');
				error_log("[$error_timestamp] [phpBB SQL Debug]" . $error_msg . "\n", 3, $error_log);
			}
PS: I know this is rudimentary ^^

Re: phpBB3 Error Logging Tool

Posted: Fri Oct 03, 2008 5:57 am
by colnector
Perhaps it's better to use PHP's error handlers to make sure all errors are caught. What happens, for example, if your database is down?

Re: phpBB3 Error Logging Tool

Posted: Fri Oct 03, 2008 7:01 am
by Highway of Life
That’s not the point of this tool. Please read the description.

Regarding the database, this tool does not rely on the database being online to operate.

Re: phpBB3 Error Logging Tool

Posted: Fri Mar 20, 2009 5:33 am
by crazyfruitbat
hey guys, I have some major query issue on my board, I'm trying to get this installed to help figure out the cause tho it's my first mod install. I have looked up the how-to install mods area, but I am at a loss here.

Can someone post a basic how-to?

Thanks,
Chris

Re: phpBB3 Error Logging Tool

Posted: Fri Mar 20, 2009 7:54 am
by MartectX

Re: phpBB3 Error Logging Tool

Posted: Fri Mar 20, 2009 8:48 am
by crazyfruitbat
Thank you very much! Perfect!

Re: phpBB3 Error Logging Tool

Posted: Fri Mar 20, 2009 11:26 pm
by Ahri89
Thanks Highway of Life ^_^