Enable / Disable Error Reporting from ACP

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Enable / Disable Error Reporting from ACP

Post by Alien_Time »

I think it will be very useful to Enable or Disable phpbb's PHP Error Reporting directly from ACP. I know some would say we are meant to fix the error reporting but its not always true. There are cases where some reportings are just warnings and not necessarily an error that needs any fix. Either ways, I still dont want to show any php errors in a production site. I feel it is still old school to edit the config file directly to disable phpbb Debug notices. Is there a way to add this setting directly in ACP under 'Server Settings'?

As an example, this is what Joomla has that allows admins to disable or change error reporting levels on production sites directly from backend settings .
Attachments
phpbb_error_reporting.jpg
phpbb_error_reporting.jpg (15.79 KiB) Viewed 33930 times

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Enable / Disable Error Reporting from ACP

Post by DavidIQ »

Why would you have debug enabled on a production site?
Image

User avatar
Mess
Registered User
Posts: 199
Joined: Wed Jun 13, 2012 10:14 am

Re: Enable / Disable Error Reporting from ACP

Post by Mess »

DavidIQ wrote: Wed Aug 12, 2015 1:09 pm Why would you have debug enabled on a production site?
Not everyone has a size that warrants a test site (or the option to run it).

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Enable / Disable Error Reporting from ACP

Post by DavidIQ »

Mess wrote: Wed Aug 12, 2015 1:45 pm
DavidIQ wrote: Wed Aug 12, 2015 1:09 pm Why would you have debug enabled on a production site?
Not everyone has a size that warrants a test site (or the option to run it).
Yes but the original poster said:
Alien_Time wrote: Wed Aug 12, 2015 7:18 amEither ways, I still dont want to show any php errors in a production site.
Image

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: Enable / Disable Error Reporting from ACP

Post by Alien_Time »

DavidIQ wrote: Wed Aug 12, 2015 1:09 pm Why would you have debug enabled on a production site?
Hi David,

Thats the thing. I have not enabled debug on my production site. My config file already has the following lines commented:

Code: Select all

// @define('PHPBB_DISPLAY_LOAD_TIME', true);
// @define('DEBUG', true);
// @define('DEBUG_CONTAINER', true);
But, in some pages I was still getting the phpbb_debug message. To remove that I need to change the error_reporting() line in includes/startup.php. Why is that?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Enable / Disable Error Reporting from ACP

Post by DavidIQ »

I'm not sure if we've done something to error reporting to show details to admins and a generic message to others. Storing debug levels and settings in the database might not be the best of ideas when there is a database problem. Developers will have to weigh in on this though.
Image

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: Enable / Disable Error Reporting from ACP

Post by Paul »

Alien_Time wrote: Wed Aug 12, 2015 4:17 pm
DavidIQ wrote: Wed Aug 12, 2015 1:09 pm Why would you have debug enabled on a production site?
Hi David,

Thats the thing. I have not enabled debug on my production site. My config file already has the following lines commented:

Code: Select all

// @define('PHPBB_DISPLAY_LOAD_TIME', true);
// @define('DEBUG', true);
// @define('DEBUG_CONTAINER', true);
But, in some pages I was still getting the phpbb_debug message. To remove that I need to change the error_reporting() line in includes/startup.php. Why is that?
You should not receive any debug messages, both phpBB Core as extensions should be written in a way they prevent notices/warnings from happen. For extensions this is also checked during validation, and extensions will be denied if they do have notices.

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: Enable / Disable Error Reporting from ACP

Post by Alien_Time »

hmm... thats interesting. I have bridged phpbb together with Joomla. Although I dont see any errors in phpbb pages itself, this phpbb error reporting is showing in a Joomla page like this:

Code: Select all

[phpbb Debug] PHP Warning: in file /var/www/example/joomla/etc... on line 109: Invalid argument supplied for foreach()
The above is not really an error and I have disabled error reporting from Joomla already. Since it said phpbb Debug, I checked my phpbb config file and it already had the error reporting commented. Therefore, I had to edit the includes/startup.php file like I mentioned in my previous post.

Does that mean that this phpbb error reporting needs to be supressed from the phpbb-joomla bridge extension? Do I then need to address this to the bridge author then?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Enable / Disable Error Reporting from ACP

Post by DavidIQ »

Alien_Time wrote: Sun Aug 16, 2015 1:37 pm Does that mean that this phpbb error reporting needs to be supressed from the phpbb-joomla bridge extension? Do I then need to address this to the bridge author then?
Not suppressed but fixed by the author.
Image

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: Enable / Disable Error Reporting from ACP

Post by Alien_Time »

Got it. Thank you David.

Post Reply