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



  • 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?


  • Developer

    @stepkinetic You are welcome! Marking this solved…



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


  • Developer

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



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


  • Developer

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



  • 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


  • Developer

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


  • Developer

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



  • [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.


  • Developer

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



  • 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!


 

519
Online

41.7k
Users

12.2k
Topics

115.0k
Posts