Issue installing composer

Discussion in 'ISPConfig 3 Priority Support' started by RubenG, Feb 5, 2023.

  1. RubenG

    RubenG New Member HowtoForge Supporter

    Hi all
    I need to enable composer on one web site. End user need it to update a drupal site, i believe trought cli / ssh.
    Server is a new one added to our ispconfig group, deployed under Rocky 8, witch ISPCONFIG 3.2.9.
    I installed PHP 8.0 and PHP 8.2 from remy repos. On webs those runs fine.
    For this drupal web site, I've created a ssh user, with jailkit. I could conect with ssh.
    My problems:

    - Initially there was not php in the user jailkit ssh session. I've add "php" in the server configuration (Jailkit chroot applications section) , and late in the equivalent site section. The same with "composer", as I've see it in the jk_init.ini file. Now I have php and composer in the jailkit cli, ever if I remove the "php" and "composer" from server and site config!!. I've read someting about to manually erase it but I can't see where. Any advice about this?
    - Composer reports an error "The iconv OR mbstring extension is required and both are missing." This is because it need some php modules. Same with "php -m" or "php -v" Reports the base php install (7.4.33), but with a few php modules. so: how to add those modules to the jailkit?
    - I've tried to enable php 8.2 in jk_init.ini, and then in the server or site config, but wihout success; May be my initial config "php" and "composer" is hard-coded somewhere in the ispconfig database?

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Jailkit and its commands will not remove any apps you installed into a jail as far as I know, biút I don't see a problem with keeping them there. The PHP 8.2 section in the jailkit config is most likely for Debian and Ubuntu only, so paths will not match for RHEL clones, you might have to adjust them in the jailkit config files if you and to use these sections. You can also copy and install files manually into a jail using jk_cp command, the syntax is e.g.:

    jk_cp -j /var/www/clients/clientX/webY/ /some/path(to/binary/file

    Regarding missing PHP modules, you'll likely have to copy the missing module file and its dependencies (so better use jk_cp command instead of cp as it might resolve some dependencies on its own) plus the PHP in snippets for including them into the PHP config. But I don't use RHEL based systems, so I can't give you a more detailed answer on this as PHP config in Debian/Ubuntu and rhel based systems differs quite a bit.
     
  3. RubenG

    RubenG New Member HowtoForge Supporter

    Thank you Till. Now I know where to look. I wasn't understanding how the jailkit system worked. About PHP versions on CENTOS, I'm aware of their location, and that the "example" configuration file is from debian.
     
    till likes this.

Share This Page