How To Hide/Remove/Disable [phpBB Debug] PHP Warning

Discussion forum for MOD Writers regarding MOD Development.
Locked
evepowr
Registered User
Posts: 85
Joined: Sun Jan 04, 2004 6:54 pm
Contact:

How To Hide/Remove/Disable [phpBB Debug] PHP Warning

Post by evepowr » Sun Aug 05, 2012 4:53 pm

Cant seem to do this one for the life of me. We are in the process of tracking down a stupid server error that is causing it to restart. So when the page is loading sometimes the rss feeds for example it will give a phpbb error. I know fixing the error is more important and we are working on that, its not a phpbb error but an error with the server.

Anyways im looking to stop it from showing. Here is what i have done so far.

1. Of course disabled debug in config.

Code: Select all

// @define('DEBUG', false);
// @define('DEBUG_EXTRA', false);
2. Disabled it at the php.ini level and it confirmed it in the admin panel of phpbb3

Code: Select all

display_errors	Off	Off
display_startup_errors	Off	Off
3. Removed the following from includes/template

Code: Select all

		if (defined('IN_ERROR_HANDLER'))
		{
			if ((E_NOTICE & error_reporting()) == E_NOTICE)
			{
				error_reporting(error_reporting() ^ E_NOTICE);
			}
		}
4. Added the following to my htaccess

Code: Select all

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
I read how some people commented this out in common.php but i couldn't find it. Im using phpbb seo but i do have the latest version of phpbb and its not showing.

Code: Select all

// Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE); 

User avatar
T0ny
Registered User
Posts: 1383
Joined: Sun Jan 29, 2006 8:42 pm
Location: Lancashire
Name: Tony

Re: How To Hide/Remove/Disable [phpBB Debug] PHP Warning

Post by T0ny » Sun Aug 05, 2012 4:59 pm

error_reporting() is on line 22 of includes/startup.php

evepowr
Registered User
Posts: 85
Joined: Sun Jan 04, 2004 6:54 pm
Contact:

Re: How To Hide/Remove/Disable [phpBB Debug] PHP Warning

Post by evepowr » Sun Aug 05, 2012 5:00 pm

Fixed it myself. For anyone wondering how to do this.

In common.php find

Code: Select all

if (file_exists($phpbb_root_path . 'config.' . $phpEx))
{
	require($phpbb_root_path . 'config.' . $phpEx);
}
Change it to:

Code: Select all

if (file_exists($phpbb_root_path . 'config.' . $phpEx))
{
	error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
	require($phpbb_root_path . 'config.' . $phpEx);
}

evepowr
Registered User
Posts: 85
Joined: Sun Jan 04, 2004 6:54 pm
Contact:

Re: How To Hide/Remove/Disable [phpBB Debug] PHP Warning

Post by evepowr » Sun Aug 05, 2012 5:04 pm

GOOD NEWS EVERYONE

O duh it was in startup.php. I knew it was moved somewhere, i clearly need sleep. Well anyways did the same thing before but to startup.php which is a much cleaner move :). Thanks.

Locked

Return to “[3.0.x] MOD Writers Discussion”