[RC] phpBB3 Error Logging Tool

Converters for phpBB2 MODs to phpBB3, MOD Tools, Automatic MOD installers, Tools for MOD Developers and programmers.

[RC] phpBB3 Error Logging Tool

Postby Highway of Life » 08 Oct 2007, 22:02

Modification name: phpBB3 Error Logging Tool
Author: Highway of Life
Modification description: Logs phpBB Errors and Warnings in a Custom Error Log, so you can turn off the DEBUG/DEBUG EXTRA for your users and find all errors in the error log.
This makes continues debugging possible after you go live. It is also a great tool for MOD and Style Authors when developing and testing MODs for ease of debugging.
Includes the ability to log possible Template errors and warnings.
The Error Log is created automatically inside the /store/ directory, and will be called php_error.log

Modification version: 1.0.RC1
Tested on phpBB version:
  • phpBB 3.0.RC5
  • phpBB 3.0.RC6-dev (CVS from August 30)

Associated Topics:

Download file: phpbb3 error logging tool.zip

Credits: Thanks to Exreaction for the idea.

Demo: Sample text from generated error log:
Code: Select all
[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.php on line 37 : Undefined variable: sql
[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/db/mysqli.php on line 213 : mysqli_fetch_assoc() expects parameter 1 to be mysqli_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.php on line 4221 : Cannot modify header information - headers already sent by (output started at /includes/functions.php:3728)
[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.php on line 4223 : Cannot modify header information - headers already sent by (output started at /includes/functions.php:3728)
[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.php on line 4224 : Cannot modify header information - headers already sent by (output started at /includes/functions.php:3728)
[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.php on line 4225 : Cannot modify header information - headers already sent by (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]-------------
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [RC] phpBB3 Error Logging Tool

Postby JunglistPerfection » 27 Dec 2007, 00:34

Is this mod compatible with phpBB3 Gold?
User avatar
JunglistPerfection
Cadet I
Cadet I
 
Posts: 14
Joined: 18 Jul 2007, 06:56
Location: Chicago, IL
Favorite Team: Chicago Bears
Gender: Male

Re: [RC] phpBB3 Error Logging Tool

Postby Highway of Life » 28 Dec 2007, 17:27

100% compatible. :D
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [RC] phpBB3 Error Logging Tool

Postby JunglistPerfection » 09 Jan 2008, 15:21

The mod works perfect, but I have a small problem. I'm using a dynamic sig and the phpbb3 error logging mod gives me an error by not allowing the dynamic sig to display.

Error:
Code: Select all
Warning: error_log(/store/php_error.log) [function.error-log]: failed to open stream: No such file or directory in /homepages/23/d170898697/htdocs/clip101/forum101/includes/functions.php on line 2915

Warning: error_log(/store/php_error.log) [function.error-log]: failed to open stream: No such file or directory in /homepages/23/d170898697/htdocs/clip101/forum101/includes/functions.php on line 2915
[phpBB Debug] PHP Notice: in file /homepages/23/d170898697/htdocs/clip101/forum101/sig.php on line 72: Cannot modify header information - headers already sent by (output started at /homepages/23/d170898697/htdocs/clip101/forum101/includes/functions.php:2915)


For me to resolve this matter, I had to comment out: (includes/functions.php)
Code: Select all
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);


Is there another way I can solve this situation?

Thanks
User avatar
JunglistPerfection
Cadet I
Cadet I
 
Posts: 14
Joined: 18 Jul 2007, 06:56
Location: Chicago, IL
Favorite Team: Chicago Bears
Gender: Male

Re: [RC] phpBB3 Error Logging Tool

Postby Highway of Life » 09 Jan 2008, 15:42

Its not a problem with the MOD, so it would be a misconfiguration in the sig image.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [RC] phpBB3 Error Logging Tool

Postby JunglistPerfection » 09 Jan 2008, 16:29

Highway of Life wrote:Its not a problem with the MOD, so it would be a misconfiguration in the sig image.


So, how can I solve this problem then?
User avatar
JunglistPerfection
Cadet I
Cadet I
 
Posts: 14
Joined: 18 Jul 2007, 06:56
Location: Chicago, IL
Favorite Team: Chicago Bears
Gender: Male

Re: [RC] phpBB3 Error Logging Tool

Postby Highway of Life » 09 Jan 2008, 17:28

Most likely a bug in the sig image.
But you can try changing:
Code: Select all
$error_log $phpbb_root_path '/store/php_error.log'

to:
Code: Select all
$error_log $phpbb_root_path 'store/php_error.log'
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [RC] phpBB3 Error Logging Tool

Postby JunglistPerfection » 09 Jan 2008, 18:22

Cool, thanks.

It works. :good:
User avatar
JunglistPerfection
Cadet I
Cadet I
 
Posts: 14
Joined: 18 Jul 2007, 06:56
Location: Chicago, IL
Favorite Team: Chicago Bears
Gender: Male

Re: [RC] phpBB3 Error Logging Tool

Postby CoC » 22 May 2008, 10:34

With gzip enabled the error log fills up very quickly I can't remember the exact lines but it includes -

"in file unknown on line 0"

If I switch off gzip there are no errors - :scratch:

Any ideas?
User avatar
CoC    
MOD Author
MOD Author
 
Posts: 490
Joined: 23 Jan 2007, 11:09
Location: Coventry
Favorite Team: Coventry City
Gender: Male
phpBB Knowledge: 8

Re: [RC] phpBB3 Error Logging Tool

Postby masterkeedu » 16 Feb 2009, 13:24

This is a silly question, but this is my first MOD, how to I install.

I figured there would jest be a folder I could upload the source to, but I don't see such a beast. Do I need to create a new one in the admin panel or what?

Thanks a bunch!

n/m

View the xml file in a web browser to read the necessary lines to edit in functions .php
masterkeedu
Crewman
Crewman
 
Posts: 1
Joined: 16 Feb 2009, 13:22
Gender: Male
phpBB Knowledge: 3

Next

Return to MOD, MODX - MOD Developer Tools and Converters

Who is online

Users browsing this forum: No registered users and 1 guest

cron