Blank management page after FOG Update
-
Good Afternoon
We originally setup our FOG system back in 2018, and it has been working well. As part of some upgrade work we are trying to capture an image of a newer version of Linux to upgrade our HPC Cluster. The old FOG client was having trouble on the newer version of Alma Linux, so we decided that it might be a good idea to upgrade FOG as well.
The install/update script seemed to run without a hitch, but at the step where it indicates that you need to open a web browser to http://xxx.xxx.xxx.xxx/fog/management, I did so, but only got a blank webpage.
I didn’t know what feedback I was expecting for “updating the db schema”, so I assumed that it had happened.Now, any attempt to access the FOG Web UI results in a blank white web page. The only other thing I know is the browser sees it as an HTTP 500 error.
OS: CentOS 7.5
FOG: 1.5.10.1634 (Updated to this today)Any help would be greatly appreciated.
-
Last part of the puzzle was that the php-fpm service wasn’t running.
Started it with:sudo systemctl start php-fpm.service sudo systemctl enable php-fpm.service systemctl status php-fpm.service
And now the FOG Web UI is working for me again.
-
@mckayj Ewww CentOS 7.5
I’m only kidding. While CentOS 7 is no longer supported and I would (also) suggest moving a a newer OS at this point this isn’t really an issue. Sorry strange mood for me this morning (for me).
Can you give us the output of your /var/log/php-fpm/www-error.log file? This likely is where the actual errors are showing and we can help provide more information.
-
Thanks for the quick reply
The www-error.log file is full of messages like this:
[05-Feb-2025 08:27:03 America/Toronto] PHP Parse error: syntax error, unexpected '?' in /var/www/html/fog/lib/fog/fogbase.class.php on line 2594 [05-Feb-2025 08:27:03 America/Toronto] PHP Parse error: syntax error, unexpected '?' in /var/www/html/fog/lib/fog/fogbase.class.php on line 2594 [05-Feb-2025 08:27:03 America/Toronto] PHP Parse error: syntax error, unexpected '?' in /var/www/html/fog/lib/fog/fogbase.class.php on line 2594 [05-Feb-2025 08:27:03 America/Toronto] PHP Parse error: syntax error, unexpected '?' in /var/www/html/fog/lib/fog/fogbase.class.php on line 2594
The same message over and over. They even appears when I’m not trying to access the web UI.
I had a look at the file mentioned in the error log, and that line looks like its setting and “authorized” flag:
$authorized = self::$FOGUser->isValid() || strtolower(($_SERVER['HTTP_X_REQUESTED_WITH'] ?? '')) == 'xmlhttprequest';
This made me wonder if old cookies or other site data in my browser was messing it up. So I cleared my cookies and cache and other browser data. No help.
-
OK, apparently that’s all I needed to figure the rest out on my own.
The
??
operator that the error message seemed to be complaining about was apparently introduced in PHP 7. My old CentOS 7.5 server (Eww, I know) only had PHP 5.6. (Suggesting the install script check the PHP version to make sure it’s at least 7)
I was able to update PHP with the following commands:sudo yum remove php* sudo yum install php php-bcmath php-cli php-common php-fpm php-gd php-ldap php-mbstring php-mcrypt php-mysqlnd php-pdo php-pecl-jsonc php-pecl-zip php-process
Doing so replaced the blank white web UI with a message that stated:
“Service Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”I then re-ran the
sudo ./installfog.sh
, and it ran without any problems. The DB schema update step functioned, and I could then login like normal.However, I don’t think I’m fully out of the woods yet. The install script for some reason messes up the NIS login system, requiring a reboot to make work again, but after the reboot the FOG Web UI is back to showing “Service Unavailable”. I’m suspecting a user permission problem that I need to dig into next (Maybe I should make this a new topic if I need help).
-
Last part of the puzzle was that the php-fpm service wasn’t running.
Started it with:sudo systemctl start php-fpm.service sudo systemctl enable php-fpm.service systemctl status php-fpm.service
And now the FOG Web UI is working for me again.
-
T Tom Elliott, ]]