How to suppress PHP warnings generated by Piwigo when running PHP 8.x

Are you running Piwigo on a server running PHP 8.x? Is your error_log file in your gallery quickly filling up with PHP warnings? If so, follow these steps to suppress those warnings:

  • Log in to your Piwigo gallery.
  • Click Administration. (This guide assumes your account has Webmaster rights.)
  • Click Plugins on the left-hand menu.
  • Click Add a new plugin.
  • Click in the Search field, type “localfiles” (minus quotes), and press Enter.
  • Under the LocalFiles Editor result, click Add.
  • Click Plugins on the left-hand menu.
  • Toggle the LocalFiles Editor plugin on if it isn’t already
  • Click the Settings button under the LocalFiles Editor item.
  • Copy and paste the following code into the local/config/config.inc.php file:
$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING;
  • Click Save File.

Original source: https://piwigo.org/forum/viewtopic.php?id=31875

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.