Running command with specific PHP Version in terminal

Discussion in 'ISPConfig 3 Priority Support' started by muekno, Oct 27, 2023.

  1. muekno

    muekno Active Member HowtoForge Supporter

    One of my websites running on a single ISPconfig server is nextcloud running fine under PHP 8.1. No I have to run a command line command out of the ..../web/ directory. But I got the message command needs php 8 or later, php version is php 7.4 (the default on Debian 11)
    How can i force running the command with php 8.1

    Thanks for hint

    Rainer
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    if its a jailed user include the other php versions in the jail, and then use whichever one you need by using /usr/bin/php*.* instead of just 'php'.
    if you're running the command as root, or a non-jailed user (not safe) then you can skip the part about adding that php version to the jail.
     
    Th0m, muekno and till like this.

Share This Page