WebUI Fog Configuration page displays php
-
Upon clicking the “Fog Configuration” tab, the php is shown.
After performingtail -n 100 /var/log/apache2/error.log
in console, the output:
PHP Notice: A non well formed numeric value is encountered in /var/www/fog/status/bandwidth.php on line 109
PHP Notice: A non well formed numeric value is encountered in /var/www/fog/status/bandwidth.php on line 110
is repeated.
These errors seemed to point to:
$rx = round(ceil((int)(($rxcur - $rxlast)) / 1024 * 8 / 100), 2);
$tx = round(ceil((int)(($rxcur - $rxlast)) / 1024 * 8 / 100), 2);
, respectively.I recently upgraded the server from 1.5.4 to 1.5.5, as it reflects when I run
git log -1
in /root/fogproject.Something I noted was although it reflects in console, upon logging into the WebUI at the bottom right it displays “Version 1.5.4”.
One last note is that the entirety of the WebUI seems to be functioning properly (dashboard, etc), aside from the ‘Fog Configuration’ page.
Any help would be great,
Thank you.
-
@Reagan Which Linux OS do you use? Any other page that shows the PHP code? This is very strange!
PHP Notice: A non well formed numeric value is encountered in /var/www/fog/status/bandwidth.php on line 109
This is known and fixed in the
dev-branch
, going to be in the next release. -
It is running Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0/43/ Generic X86-64).
This issue is only taking place on the Fog Configuration page, every other page is functioning properly. -
@Reagan said in WebUI Fog Configuration page displays php:
Something I noted was although it reflects in console, upon logging into the WebUI at the bottom right it displays “Version 1.5.4”.
Just saw this in your initial post. I am fairly sure there is something wrong with your installation. Please run
ls -al /var/www /var/www/html /var/www/fog
on your FOG server (note there are spaces between the paths!) and post output here.I’ve just checked my test installation with Ubuntu 18.04.1 and the configuration page is perfectly fine. I can’t really imagine what would cause only this single one page to be shown as PHP code. It’s all rendered through the same framework. Could you take a picture of that an post here? If you can’t upload the pic in the forums directly, then upload to a picture share host and post a link here.
-
Here are the outputs/pictures as requested.
https://imgur.com/a/5ul6o6T -
@Reagan Ok, the web directory structure looks ok. I expected that to be an issue but it’s fine. Still I really wonder why you have 1.5.4 in the bottom right corner. Please run the following commands and post results here again:
find /var/www -type f -exec grep "FOG_VERSION" {} /dev/null \; tail /var/www/html/fog/lib/fog/system.class.php
-
Here is the output for the command: https://imgur.com/a/UGa2IQb
Interesting that it shows 1.5.4, as this is the output for git log -1 in the /root/fogproject/ folder: https://imgur.com/a/j2iH5VA -
@Reagan Maybe just re-run the FOG installer hand keep your fingers crossed!?
-
@Sebastian-Roth After attempting to reinstall I came to the same conclusion, I attempted to install from the dev-branch as well to no avail.
Upon using
ls
in /root/fogproject I noticed that there was a binaries1.5.4.zip file; so I followed your advice from this post: https://forums.fogproject.org/topic/12607/downloading-binaries-needed-failed/6, and manually downloaded the binaries1.5.5.zip file to replace the outdated one.
Even after all of this, nothing has changed.Rerunning the commands you mentioned here after the latest install still displayed 1.5.4 as outputs to both commands.
find /var/www -type f -exec grep "FOG_VERSION" {} /dev/null \; tail /var/www/html/fog/lib/fog/system.class.php
Any help would be great,
Thank you. -
This is just me, but if my FOG server was in a VM (it is), I’d snapshot it, and then delete everything in /var/www/html and re-run the fog installer.
-
@Reagan How did you go about to install
dev-branch
? Just wondering about the commands you used.I would try renaming the checked out /root/fogproject directory (or even delete it, only has binaries1.5.4.zip and log files in it - all the rest is on github anyway). Then pull a fresh clean copy from github and try again.
-
@Wayne-Workman my FOG server is also running on a VM, however, after attempting this the webpage was no longer reachable. I have since reverted to my snapshot.
-
@Sebastian-Roth I used
git checkout dev-branch
to extract the branch to my system, and thengit pull
, after doing this I ran the installer with mygit branch
set to dev-branch. The installer confirmed it was version 1.5.5.3. Nonetheless, the same results showed.I deleted the /root/fogproject directory, then used
git clone https://github.com/FOGProject/fogproject.git
to recreate the directory and then launching the installer again. My circumstances are still the same, with everything on the website being functional, except the FOG Configuration page, as well as the bottom right corner showing 1.5.4. -
@Reagan As Wayne already mentioned, you might want to take a snapshot of the machine (maybe already have), then
rm -rf /var/www/html ; mkdir -p /var/www/html
and re-run the installer.As well you might want to upload the FOG installer logs (in fogproject/bin/error_logs) so we can see what it actually does.
-
@Sebastian-Roth Upon using the commands and running the installer, the webpage is not reachable. https://imgur.com/a/LB1spng.
Here is the log of the installer: https://imgur.com/a/kN59IVb.
I navigated to /var/www/html after running the installer again and saw that the fog directory was missing. Upon copying the fog directory from /var/www and pasting it into /var/www/html, the website was reachable, but still persisted with the same problems as before.
-
@Reagan delete everything in /var/www except for html, and delete everything in /var/www/html and then re-run the installer.
-
@Reagan Well now I know what’s going on. Thanks for posting the picture of the log. The installer doesn’t finish and so never gets to copy the new web interface stuff. to /var/www/html/fog. So no wonder you were always stuck with 1.5.4!!!
Did you notice it stopped on “Setting up fog password … Failed!”?? Please take a look at the installer error_log directory. There should be a second text file with detailed installer output. Copy and paste that (or at least the last 20 lines of it) to the forums. I can’t imagine why it would fail at that point.
-
@Sebastian-Roth Here are the last lines of /root/fogproject/bin/error_logs/fog_error_1.5.5.log:
https://imgur.com/a/tX5p8IN -
@Reagan Upon consulting https://wiki.fogproject.org/wiki/index.php/.fogsettings, https://wiki.fogproject.org/wiki/index.php/Password_Central, and https://wiki.fogproject.org/wiki/index.php/Troubleshoot_FTP, particularly:
There are a few places where all the credentials (on a standard install) should match exactly. Web Interface -> Storage Management -> [Your storage node] -> Management Username & Management Password Web Interface -> FOG Configuration -> FOG Settings -> TFTP Server -> FOG_TFTP_FTP_USERNAME & FOG_TFTP_FTP_PASSWORD The local 'fog' user's password on the Linux FOG server Server file: /opt/fog/.fogsettings -> password (For recent FOG Trunk versions only. 1.2.0 does not have this setting. 1.3.0 will though.) Server file: /opt/fog/.fogsettings -> username (For recent FOG Trunk versions only. 1.2.0 does not have this setting. 1.3.0 will though.)
I believe that the password set by my predecessor did not meet the password requirements for a local user on the Linux FOG server (The password they set is 44 characters long). I also found that the password listed in the .fogsettings file did not match that in the storage management credentials section (a 1 letter typo).
I believe that my next course of action is to change the password and have it reflect in the 5 sections mentioned above. If this is the case, because I can not access “Web Interface -> FOG Configuration -> FOG Settings -> TFTP Server -> FOG_TFTP_FTP_USERNAME & FOG_TFTP_FTP_PASSWORD”, how would I go about changing the password for this section?
Thank you.
-
@Reagan do you have time for a remote session, like using AnyDesk?