• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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
    stepkinetic
    last edited by stepkinetic Nov 20, 2017, 11:23 AM Nov 20, 2017, 5:08 PM

    Ran the FOG 1.4.4 update on an existing normal install (CENTOS 7.3), everything succeeded except the backup for the database, which I saw is normal and can be ignored.

    Once finished the web GUI became unavailable. I get “A valid database connection could not be made” 1.4.4 after running:

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

    If I try to access the GUI via https://<MY IP HERE>/fog/ it redirects to the correct URL but gives an internal 500 error.

    I validated mysql user credentials are correct in fog settings and can login with the credentials to mariadb. I am a newb when it comes to fog and even linux in a lot of cases. Not sure what I’m missing at this point and can’t seem to find anything in the forum that correlates specifically to what I’m experiencing. I have tried to rerun the install with no resolve. Permissions on the /www directory are 755, so doesn’t appear to be a permissions issue.

    anyone else experience this?

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Nov 20, 2017, 8:22 PM

      @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 Nov 20, 2017, 7:57 PM

        Also to notate, apache is running fine with no errors and tested. I’ve checked every available post, issue/resolution, wiki page there is and nothing has helped me resolve this. Let me know what you guys need to see and i"ll gladly provide it. Thank you!

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Sebastian Roth Nov 20, 2017, 2:20 PM Nov 20, 2017, 8:16 PM

          @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 Nov 20, 2017, 8:19 PM

            [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 Nov 20, 2017, 8:21 PM

              @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 Nov 20, 2017, 8:22 PM

                @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 Nov 20, 2017, 8:22 PM

                  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 Nov 20, 2017, 8:23 PM

                    @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 Nov 20, 2017, 8:25 PM

                      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 Nov 20, 2017, 8:27 PM

                        @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 Nov 20, 2017, 8:29 PM

                          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 Nov 20, 2017, 8:31 PM

                            @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
                            1 / 1
                            • First post
                              10/12
                              Last post

                            210

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project