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

    Feature Request: Check minimum required PHP version before FOG dev-branch upgrades

    Scheduled Pinned Locked Moved Feature Request
    2 Posts 2 Posters 35 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.
    • S
      sgennadi
      last edited by

      Hello,

      I would like to suggest improving PHP version compatibility checks during FOG installation and upgrades, especially when updating to the latest dev-branch.

      On several occasions after upgrading FOG development versions, I experienced issues such as:

      • The Management Portal login stopped working.
      • Newly introduced features produced PHP runtime errors.
      • The installer completed successfully without warning that the installed PHP version might not meet the requirements of the updated FOG code.

      Not all of these errors were necessarily caused by an outdated PHP version, but better compatibility checks would help prevent and diagnose them.

      Suggested improvements:

      1. Check the installed PHP version before upgrading FOG.
      2. Define the minimum required PHP version for each FOG release or development build.
      3. Verify both PHP CLI and PHP-FPM versions.
      4. Check required PHP extensions and their availability.
      5. Warn if PHP is too old or if the installed PHP version is not yet supported.
      6. Perform these checks BEFORE replacing application files or modifying the database.
      7. Stop the upgrade if a required PHP dependency is missing, unless an explicit override is provided.
      8. After upgrading, check the Management Portal, login page, HTTP 500 errors and PHP fatal errors.
      9. Provide a pre-upgrade compatibility check, for example:
        ./installfog.sh --check-requirements

      Example warning:

      FOG PHP Compatibility Check
      Installed PHP: 8.x
      Minimum PHP required: X.Y
      Status: Upgrade blocked
      Please upgrade PHP before continuing.

      It would also be useful to display the required PHP version in the installer summary and documentation.

      The goal is to prevent situations where FOG reports “Setup complete” but the Management Portal or newly introduced functionality fails afterward.

      Could this improvement be considered for a future FOG 1.6 dev-branch update?

      Thank you for your continued work on FOG Project!

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

        @sgennadi Thanks, this is a good catch. The installer did not check PHP at all. The only check ran on the first web request, after the upgrade was already done.

        This is now fixed on dev-branch: https://github.com/FOGProject/fogproject/pull/2154

        After the packages install, and before FOG copies any file or touches the database, the installer now:

        • stops if the PHP CLI is below FOG’s minimum (PHP 7.4). It reads that number from the FOG code it is installing, so it cannot drift.
        • stops if no PHP-FPM of the same version as the CLI is installed. A third-party repository can give you a CLI of 8.5 and an FPM of 8.4, and the web UI runs on FPM.
        • warns about a missing PHP extension that FOG uses.

        When it stops, your current install is unchanged. --skip-php-check lets you continue anyway.

        You get it with your next dev-branch update. The docs are here: https://docs.fogproject.org/1.6/installation/server/command-line-options

        If your login breaks again after an update, please post the output of php -v, php-fpm -v (or php-fpm8.x -v), and the last lines of the PHP-FPM error log. That tells us whether it is PHP or a bug in the new code.

        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

        55

        Online

        12.8k

        Users

        17.7k

        Topics

        157.5k

        Posts
        Copyright © 2012-2026 FOG Project