Force the frontend php listening socket to use php version 7.1

  • I installed php 8.2 on my server, along side other versions, such as 7.1, which the front end was using.


    At the moment it appears the listening php socket - /run/imscp/imscp_panel.sock is using v8.2


    I've used update alternatives to make sure 7.1 is the default on my server, restarted services and rebooted but this persists to use v8.2


    How can I adjust this to use 7.1 ?


    Thanks :)

    Edited once, last by base64 ().

  • Hey :)


    Having this posted twice will probably not get you more answers :P (Initial post : extra PHP 8.2 installed on server - frontend/rainloop now seems to be using this and get errors)


    Anyways, this is an unusual setup and, as far as I'm aware, not supported in any ways.


    If your goal was to have one or more subsites/domains to use a different Php Version, the (payed) plugin PHPSwitcher would have been the way to go.

  • Hi Athar :)


    Yes I initially posted it in php, but after more investigation I concluded it was probably help with imscp and how it launches the socket that I needed, not specific help for php. :blush:


    It all stemmed from one site and plugin needing v8.2 to work properly. I see that the phpSwitcher was probably the simplest way to go, and I probably have an unusual unsupported setup now.


    Ideally if I can get the frontend back to 7.1, and everything back as it was I will be able to purchase the phpSwitcher and save myself some headaches.

  • Well, I guess a "simple way" (it's never simple) would be to remove all the base PHP versions installed (which you overwrite by updating the 7.1 needed by the panel), and then rerun the imscp setup.


    This way, the panel will reconfigure itself with the correct version.

    Maybe even with some parameters, this setup can be launched just to reconfigure the PHP part (but I'm too tired, might be noted somewhere in the wiki :D ).


    And yeah, PhpSwitcher make some stuff way easier, I'm using it with all the latest version of Php (8.2.8 right now) :

    phpswitcher.png