Acest MOD genereaza un fisier numit "php_error.log" intr-un director ( /store/ directory ) care contine toate erorile generate in timpul utilizarii unui forum PhpBB3.
Este un mod deosebit de util pentru dezvoltatorii de stiluri si MODificari. Include si abilitatea de a loga posibile bug uri ale template urilor.
Exemplu al unui log:
Cod: Selectaţi tot
[08-Oct-2007 02:27:37] [phpBB Debug] [client 127.0.0.1][File preview.php] PHP Notice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/preview.phpon line 37 : Undefined variable: sql
[08-Oct-2007 02:27:37] [phpBBDebug] [client 127.0.0.1] [File preview.php] PHP Notice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/db/mysqli.phpon line 213 : mysqli_fetch_assoc() expects parameter 1 to bemysqli_result, integer given
[08-Oct-2007 02:27:37] [phpBB Debug][client 127.0.0.1] [File preview.php] PHP Notice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/functions.phpon line 4221 : Cannot modify header information - headers already sentby (output started at /includes/functions.php:3728)
[08-Oct-2007 02:27:37] [phpBB Debug] [client 127.0.0.1] [File preview.php] PHPNotice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/functions.phpon line 4223 : Cannot modify header information - headers already sentby (output started at /includes/functions.php:3728)
[08-Oct-2007 02:27:37] [phpBB Debug] [client 127.0.0.1] [File preview.php] PHPNotice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/functions.phpon line 4224 : Cannot modify header information - headers already sentby (output started at /includes/functions.php:3728)
[08-Oct-2007 02:27:37] [phpBB Debug] [client 127.0.0.1] [File preview.php] PHPNotice: in file/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/functions.phpon line 4225 : Cannot modify header information - headers already sentby (output started at /includes/functions.php:3728)
-------------[ Begin General Error]-------------
[08-Oct-2007 20:25:27] [phpBB Error] [client 127.0.0.1] [file preview.php]/Applications/MAMP/htdocs/phpBB/mods/highwayoflife/stats_mod/includes/db/dbal.php:581
SQL ERROR [ mysqli ]
Unknown column 'user_admin' in 'field list' [1054]
SQL
SELECT user_admin FROM phpbb_users
BACKTRACE
FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()
FILE: preview.php
LINE: 37
CALL: dbal_mysqli->sql_query()
-------------[ End of General Error]-------------
Instalare:
Se deschide
Cod: Selectaţi tot
/includes/functions.php
Cod: Selectaţi tot
switch ($errno)
Cod: Selectaţi tot
$error_log = $phpbb_root_path . '/store/php_error.log';
Cod: Selectaţi tot
case E_WARNING:
Cod: Selectaţi tot
if ((!defined('DEBUG_TEMPLATES') && strpos($errfile, 'template.') !== false) || (!defined('DEBUG_CACHE') && strpos($errfile, 'cache') !== false))
{
return;
}
$error_msg = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
$error_timestamp = date('d-M-Y H:i:s');
$user_ip = $user->ip;
$user_page = $user->page['page'];
error_log("[$error_timestamp] [phpBB Debug] [client $user_ip] [File $user_page] PHP Notice: in file $errfile on line $errline : " . $error_msg . "\n", 3, $error_log);
Cod: Selectaţi tot
$l_notify = '<p>Please notify the board administrator or webmaster: <a href="mailto:' . $config['board_contact'] . '">' . $config['board_contact'] . '</a></p>';
}
}
Cod: Selectaţi tot
$user_ip = (!empty($user)) ? $user->ip : ((!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '');
$user_page = (!empty($user)) ? $user->page['page'] : ((isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'));
$error_msg = html_entity_decode(strip_tags(str_replace(array('<br>', "\n\n"), "\n", $msg_text)));
$error_timestamp = date('d-M-Y H:i:s');
error_log("-------------[ Begin $msg_title]-------------\n[$error_timestamp] [phpBB Error] [client $user_ip] [file $user_page] $errfile:$errline\n" . $error_msg . "-------------[ End of $msg_title]-------------\n", 3, $error_log);
Se dezactiveaza
Cod: Selectaţi tot
@define('DEBUG', true);
Cod: Selectaţi tot
// @define('DEBUG', true);
Mod realizat de catre Highway of Life
Download: aici