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 .
Enable / Disable Error Reporting from ACP
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.
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.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Enable / Disable Error Reporting from ACP
- Attachments
-
- phpbb_error_reporting.jpg (15.79 KiB) Viewed 35192 times
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Enable / Disable Error Reporting from ACP
Why would you have debug enabled on a production site?
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Enable / Disable Error Reporting from ACP
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.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: Enable / Disable Error Reporting from ACP
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);
phpbb_debug
message. To remove that I need to change the error_reporting()
line in includes/startup.php. Why is that?- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Enable / Disable Error Reporting from ACP
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.
Re: Enable / Disable Error Reporting from ACP
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 wrote: ↑Wed Aug 12, 2015 4:17 pmHi David,
Thats the thing. I have not enabled debug on my production site. My config file already has the following lines commented:
But, in some pages I was still getting theCode: Select all
// @define('PHPBB_DISPLAY_LOAD_TIME', true); // @define('DEBUG', true); // @define('DEBUG_CONTAINER', true);
phpbb_debug
message. To remove that I need to change theerror_reporting()
line in includes/startup.php. Why is that?
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: Enable / Disable Error Reporting from ACP
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:
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
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?
Code: Select all
[phpbb Debug] PHP Warning: in file /var/www/example/joomla/etc... on line 109: Invalid argument supplied for foreach()
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?
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Enable / Disable Error Reporting from ACP
Not suppressed but fixed by the author.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?
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: Enable / Disable Error Reporting from ACP
Got it. Thank you David.