Update Debug Errors and Notices 1.0.1 to 1.1.0
This update can upgrade the mod Notices Errors and debug to make it fully compatible with phpbb version 3.0.9
Added ability to display or not to admins or anyone line debug info in the footer.
During the update phpbb 3.0.8 to version 3.0.9, the display system errors and notices has been changed, thus making irrelevant the mod previously installed.
Depending on how the conflict in the Shift of phpbb has been processed, the code in the file includes/functions.php may be different from one forum to another.
So you must follow the procedure described in this topic.
So you must follow the procedure described in this topic.
open the file includes/functions.php
search:
- Code: Select all
$msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
and remove any code that lies between this line and the following line:
- Code: Select all
// we are writing an image - the user won't see the debug, so let's place it in the log
Then add this code between the two lines above to find:
- Code: Select all
// Mod Debug Errors and Notices --
$is_all = (preg_match('/\bCannot modify header\b/i', $msg_text)) ? true : false;
$run = false;
if (!$config['errors_debug_active'])
{
$run = false;
}
elseif ($config['errors_debug_active'] && !$is_all)
{
$run = true;
}
elseif ($config['errors_debug_active'] && $is_all && $config['errors_debug_all'])
{
$run = true;
}
elseif ($config['errors_debug_active'] && $is_all && !$config['errors_debug_all'])
{
$run = false;
}
if ($run)
{
$sql_array = array (
'log_type' => $errno,
'log_time' => (int)time(),
'log_user' => (int)$user->data['user_id'],
'log_ip' => ($user->data['session_ip']) ? (string)$user->data['session_ip'] : '-',
'log_browser' => ($user->data['session_browser']) ? (string)$user->data['session_browser'] : '-',
'log_lang' => ($user->data['user_lang']) ? (string)$user->data['user_lang'] : '-',
'log_page' => ($user->page['page']) ? (string)$user->page['page'] : '-',
'log_file' => (string)$errfile,
'log_line' => (string)$errline,
'log_message' => (string)$msg_text,
);
$db->sql_query('INSERT INTO ' . ERROR_LOG_TABLE . $db->sql_build_array('INSERT', $sql_array));
}
if (!$config['errors_debug_echo'])
{
$error_name = ($errno === E_WARNING) ? 'PHP Warning' : 'PHP Notice';
echo '<b>[phpBB Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
}
// End Mod Debug Errors and Notices --
search:
- Code: Select all
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
replace with:
- Code: Select all
// Mod Debug Errors and Notices --
'DEBUG_OUTPUT' => (defined('DEBUG') && ($auth->acl_get('a_') || $config['errors_debug_footer'])) ? $debug_output : '',
// End Mod Debug Errors and Notices --
Save the file
Download the zip update:
Unzip the zip file, send to the ftp of your forum files in the folder root.
Then, run the install folder (install/) to update the database...
RSS Feeds
Search
Login
View unanswered posts
View new posts (0)
View active topics










