Activating phpBB debugging

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Activating phpBB debugging

Postby dcz » Sat Jul 18, 2009 11:48 am

Hello,

phpBB3 has a (very) powerful debugging system that can display the eventual errors in php script sharing its code and to control the performance of the SQl queries they could make.
There are two levels of debugging, both being activated in config.php.
Your config.php file should be similar to this :
Code: Select all
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'db_type';
$dbhost = 'domain_or_socket_used_to_connect_to_the_db';
$dbport = 'db_connection_port';
$dbname = 'db_name';
$dbuser = 'db_user';
$dbpasswd = 'db_password';
$table_prefix = 'phpbb_table_prefix';
$acm_type = 'file';
$load_extensions = '';

@
define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA, true);
?>

The two lines we are interested into for debugging are :
Code: Select all
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);     

The first level of debugging will be activated by replacing :
Code: Select all
// @define('DEBUG', true);     

with :
Code: Select all
@define('DEBUG', true);  

Doing so will activate display of the eventual errors in php scripts sharing phpBB's code. It will as well add page generation time in footer and, for admins, an extra "Explain" link right after the page generation time, which will lead to a page explaining all about the SQL performed on the current page.

The second level of debugging will add the ram used to generate the page in footer. It will work only if the first level is as well activated. Since phpBB3.0.5, it will additionally allow error in language files to be displayed (if any).
To activate it, replace :
Code: Select all
// @define('DEBUG_EXTRA', true);     

with :
Code: Select all
@define('DEBUG_EXTRA', true);  

Please Note It is not a good thing to activate debugging on a live site, because error display could provide some critical information, such as the phpBB absolute path or about a broken mod, that could later be used by some malicious mind to hack your forum more easily.

But it is a good thing to activate both on your local / test servers to make sure that no error occurs before you go online, and even more when installing mods.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Re: Activating phpBB debugging

Postby diederen » Thu Mar 04, 2010 3:01 pm

Thanks man! I will try it and report back.
diederen
 
Posts: 13
Joined: Mon Mar 01, 2010 6:05 pm

Re: Activating phpBB debugging

Postby thezodiac » Mon Sep 20, 2010 1:20 pm

Thanks for sharing this I'm new to this board but I must say I read already a lot of useful tips thanks! About the debugging the best is making a back-up and do it local right? But what if my board is very big?
thezodiac
 
Posts: 34
Joined: Mon Sep 20, 2010 10:43 am

Re: Activating phpBB debugging

Postby adipa » Fri Apr 22, 2011 5:09 pm

ok... nice info... thanks dcz
adipa
 
Posts: 21
Joined: Wed Mar 30, 2011 5:17 pm

Re: Activating phpBB debugging

Postby Elev8 » Thu Feb 09, 2012 4:09 pm

This is very useful, thanks dcz!
Elev8
 
Posts: 1
Joined: Thu Feb 09, 2012 4:05 pm


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google [Bot] and 40 guests