Automating adding PHP Versions

Discussion in 'Installation/Configuration' started by theTJ, Jul 29, 2025.

  1. theTJ

    theTJ New Member

    Hi,

    I'm not sure if I missed it somewhere or if I have a misconfiguration, but when I add an ISPConfig Server i'd like to get all installed PHP-Versions as FPM-Options in ISPConfig.
    Or when installing a new PHP-Version over multiple Servers do I really have to add an entry with all the links for every Server by hand?

    My Servers are Debian 11 and 12 with ISPConfig 3.3.0p2 at the moment.
    Is there an option to import the configurations für all installed php-Versions on each server?
    A few hints how and where the information is stored in the ispconfig-database might also help so that maybe i'd be able to dust up my programming skills and make my own script if noone had this Problem before.

    Thanks in advance

    TJ
     
  2. HB-Soundy

    HB-Soundy New Member

    Hi TJ,
    I don't think I can give you the answer you were looking for, but you can find the PHP version under ISPConfig System > Web > PHP Settings.

    I'm also currently looking for a way to switch from PHP 7.3 to 8.2. I upgraded my servers from Debian 11 to Debian 12 and specifically selected PHP 7 in the PHP configuration at the time.

    i found some old notes from my onenote..
    NOTICE: Not enabling PHP 8.0 FPM by default.
    NOTICE: To enable PHP 8.0 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php8.0-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.

    PHP Default Version ändern
    update-alternatives --config php
    update-alternatives --config php-cgi
    service php7.4-fpm restart
    service apache2 restart

     
    theTJ likes this.
  3. theTJ

    theTJ New Member

    yea, that's not my point.
    But to make it maybe clearer what I'm looking for is adding installed versions of PHP on the Menu-Point:
    System -> Additional PHP Versions

    But your Tip might be helpful for another thing I just had...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no API for that; you must do it either by hand or in the database directly, but take care not to mess up the ID#s when it's a multiserver setup. So doing it through ISPConfig UI on the master node is the safest way. The database table is server_php.
     
    theTJ likes this.
  5. theTJ

    theTJ New Member

    OK, thanks for the Info.
    Maybe I just shouldn't want to offer all php-Versions to all "customers".

    But looking into the database for importing might still be an interesting option. If I script something helpful I might publish it.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to offer a specific PHP version to a single customer, then you can configure that in the PHP version settings.

    The ISPConfig auto-installer installs and configures all versions, or the ones you want to use, at install time and adds them in ISPConfig automatically.
     
  7. theTJ

    theTJ New Member

    strange, because the last server I added, the install script installed all for debian 12 aviable php-Versions but on the ISPConfig-Interface the drop-down stayed empty o_O - but maybe the syncing issues because some systems in the cluster were still on 3.2.something while the main and new had 3.3.0p2

    After some more problems with the integration, I today got the task to just build a complete new set of servers to replace the multiple times upgraded (some seem to have started as debian strech oder jessie) old systems over the next couple of months.

    and when all servers start now with debian bookworm (12.11) and ispconfig 3.3.0p2 at least some issues should be avoided.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The installer can add them to the UI on single servers only. For multiserver systems, you must add them to the master using the GUI.
     

Share This Page