How to install additional PHP versions provided by Plesk

Follow

Comments

3 comments

  • Avatar
    Hywel Jones

    Hi - this is all fine for the FPM and CGI versions but how do you install the latest PHP-CLI builds?  I need these for running symphony etc apps.

  • Avatar
    Alexandr Redikultsev

    Hi @Hywel Jones,

    PHP-CLI should be there when you install it as additional component via Plesk. For example, on Debian 9:

    # apt search php-cli
    Sorting... Done
    Full Text Search... Done
    php-cli/stable,stable 1:7.0+49 all
    command-line interpreter for the PHP scripting language (default)
    php-cli-prompt/stable,stable 1.0.2+dfsg-1 all
    tiny helper prompting for user input
    plesk-php70-cli/stretch,now 7.0.32-debian9.0.18091413 amd64 [installed]
    Command-line interface for PHP
    plesk-php71-cli/stretch,now 7.1.22-debian9.0.18091413 amd64 [installed]
    Command-line interface for PHP
    plesk-php72-cli/stretch,now 1:7.2.10-debian9.0.18091411 amd64 [installed]
    Command-line interface for PHP

    # dpkg-query -L plesk-php72-cli
    /.
    /etc
    /etc/psa
    /etc/psa/php_versions.d
    /etc/psa/php_versions.d/plesk-php72-cgi.conf
    /etc/psa/php_versions.d/plesk-php72-fastcgi.conf
    /opt
    /opt/plesk
    /opt/plesk/php
    /opt/plesk/php/7.2
    /opt/plesk/php/7.2/bin
    /opt/plesk/php/7.2/bin/lsphp
    /opt/plesk/php/7.2/bin/phar.phar
    /opt/plesk/php/7.2/bin/php
    /opt/plesk/php/7.2/bin/php-cgi
    /opt/plesk/php/7.2/bin/phpdbg
    /opt/plesk/php/7.2/bin/phar

    So all binaries are located at /opt/plesk/php/7.2/bin/ (for PHP 7.2). This is actual for other operation systems as well.

  • Avatar
    Hywel Jones

    @ Alexandr Shadrin

    Thanks - that all works fine now - for some reason the day I made the query I was getting the PHP FPM version afting setting PATH=/opt/plesk/php/7.2/bin:$PATH and typing php -v - my Laravel artisan commands were failing with weird errors. Today it is all good !

Please sign in to leave a comment.

Have more questions? Submit a request