Update Debug Errors and Notices 1.0.1 to 1.1.0  Update Debug Errors and Notices 1.0.1 to 1.1.0

Debug Errors and Notices - Ce Mod permet de tracer toutes les erreurs dans phpbb
Share this topic:    Facebook Share this topic on Facebook Twitter Share this topic on Twitter MySpace Share this topic on MySpace Del.icio.us Share this topic on Del.icio.us   

Update Debug Errors and Notices 1.0.1 to 1.1.0

Postby fr Sylver35 » 18 Sep 2011, 15:44
» Firefox 6.0.2 Firefox 6.0.2  Windows Seven 64 bits Windows Seven 64 bits  Screen Resolution: 1680 x 1050 1680 x 1050

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.


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:
Image update_debug_and_notices_1.0.1_to_1.1.0.zip

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...
La vitesse de la lumière étant supérieure à la vitesse du son, bien des gens paraissent brillants jusqu'au moment où ils ouvrent la bouche
Image
Soutenez ce forum pour la continuité et le soutient des mods!

Breizh Shoutbox Ajax 1.5.0 || Breizh Ajax Checks v1.2.0 || mod browser, os & screen v1.0.0 || Mod Erreurs et Notices de débug v1.2.0
User avatar
fr Sylver35
Administrateur
Administrateur
 
First name: Philippe
Posts: 2045
Joined: 24 Aug 08
Location: Bretagne
Cash on hand: 18,157.06
Bank: 21,714.59
Country: fr
PageRank:
PageRank Actuel   PageRank

breizh-portal Sponsor

Publicité

 

  • Related topics
    Replies
    Views
    Last post

Return to Erreurs et Notices de débug

Who is online

Users browsing this forum: No registered users and 0 guests

Login  •  Register


| Valid XHTML 1.0 Strict || breizh hosting || Made with Notepad++ || Contact || Wot || Term of use || Privacy policy || Rules |