[1.6.0-beta.5547] Uploading Snapin fails with 500
-
I just started digging in to fog to modernise our fleet management, so bare with me if I made some crucial first mistake.
I am running fog on a baremetal server on a fresh Linux-Mint 22.3.
I access the webinterface using https and the hostname of the component.
I updated the php.ini in /etc/php/8.4 to allow for longer script time (90seconds) and updated the post_max_size to 8000M.

The Upload seems to be running fine. The bar in the webUI fills up. After a while it will get give me a toast that fog-server returned a


In /var/log/apache2 I can finde the following error:
[Fri Oct 23 14:52:09.786443 2026] [proxy_fcgi:error] [pid 10818:tid 10818] [client 10.10.0.191:62070] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function FOG\\Net\\ssh2_connect() in /var/www/html/fog/src/Net/FOGSSH.php:234\nStack trace:\n#0 /var/www/html/fog/src/Items/Snapin.php(506): FOG\\Net\\FOGSSH->connect()\n#1 /var/www/html/fog/src/Pages/SnapinManagement.php(663): FOG\\Items\\Snapin::uploadAndCreate()\n#2 /var/www/html/fog/src/Base/FOGPageManager.php(234): FOG\\Pages\\SnapinManagement->addPost()\n#3 /var/www/html/fog/management/index.php(223): FOG\\Base\\FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/src/Net/FOGSSH.php on line 234', referer: https://lagerlurch/fog/management/index.php?node=snapin&sub=addI could only find an older thread about php 8 not being supported. Is that an issue of PHP 8 not being supported but used anyway? Is there a way of forcing fog to user another php version? (The /etc/php folder does contain more subfolders with diferent versions so they seem to be available?)
Looking forward to feedback.
-
@WielandPP1 Thanks for the log line. It shows the cause exactly.
PHP 8 is supported, so you do not need a different PHP version. The problem is a missing PHP extension. On Linux Mint, the installer adds the ondrej PHP repository. In that repository,
php-fpminstalls PHP 8.4, butphp-ssh2installs the ssh2 extension for PHP 8.5. Your web server runs PHP 8.4, sossh2_connect()does not exist and the snapin upload fails.To fix your server now, install the ssh2 extension for PHP 8.4 and restart PHP-FPM:
sudo apt-get install php8.4-ssh2 sudo systemctl restart php8.4-fpmThen try the snapin upload again.
We are also fixing the installer in
working-1.6andrc-1.6.0:- The installer installs the ssh2 extension for the PHP version that PHP-FPM runs.
- On Linux Mint, the installer uses the distribution’s own PHP, as it already does on Ubuntu and Debian.
- If the extension is missing, the upload shows “SSH Connection has failed” instead of a 500 error.