• Register
    • Login
    • Search
    • Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Solved fogcontroller.class.php Undefined Offset 3 line 1046

    FOG Problems
    5
    10
    1363
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Technotica last edited by

      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?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • george1421
        george1421 Moderator @george1421 last edited by george1421

        @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 installfog.sh script again to fix the remaining bits.

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

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator last edited by

          @ynixon For Ubuntu (just guessing that you are using it) follow those instrcutions https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
          If you are not using Ubuntu I ask you to open a new topic and let us know all your specs (Linux OS and version, FOG version, exact error (picture!) and so on).

          @anthonyhull This thread is about the error message when capturing an image. Please open a new topic and post all your details including a picture of the exact error on screen.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • A
            anthonyhull last edited by

            I also get the same error, but when trying to add a snap-in
            I tried ensuring the fog password was correct but I have the same issue. I’m running SLES 12 SP3 php 7.1

            1 Reply Last reply Reply Quote 0
            • Y
              ynixon last edited by

              Hi,
              I tried the password fix and it didn’t help.
              Did you manage to overcome this issue?

              1 Reply Last reply Reply Quote 0
              • T
                Technotica last edited by

                Thank you, I will do this asap!

                1 Reply Last reply Reply Quote 0
                • george1421
                  george1421 Moderator @george1421 last edited by george1421

                  @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 installfog.sh script again to fix the remaining bits.

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

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • T
                    Technotica last edited by

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

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • george1421
                      george1421 Moderator @Technotica last edited by

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

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      george1421 1 Reply Last reply Reply Quote 0
                      • T
                        Technotica last edited by

                        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!

                        george1421 1 Reply Last reply Reply Quote 0
                        • george1421
                          george1421 Moderator last edited by

                          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.

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post

                          205
                          Online

                          10.4k
                          Users

                          16.4k
                          Topics

                          150.6k
                          Posts

                          Copyright © 2012-2023 FOG Project