• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    500 error; "A valid database connection could not be made"1.4.4 after update

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    1.4.4 database 500 error gui
    2
    12
    3.2k
    Loading More Posts
    • 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.
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth

      @stepkinetic said in 500 error; "A valid database connection could not be made"1.4.4 after update:

      redirects to the correct URL but gives an internal 500 error.

      A 500 HTTP response should give you an error in the apache logs!! See my signature on where to find the logs on your server and post the latest log messages here in the forums!

      Other than that you can create a PHP info page just to see if Apache and PHP do work together nicely. Create a file /var/www/fog/info.php with contents:

      <?php
      phpinfo();
      ?>
      

      Save file and open in your browser http://x.x.x.x/fog/info.php

      … https://<MY IP HERE>/fog/service/getversion.php …

      Are you sure you’ve set things up for HTTPS properly???

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • S
        stepkinetic
        last edited by

        [Mon Nov 20 14:38:28.136580 2017] [:error] [pid 8805] [client <MY IP>:58598] PHP Fatal error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php on line 443
        [Mon Nov 20 14:50:45.430938 2017] [mpm_prefork:notice] [pid 8795] AH00170: caught SIGWINCH, shutting down gracefully
        [Mon Nov 20 14:53:43.658802 2017] [suexec:notice] [pid 965] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
        [Mon Nov 20 14:53:43.711752 2017] [auth_digest:notice] [pid 965] AH01757: generating secret for digest authentication …
        [Mon Nov 20 14:53:43.712556 2017] [lbmethod_heartbeat:notice] [pid 965] AH02282: No slotmem from mod_heartmonitor
        [Mon Nov 20 14:53:43.828586 2017] [mpm_prefork:notice] [pid 965] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.32 configured – resuming normal operations
        [Mon Nov 20 14:53:43.828619 2017] [core:notice] [pid 965] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’

        PHP Fatal Error is the only thing I see.

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @stepkinetic said in 500 error; "A valid database connection could not be made"1.4.4 after update:

          PHP Fatal error: Call to a member function lastInsertId() on

          Well this is usually a clear sign for mysql credentials not being correct!

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @stepkinetic Do you have special characters like ' or " or space in your password?

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • S
              stepkinetic
              last edited by

              I’ve tested mysql -u root -p<mypwd> fog successfully. Would there be another place to check a config file? I have looked at /opt/fog/.fogsettings and all looks good there

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @stepkinetic Take a look at /var/www/fog/lib/fog/config.class.php!

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • S
                  stepkinetic
                  last edited by

                  Yes actually I have a * and i noticed in the config file it puts a \ before it, which I wasn’t sure if it should be there. I know that linux will put that character before an asterisks to notate it as a character and not a variable. I believe that’s correct, anyways lol.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @stepkinetic So I guess you were able to fix this by editing config.class.php by hand… Yeah escaping is very important but it can cause issues as well. Sorry for that.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • S
                      stepkinetic
                      last edited by

                      Holy hell that’s what it was…extra character in mysql credentials. Thank you so much for drawing my attention to that.

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @stepkinetic You are welcome! Marking this solved…

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        263

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project