Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Piwigo
  3. How to turn off error display and log instead?

How to turn off error display and log instead?

Scheduled Pinned Locked Moved Solved Piwigo
12 Posts 2 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 32463 Offline
      32463 Offline
      3246
      wrote on last edited by
      #1

      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?

      👉 Find our more www.bebraver.online

      1 Reply Last reply
      0
      • 32463 3246 marked this topic as a question on
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        You can put those in /app/data/php.ini like:

        error_reporting=On
        display_errors=Off
        

        Restart the app. Does htat work?

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #3

          It seems the app has no customizable php.ini . Just pushing out a new package.

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            OK, please check with the latest package.

            1 Reply Last reply
            1
            • 32463 Offline
              32463 Offline
              3246
              wrote on last edited by
              #5

              Amazing! Thank you @girish 😃 I'll give it a try now.

              👉 Find our more www.bebraver.online

              1 Reply Last reply
              0
              • 32463 Offline
                32463 Offline
                3246
                wrote on last edited by 3246
                #6

                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
                

                👉 Find our more www.bebraver.online

                1 Reply Last reply
                0
                • 32463 Offline
                  32463 Offline
                  3246
                  wrote on last edited by
                  #7

                  Getting another error when trying to send notifications:

                  Warning: Mailer Error: Could not instantiate mail function. in /app/code/include/functions_mail.inc.php on line 904
                  

                  👉 Find our more www.bebraver.online

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #8

                    @3246 Can you tell me some steps to reproduce? In the initial post, you mentioned some plugins causing the messages. Which plugins?

                    32463 1 Reply Last reply
                    0
                    • girishG girish

                      @3246 Can you tell me some steps to reproduce? In the initial post, you mentioned some plugins causing the messages. Which plugins?

                      32463 Offline
                      32463 Offline
                      3246
                      wrote on last edited by
                      #9

                      @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.

                      👉 Find our more www.bebraver.online

                      1 Reply Last reply
                      0
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #10

                        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
                        
                        1 Reply Last reply
                        0
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #11

                          Actually, it's a bug in the upstream code. It assumes a hardcoded table prefix - https://github.com/petitssuisses/piwigo-ShareAlbum/blob/cf5f43f3e154e532542bdbdb45b051974e66876e/include/sharealbum_functions.inc.php#L347

                          1 Reply Last reply
                          1
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #12

                            @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 <?php line) in /app/data/local/config/config.inc.php:

                            $conf['show_php_errors'] = '';
                            $conf['show_php_errors_on_frontend'] = false;
                            
                            1 Reply Last reply
                            1
                            • girishG girish has marked this topic as solved on
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Bookmarks
                              • Search