fogcontroller.class.php Undefined Offset 3 line 1046

  • Hello,

    I have a slight problem with a FOG on a centos. I managed to get it working up to a point, it can capture an image but then runs into this error:

    Reattempting to update Database.... Failed
    Error Returned: Type 8, File: /var/www/html/fog/lib/fog/fogcontroller.class.php, Line: 1046, Message: Undefined offset: 3, Host: XXX, User: fog

    (Where XXX is the IP Address of my FOG)

    Then it shows the Kernel variables and settings and wants to reboot within a minute.

    I have looked for answers on google and here but I can’t seem to find the right one. The code in the php file wants a fields Array with 3 fields I guess but it only gets Host and Username.

    Maybe it would expect a Password in that instance? Could it be jsut a blank password field somewhere?


  • Thank you, I will do this asap!

  • Moderator

    @george1421 Here is how I want you to fix it.

    When logged in using another linux user account than fog

    1. Review the file /opt/fog/.fogsettings (this is a hidden file)
    2. In that file there is a entry called password=
    3. Capture that password. You will need it to reset the FOG server.
      Hint: I can tell you its much easier to do these steps by connecting to your fog server using putty from a windows computer. Copy and paste works great using putty (free terminal program).
    4. Now reset the linux user fog's password with sudo passwd fog
    5. Now go to the FOG WebGUI and FOG Configuration->FOG Settings->TFTP Server and ensure the password listed in FOG_TFTP_FTP_PASSWORD matches the password you collected in step 2.
    6. While still in the FOG WebGUI goto Storage Management->All Storage Nodes select the default or storage node in question.
    7. Ensure that Management Password matches the password you collected in step 2.
    8. Now finally back in the linux console of the fog server, navigate to where your fog installer files are (typ either /root/fogproject or /opt/fogproject) and rerun the script again to fix the remaining bits.

    Once these steps have been completed your FOG server should be happy with you again.

  • AH ok sorry, won’t change anything what is the process? Is there a guide somewhere?


  • Moderator

    @technotica No linux user is not the same as the database password. Don’t change anything at the moment. There is a process to fix this. If not careful you can make it worse.

  • Ohh yes, so the fog account on the server may have a different password than the mysql fog account, that is the problem? I will change that password to match then and not use the account anymore!

  • Moderator

    Let me ask you this, did you change, modify or use the a linux user account called fog? If so that is your problem. The error message is a bit misleading. Where we typically see this is the IT Admin uses a the fog service account fog for system admin. That account is managed by fog and fog gets a bit unhappy if someone changes the password on it.

Log in to reply





Looks like your connection to FOG Project was lost, please wait while we try to reconnect.