How to turn off error display and log instead?
-
I have some issues with plugins generating warnings or info messages in the browser, which I tried turning off by editing the config file as suggested in the Piwigo forums (https://piwigo.org/forum/viewtopic.php?pid=185383#p185383).
Sadly neither editing the ~/local/config/config.inc.php helped nor did using .htaccess. In all cases, I restarted the app to no avail.
How can I turn error messages off and turn on a log with actual errors, not warnings or info messages?
-
3 3246 marked this topic as a question on
-
Argh. It still produces some output in the browser:
https://photos.segebrecht.com/?xauth=tDpiswojbqxw
Deprecated : strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /app/data/plugins/ShareAlbum/main.inc.php on line 262 Deprecated : substr(): Passing null to parameter #1 ($string) of type string is deprecated in /app/data/plugins/ShareAlbum/main.inc.php on line 263 Deprecated : substr(): Passing null to parameter #1 ($string) of type string is deprecated in /app/data/plugins/ShareAlbum/main.inc.php on line 266 -
@3246 Can you tell me some steps to reproduce? In the initial post, you mentioned some plugins causing the messages. Which plugins?
@girish thank you. The plugin in the example at the top is 'ShareAlbum'. All I do is visit the sharing link (https://photos.segebrecht.com/?xauth=tDpiswojbqxw) and note the Deprecated messages at the top of the page.
The second case should possibly be its own 'ticket' but is related. Go to an album and send a notification to a subscribed member. You'll either get errors from Piwigo about email not being configured and the PHP errors shown on the page as well, or you get a positive notification from Piwigo that your email was sent but it actually isn't and you can see PHP errors on the top of the page.
-
Atleast with the ShareAlbum plugin, I got a sql error. It's trying to access a table which doesn't exist (it seems to think tables are prefixed)
Fatal error: Uncaught mysqli_sql_exception: Table '86fb7cb533a59d00.piwigo_user_group' doesn't exist in /app/code/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /app/code/include/dblayer/functions_mysqli.inc.php(132): mysqli->query() #1 /app/data/plugins/ShareAlbum/include/sharealbum_functions.inc.php(348): pwg_query() #2 /app/data/plugins/ShareAlbum/include/public_events.inc.php(70): sharealbum_is_poweruser() #3 /app/code/include/functions_plugins.inc.php(264): sharealbum_add_button() #4 /app/code/index.php(351): trigger_notify() #5 {main} thrown in /app/code/include/dblayer/functions_mysqli.inc.php on line 132 -
@3246 OK, so this was not do with php.ini. piwigo's default config shows errors and it overrides the php.ini config.
Put this at the top of the file (after
<?phpline) in/app/data/local/config/config.inc.php:$conf['show_php_errors'] = ''; $conf['show_php_errors_on_frontend'] = false; -
G girish has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
I'll give it a try now.