HTTP 500: Internal Server Error
-
OS: Ubuntu 16.04
FOG Version: 1.4.4Hello,
I have been trying to install FOG as the product is exactly what is needed for our company, though I have stumbled across a problem and can’t seem to get past it.
The problem I’m having is once I have setup a fresh install of Ubuntu 16.04 following your guide on the wiki, then running a fresh install of FOG, I get stuck once it asks to install the Database Schema, as I get an Internal Server Error when going to http://172.18.52.73/FOG/Management/
I have tried resolving this myself by checking out other HTTP 500 problems that are documented on the forum, unfortunately with no success. When re-running the install I get the following error within the install log file (if that helps resolve the problem):
*Backing up database…Failed!
Any help is much appreciated as I would very much like to get this installed and setup for use within our environment.
Thanks,
Barnzy -
Spent some more time looking into this problem today with success and now it’s working!
Looking again at the wiki I found there is a mysql test by going to:- http://x.x.x.x/fog/service/getversion.php
I got a message saying:- "A valid database connection could not be made"1.4.4
I went to /var/www/fog/lib/fog/config.class.php to find that there was a password that I had set in the setup, once I had cleared this password I checked the mysql connection again and it was working!
-
@Barnzy Take a look at the apache logs. See my signature on where to find those.
-
Thanks for the reply - checking those logs I can see the following:
[Tue Jan 09 15:31:37.694491 2018] [php7:error] [pid 1252] [client 172.18.52.1:57330] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var$
What would be causing this? Looking online people have solved it by reseting the mysql password but this has not worked for me, getting this when trying to run the ALTER command:
ERROR 1396 (HY000): Operation ALTER USER failed for ‘root’@‘127.0.0.1’ -
Spent some more time looking into this problem today with success and now it’s working!
Looking again at the wiki I found there is a mysql test by going to:- http://x.x.x.x/fog/service/getversion.php
I got a message saying:- "A valid database connection could not be made"1.4.4
I went to /var/www/fog/lib/fog/config.class.php to find that there was a password that I had set in the setup, once I had cleared this password I checked the mysql connection again and it was working!
-
@Barnzy Good to hear you were able to solve this. Have a look at this in case you run into the issue again: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL
We have seen people on Ubuntu having issues. Read this as well: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
-
@barnzy said in HTTP 500: Internal Server Error:
I went to /var/www/fog/lib/fog/config.class.php to find that there was a password that I had set in the setup, once I had cleared this password I checked the mysql connection again and it was working!
Ofcourse that file is editable, but we don’t recommend people to edit it. Set the correct parameters inside of
/opt/fog/.fogsettings
and then re-run the installer. ELSE, the very-next-time you run the installer, it’ll be broke again because the installer will set the settings inside of /opt/fog/.fogsettings.
See this as a reference: https://wiki.fogproject.org/wiki/index.php?title=.fogsettingsHowever, kudos to you for using the troubleshooting article in the wiki!