PhpSwitcher (5.0.0) Couldn't find PHP version for the XXXX domain

  • Hello, I updated the phpswitcher plugin to the newest version. It was without mistakes.


    I couldn't change the standard php-version and with one customer it says:

    Plugin::PhpSwitcher::_overrideHttpFpmServerSettings: Couldn't find PHP version for the ... .de domain. at /var/www/imscp/gui/plugins/PhpSwitcher/backend/PhpSwitcher.pm line 828.

    Plugin::PhpSwitcher::_overrideFpmUdsPath: Couldn't find PHP version for t


    I wanted to change it, but it didn't let me.


    Thanks for help.

  • Hi,


    Just to check one little thing I'm thinking about : Is this customer used a PHP version that got deleted during upgrade ? (which would explain the "Couldn't find PHP version")

    Maybe an old version is register in DB and during some check, it failed to change this value due to missing older version (I suppose, I really don't know, just an idea like that).


    Also, check that any PHP version list in admin panel are with the correct path (and no errors in there too).


    I'm doing the upgrade on my server and compile all the versions, so I'll see if I get any "issues" like this one after.

  • Sounds like your user is "corrupted" in the DB, might have some orphans entries.


    The part of the code which lead to the error, check for the PHP Version of the domain.


    Either, for me, there is a bad entry in your Database (I would think inside "php_switcher_version_admin"), or somewhere else an orphan entry.


    Can't tel more this way, maybe Nuxwin could help by looking at your server directly, without access to your server, I can't see any other reason, honestly.

  • Thanks. This Info lead to solve the problem.

    I deleted the status with the error directly in the db and changed it to 'ok'.


    From now on, I could work again with the Domain.

  • I couldn't change the standard php-version and with one customer it says:

    What do you mean by "standard" php version?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I couldn't change the standard php-version and with one customer it says:

    Plugin::PhpSwitcher::_overrideHttpFpmServerSettings: Couldn't find PHP version for the ... .de domain. at /var/www/imscp/gui/plugins/PhpSwitcher/backend/PhpSwitcher.pm line 828.

    Plugin::PhpSwitcher::_overrideFpmUdsPath: Couldn't find PHP version for t

    Such error can occurs when a PHP version is set for a domain but that this version is in error state. This shouldn't occurs in normal context. The first thing to check is the status of the registered PHP versions through the PhpSwitcher adminstration interface. From there, you should be able to check the status of all your registered PHP versions, including the one that is in error state. Then you should be able to edit or even remove it. Clearly, you have a problem with one of your registered PHP version, the one set for your domain.


    Discusion regarding the implementation


    For now on, when a PHP version that is set for a domain is in error state, a failure will be raised by the Plugin::PhpSwitcher::_overrideFpmUdsPath event listener (assuming the apache_php_fpm httpd server implementation) when the domain entity will be processed by the backend. The error will of course be propagated to the domain entity as the backend will be unable to configure PHP for it... An easy solution would be to fallback to the default PHP version in such case but then, the problem would be just hidden, giving the sysadmin hard time knowing why the PHP version set for a domain is not the one effectively used... From my point of view, the current implementation is correct... In such a situation the sysadmin should in order:

    1. Check the status of the registered PHP version(s) from the PhpSwicher administration interface
    2. Fix the problems for the PHP versions that are in error state (this is not just about changing the status in the `php_switcher_version` database table as you have done...). You MUST effectively fix the problems.
    3. Once the problems are fixed for the PHP version(s), go to the debugger interface (admin level) and trigger a change for the domain(s) that are in error state.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin

    Added the Label not a bug
  • Nuxwin

    Changed the title of the thread from “Couldn't find PHP version” to “PhpSwitcher (5.0.0) Couldn't find PHP version for the XXXX domain”.
  • Yes, I have done it. I checked first the php-Versions. Every php-Version ist in 'ok' status. What I didn't understand, why happened it only to 1 domain and not the other. Ok, I changed every php-Version manually for every domain. The most time, to a higher php-Version.