Partially rendered pages from PHP errors, Ubuntu 24.04 with PHP 8.3
-
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:
-
@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!
-
@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?
-
@Tom-Elliott According to the Storage page, the DefaultMember has the correct path for Images and Snapins:
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?
-
@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. -
@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!
-
-
@tomierna Glad I could help and glad your issue is fixed.
-