PHPSwitcher 5.0.5 - Compiler error

  • Hi all,

    I've a new vanilla setup based on debian 9 and imscp 1.5.3, all the setup went straightforward! Now I've a small problem compiling php version for the phpswitcher plugin. I'm thinking that the problem is caused by my LVM setup with these mount point:


    then, when I launch the php_compiler.pl:

    Code
    1. root@peta:/var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler# perl php_compiler.pl --zts --packaged --register 7.2


    it stops with this error:



    So i edited the file adding the creation of /usr/sbin on line 473

    Code
    1. else
    2. log.i "installing dummy policy-rc.d"
    3. mkdir -p "$BUILDPLACE/usr/sbin/"
    4. echo "\



    and now it stop suddenly after complaining about /tmp. The same thing happens with packaged versions and with every versions php (7.2, 7.3, ...)





    Do you have any idea?


    thank you in advance!

  • Humm, after a quick search on the forum which took me like 1 minute:

    phpSwitcher 5.0.3 installs - but compile of php 5.3.29 fails


    I think this is what you are looking for.

    Thanks Athar, in this case google was not my friend. sorry for that. In any case my server is NOT a container, and compiling it with chroot it complains about something else missing. I did not go throgh debugging that version of compiling because on all my other servers it works normally.

  • Good morning,


    Instead of executing it as follows:


    Code
    1. root@peta:/var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler# perl php_compiler.pl --zts --packaged --register 7.3


    Try to execute it as follows:


    Code
    1. root@peta:# cd /usr/local/src
    2. root@peta:# perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --zts --packaged --register 7.3


    There is a path issue when executing the script through its root directory. This issue to be fixed. This issue has been reported to us by mikerhyner (konzeptplus).

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

  • Try to execute it as follows:


    Code
    1. root@peta:# cd /usr/local/src
    2. root@peta:# perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --zts --packaged --register 7.3


    Thank you very much! so easy but I was not able to understand it looking at the error messages :(


    Thanks again! It works!

  • FloRet88

    Closed the thread.