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

    [1.6.0-beta.5547] Uploading Snapin fails with 500

    Scheduled Pinned Locked Moved Unsolved FOG Problems
    2 Posts 2 Posters 7 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.
    • W
      WielandPP1
      last edited by

      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.
      c3458ced-f4af-453c-a902-b0aec5d5dbc7-grafik.png

      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
      6cc305a0-e138-4845-93a1-819829d8eff8-grafik.png
      7ca182c1-5a5a-4f80-816e-39dfb55ce70b-grafik.png

      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=add
      

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

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

        @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-fpm installs PHP 8.4, but php-ssh2 installs the ssh2 extension for PHP 8.5. Your web server runs PHP 8.4, so ssh2_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-fpm
        

        Then try the snapin upload again.

        We are also fixing the installer in working-1.6 and rc-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.

        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
        • 1 / 1
        • First post
          Last post

        72

        Online

        12.8k

        Users

        17.7k

        Topics

        157.3k

        Posts
        Copyright © 2012-2026 FOG Project