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

    Partially rendered pages from PHP errors, Ubuntu 24.04 with PHP 8.3

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    6
    365
    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
      tomierna
      last edited by

      I’ve been nursing a pretty old FOG install on CentOS for a few years and decided to spin up a new server running Ubuntu and transfer everything instead of trying to update in place.

      I successfully got the images and database transferred, and the installer runs without error, but then when I get into the new system, clicking on any host or a Deploy button results in a partially rendered page.

      There is an underlying PHP error when this occurs:

      [Thu Aug 29 19:43:25.376709 2024] [proxy_fcgi:error] [pid 65111] [client 192.168.10.85:53400] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/snapin.class.php:392\nStack trace:\n#0 /var/www/html/fog/lib/fog/snapin.class.php(392): min()\n#1 /var/www/html/fog/lib/fog/snapin.class.php(344): Snapin->getPrimaryGroup()\n#2 /var/www/html/fog/lib/router/route.class.php(1327): Snapin->getStorageGroup()\n#3 /var/www/html/fog/lib/router/route.class.php(487): Route::getter()\n#4 /var/www/html/fog/lib/pages/hostmanagementpage.class.php(1806): Route::listem()\n#5 /var/www/html/fog/lib/pages/hostmanagementpage.class.php(3264): HostManagementPage->hostSnapins()\n#6 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): HostManagementPage->edit()\n#7 /var/www/html/fog/management/index.php(58): FOGPageManager->render()\n#8 {main}\n  thrown in /var/www/html/fog/lib/fog/snapin.class.php on line 392', referer: http://fog.molecularmedia.com/fog/management/index.php?node=host&sub=search
      

      The new system is running Ubuntu 24.04 which comes with PHP 8.3. Are there known problems with this version of PHP with FOG Project, or is there something else wrong with my install?

      This error is happening with both the stable branch and the dev branch.

      Here’s what the partially rendered host page looks like:
      Screenshot 2024-08-29 at 4.07.29 PM.png

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

        @Tom-Elliott That was the ticket!

        The snapins from a pre-1.x version of FOG imported many moons ago to have the full path in the snapins table, and had 0 in the sgaStorageGroupID field for the storage group in the snapinGroupAssoc table.

        I removed the full path in the snapins table and set the sgaStorageGroupID to 1, and now I can get to the snapins list page and the host page.

        Thanks for the pointer!

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

          @tomierna There’s no known issues because of the php 8.3, but rather it’s because your Install seems to not know about a storage group/storage node on the server at the moment?

          Can you look and make sure snapins that are associated to this host (or any snapin for that matter) have the new storage group/node associated to them?

          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

          T 1 Reply Last reply Reply Quote 0
          • T
            tomierna @Tom Elliott
            last edited by

            @Tom-Elliott According to the Storage page, the DefaultMember has the correct path for Images and Snapins:

            Screenshot 2024-08-30 at 10.55.11 AM.png

            I can’t get to the Snapins list page, probably for similar reasons. According to the snapins table, some of my older snapins have the full path, and the newer ones don’t. Is there another table or set of fields where I can verify the correct storage group is associated with the snapins?

            Screenshot 2024-08-30 at 10.56.48 AM.png

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

              @tomierna From the snapins there’s a method of associating the snapin to a group.

              I think the table in mysql that manages that is:

              snapinGroupAssoc

              And snapinAssoc is the table that shows which hosts the snapins are associated with.

              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

              T 1 Reply Last reply Reply Quote 0
              • T
                tomierna @Tom Elliott
                last edited by

                @Tom-Elliott That was the ticket!

                The snapins from a pre-1.x version of FOG imported many moons ago to have the full path in the snapins table, and had 0 in the sgaStorageGroupID field for the storage group in the snapinGroupAssoc table.

                I removed the full path in the snapins table and set the sgaStorageGroupID to 1, and now I can get to the snapins list page and the host page.

                Thanks for the pointer!

                Tom ElliottT 1 Reply Last reply Reply Quote 1
                • [[undefined-on, T tomierna, ]]
                • Tom ElliottT
                  Tom Elliott @tomierna
                  last edited by

                  @tomierna Glad I could help and glad your issue is fixed.

                  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
                  • [[undefined-on, Tom ElliottT Tom Elliott, ]]
                  • 1 / 1
                  • First post
                    Last post

                  157

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project