additional PHP Version for Jailkit user (SLOVED)

Discussion in 'Installation/Configuration' started by degoya, Nov 11, 2024.

  1. degoya

    degoya New Member

    How i can use the additional PHP Version for a jailkit user?

    i've compiled and installed php 8.3.13 and setup as php-fpm for Nginx with those settings based on a howto:
    Path to the PHP-FPM init script: php-8.3.13-fpm
    Path to the php.ini directory: /opt/php-8.3.13/lib
    Path to the PHP-FPM pool directory: /opt/php-8.3.13/etc/php-fpm.d

    That works fine so far. But when i create a JailKit SSH User i only get the system PHP Version when i connect and do a php -v in the cli.
    What i need to do to setup the same php version for the jailkit user?

    i've tried to add this to the jk_init.ini
    Code:
    [php8_3_13]
    comment = php version 8.3.13
    paths = /opt/php-8.3.13/bin/php, /opt/php-8.3.13/bin/php-cgi, /opt/php-8.3.13/lib, /opt/php-8.3.13/etc
    includesections = php_common
    
    but when i try
    Code:
    jk_init -v -j /var/www/clients/client4/web39 php8_3_13
    i get a error because he can't create the folder opt in the web39 folder.

    How i need to set everything up that i can use additional php from the website in the cli of the according shell user?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    On ISPConfig 3 system installed with ISPConfig autoinstaller, the /etc/jailkit/jk_init.ini already contains sections for all installed PHP version (and the autoinstaller installs all of them that are available from the Ondrej Sury repository). Perhaps the PHP you compiled is not set up properly?
    You do not mention what OS and what version you are running, so it is hard to help you more.
     
  3. degoya

    degoya New Member

    ahh i've forgot to say that i'm on debian bullseye and used the perfect multi server setup tutorial to setup the server. i've setup the additional PHP like shown in a tutorial on howtoforge. The PHP works when i use it in the websites but i'm not able to get it running with jailkit.

    Is there a ways to set it up manually and the correct way? any tutorial on this?
    why isn't a ssh user for a site using the same php like the site uses?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ahrasis likes this.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You add them in ISPConfig under System > Server config in the jailkit settings. No need to manually add them using jk_init. You can access the additional PHP versions by using their path like /usr/bin/php8.3 in the website.
    You seem to have used an outdated tutorial then as additional PHP versions are not installed in /opt anymore for many years. ISPConfig now uses the packages from sury, which get installed by the auto-installer automatically. So no need to manually install any additional PHP versions and if you disabled additional PHP versions in the auto-installer, then follow this guide to install them:

    https://www.howtoforge.com/ispconfig-php-debian/
     
    Last edited: Nov 12, 2024
  6. degoya

    degoya New Member

    thanks for all the help and pointing me in the right direction. then i'm going to install the packages from Sury and follow the Tutorial Till has posted.
     
  7. degoya

    degoya New Member

    Everything works great now after installing the PHP from Sury, thanks again for your Support.
    I've installed the needed PHP Version with
    Code:
    https://www.howtoforge.com/ispconfig-php-debian/
    then i added the php8_3 to the Jailkit Configs:
    Code:
    ispconfig -> system -> server config > <server> -> jailkit -> Jailkit chroot app sections
    after updating the ssh users jailkit and adding the following to the .bashrc to switch to the wanted php version
    Code:
    alias php='/usr/bin/php8.3'
     
    ahrasis likes this.
  8. the jailkit entry is required.
    jailkit section should point to phpn_n where n = the digits of the version for example php8_4
     
    ahrasis likes this.
  9. Hi I'm having some WordPress trouble, I suspect php cli in jail is not correctly set up, I found under additional PHP versions new tab PHP-CLI settings but can not find what to fill into PHP Jailkit section, it seems to be invalid input whatever I find in any searches for what to put in there.
    I bought latest manual, the tab is not in there, I also found latest multi php installation documentation https://www.howtoforge.com/ispconfig-php-debian/ that doesn't either mention this tab.
    I would appreciate example of what to fill in there i.e. for PHP 8.2.

    upload_2025-11-3_18-1-57.png

    Regards
    Stefan
     
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  11. till

    till Super Moderator Staff Member ISPConfig Developer

    It was not there at the time he checked it. I released new versions of the guides yesterday evening.
     
    ahrasis likes this.
  12. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Note that, with my apology, as I read, I checked and it was already there, so I assumed it was there before, again, my apology.

    By the way, @till does that mean you also just added it for Ubuntu as well, I can't remember but I added php8.4 to my Ubuntu 24.04 following some guides but I am not sure whether that was from https://www.howtoforge.com/ispconfig-php-ubuntu or from this forum.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The Debian and Ubuntu guide have been updated. Btw, the guides have an updated date, so you can see there too that they had been updated, it currently shows "Updated: Nov 03, 2025"
     
    ahrasis likes this.
  14. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Whether my eyes, or too much caffeine, or the updated date is invisible to me, I really can't find it anywhere, even using browser finding tool. :confused::rolleyes:
     
  15. remkoh

    remkoh Active Member HowtoForge Supporter

    Upper right corner of the page shows this
    upload_2025-11-4_17-15-4.png
     
    ahrasis and till like this.
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    And the text I posted is from the tutorial list.

    tutorial-update-date.png
     
    ahrasis likes this.
  17. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I was looking inside the article, from start to end, may be too much inside the box, I didn't think it was just outside it... :D
     

Share This Page