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

    Database Error when select a group

    Scheduled Pinned Locked Moved Unsolved Bug Reports
    8 Posts 3 Posters 784 Views
    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.
    • D
      devle
      last edited by

      Hi, I installed a fresh Fog Server v1.6-beta-2303 on Ubuntu Server 24.04.4 LTS (Installation Type: Normal Server).

      I used FOG Web to create a new group. The group was created successfully. However, when I selected the group to add hosts, the UI page was broken and show html format. This error is shown at the end:

      SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘)’ at line 8

      When I checked FOG status, all services are enabled. But there are warnings related specifically:

      Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Undefined array key “imageID” in /var/www/fog/lib/router/route.class.php on line 2512
      Undefined array key “sID” in /var/www/fog/lib/router/route.class.php on line 2512

      Log of services that had warnings:

      fog_admin@fog2026:~$ systemctl status FOG*

      Apr 01 15:11:38 fog2026 systemd[1]: FOGSnapinReplicator.service: Scheduled restart job, restart counter is at 3.
      Apr 01 15:11:38 fog2026 systemd[1]: Started FOGSnapinReplicator.service - FOGSnapinReplicator.
      Apr 01 15:11:38 fog2026 env[26974]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512

      Apr 01 14:41:34 fog2026 systemd[1]: Started FOGImageSize.service - FOGImageSize.
      Apr 01 14:41:34 fog2026 env[25343]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 14:41:34 fog2026 env[25343]: PHP Warning: Undefined array key “imageID” in /var/www/fog/lib/router/route.class.php on line 25>

      Apr 01 15:11:38 fog2026 systemd[1]: FOGImageReplicator.service: Scheduled restart job, restart counter is at 3.
      Apr 01 15:11:38 fog2026 systemd[1]: Started FOGImageReplicator.service - FOGImageReplicator.
      Apr 01 15:11:38 fog2026 env[26973]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512

      Apr 01 14:41:34 fog2026 systemd[1]: Started FOGSnapinHash.service - FOGSnapinHash.
      Apr 01 14:41:34 fog2026 env[25332]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 14:41:34 fog2026 env[25332]: PHP Warning: Undefined array key “sID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:11:35 fog2026 env[25332]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:11:35 fog2026 env[25332]: PHP Warning: Undefined array key “sID” in /var/www/fog/lib/router/route.class.php on line 2512

      ● FOGMulticastManager.service - FOGMulticastManager
      Loaded: loaded (/usr/lib/systemd/system/FOGMulticastManager.service; enabled; preset: enabled)
      Active: active (running) since Wed 2026-04-01 14:41:34 EEST; 35min ago

      Apr 01 15:16:24 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:24 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:34 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:34 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:44 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:44 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:54 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:16:54 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:17:04 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512
      Apr 01 15:17:04 fog2026 env[25262]: PHP Warning: Undefined array key “ngmID” in /var/www/fog/lib/router/route.class.php on line 2512

      Tom ElliottT M 2 Replies Last reply Reply Quote 1
      • Tom ElliottT
        Tom Elliott @devle
        last edited by

        @devle Can you post your apache error log or php-fpm?

        Please see my signature to see where to locate those.

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        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

        D M 2 Replies Last reply Reply Quote 0
        • D
          devle @Tom Elliott
          last edited by

          @Tom-Elliott Hi Tom,

          log for apache error:

          [Wed Apr 01 16:05:36.847438 2026] [proxy_fcgi:error] [pid 1232] [client 172.28.1.84:48932] AH01071: Got error 'PHP message: PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_f9273cevne2k8cci10csjt7b81, O_RDWR) failed: Permission denied (13) in /var/www/fog/commons/init.php on line 84; PHP message: PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/fog/commons/init.php on line 84'
          [Wed Apr 01 16:05:36.860169 2026] [proxy_fcgi:error] [pid 1233] [client 172.28.1.84:48946] AH01071: Got error 'PHP message: PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_f9273cevne2k8cci10csjt7b81, O_RDWR) failed: Permission denied (13) in /var/www/fog/commons/init.php on line 84; PHP message: PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/fog/commons/init.php on line 84'
          [Wed Apr 01 16:05:36.877158 2026] [proxy_fcgi:error] [pid 1234] [client 172.28.1.84:48952] AH01071: Got error 'PHP message: PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_f9273cevne2k8cci10csjt7b81, O_RDWR) failed: Permission denied (13) in /var/www/fog/commons/init.php on line 84; PHP message: PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/fog/commons/init.php on line 84'
          [Wed Apr 01 16:05:36.889945 2026] [proxy_fcgi:error] [pid 1231] [client 172.28.1.84:48968] AH01071: Got error 'PHP message: PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_f9273cevne2k8cci10csjt7b81, O_RDWR) failed: Permission denied (13) in /var/www/fog/commons/init.php on line 84; PHP message: PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/fog/commons/init.php on line 84'
          

          the php-fpm error:

          [01-Apr-2026 12:57:13] NOTICE: Terminating ...
          [01-Apr-2026 12:57:13] NOTICE: exiting, bye-bye!
          [01-Apr-2026 15:57:34] NOTICE: fpm is running, pid 758
          [01-Apr-2026 15:57:34] NOTICE: ready to handle connections
          [01-Apr-2026 15:57:34] NOTICE: systemd monitor interval set to 10000ms
          
          1 Reply Last reply Reply Quote 0
          • M
            mashina @Tom Elliott
            last edited by

            @Tom-Elliott Hi, has there been any development with this?

            I’m facing a situation that’s not quite identical but very similar in my 1.6.0-beta.2297.

            I already posted to the Forum with the details I thought were relevant, but noticed my FOG status is showing the same messages that are posted here.

            1 Reply Last reply Reply Quote 0
            • M
              mashina @devle
              last edited by

              @devle @Tom-Elliott This problem occurs when there are no hosts associated with the group (the group is empty). This can be closed, but I believe it should be moved to the BUG reports.

              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @mashina
                last edited by

                @mashina Can you describe?

                I’m not sure I follow what you mean by a “host not associated to a group”?

                Do you mean a Storage Group without a single Storage Node associated to 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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                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

                M 1 Reply Last reply Reply Quote 0
                • M
                  mashina @Tom Elliott
                  last edited by

                  @Tom-Elliott

                  Here is a clearer forum version:

                  What I meant is this:

                  If a group is created but no hosts are added to that group, opening/clicking that empty group in the FOG dashboard throws an error in the browser.

                  I tested this on two separate FOG instances and got the same result on both.

                  Example: If the group sysprep-test-5002 is clicked in the screenshot below.

                  Screenshot 2026-04-28 143654.png

                  The browser shows this SQL error:

                  You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version
                  for the right syntax to use near ')' at line 8
                  

                  Screenshot 2026-04-28 143532.png

                  Expected result:

                  FOG should open the empty group normally and show that it has no members, instead of generating a SQL syntax error.

                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @mashina
                    last edited by

                    @mashina Ah, thank you for that and sorry for my denseness. Indeed this is a bug and I’ve replicated and figured out where this is occurring.

                    I have pushed a few mroe adjustments in an attempt find and fix more bugs (thanks AI review and whatnot)

                    Please pull and let me know if there’s any other issues.

                    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    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
                    • Tom ElliottT Tom Elliott moved this topic from FOG Problems
                    • 1 / 1
                    • First post
                      Last post

                    136

                    Online

                    12.6k

                    Users

                    17.5k

                    Topics

                    156.5k

                    Posts
                    Copyright © 2012-2026 FOG Project