Posts by Nuxwin

    Starlight


    I'll investigate for the errors. The cowbuilder version from Debian jessie and Ubuntu xenial seem to not work very good... The extra package as passed though the EXTRAPACKAGES variable from the .pbuilderrc configuraiton file are not taken into account (not installed) explaining the error.


    Regarding the cleanup, you should not have to do that. Doing this lead to full creation (debootstrap process) of the build environment each time your run the php_compiler.pl script while it should be created only once. The workflow is as follows:


    • Setup build environment
      • Already exist: update
      • Do not already exist: create
    • Build of a PHP version:
      • Install PHP build dependencies inside the chroot
      • Execute the MAKE(1) command inside the chroot


    Look at the script for more details.


    BTW: Next time please, create one thread per issue. Best would be to report those issues on github but we need first your github account to give you access to the private repository.

    Dear community,


    A new version of the PhpSwitcher plugin has just been released.



    Version compatible with i-MSCP Serie ≥ 1.5.3


    Once connected on our forums, you can purchase this plugin at: https://i-mscp.net/index.php/PaidSubscriptionList/

    Documentation is available at: https://wiki.i-mscp.net/doku.php?id=plugins:phpswitcher


    CHANGELOG

    • Fixed: An error occurred while setup of PHP build environment: need to specify operation before --basepath option (Closes #28)
    • Fixed: Bad request when trying to regenerate static PHP info file for a specific PHP version from the PhpSwitcher administration interface (Fcgid httpd server)
    • Fixed: Customer PHP Info lead to 404 page - Fcgid httpd server (Closes #29)
    • Fixed: Default PHP-FCGI binary path wrongly resetted: Wrong parameter name
    • Fixed: Wrong return value from the resetHttpServerSettings event listener


    Thank you for using our plugins.


    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.

    Starlight


    Found the cause... In older cowbuilder versions (as provided by Debian Jessie and Ubuntu Xenial Xerus repositories) the create command must be passed as an option style command, that is: --create instead of create... Similar problem should exist for the update command...


    This is due to change in cowbuilder... Option style command are not longer recommented but still supported by all versions so, I'll switch to option style command...


    Basically put:

    Code
    1. DIST=jessie ARCH=amd64 /usr/sbin/cowbuilder create --distribution jessie --architecture amd64 --basepath /var/cache/pbuilder/psw-debian-jessie.cow --configfile /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/pbuilder/Debian/.pbuilderrc --hookdir /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/pbuilder/Debian/hook.d

    will lead to:

    Code
    1. need to specify operation before --basepath option

    with older cowbuilder versions where commands were only passed as option style commands while:

    Code
    1. DIST=jessie ARCH=amd64 /usr/sbin/cowbuilder --create --distribution jessie --architecture amd64 --basepath /var/cache/pbuilder/psw-debian-jessie.cow --configfile /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/pbuilder/Debian/.pbuilderrc --hookdir /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/pbuilder/Debian/hook.d


    will work with any version, even through, option style command are not longer recommended in latest cowbuilder version:


    Sorry for the disagreement.