PHP 7.4 cli extensions in jailkit

Discussion in 'Installation/Configuration' started by sjaakmans, Jul 26, 2021.

  1. sjaakmans

    sjaakmans New Member

    Hello,
    I just configured ISPConfig and almost everything is working fine. But I have one major issue.

    When I call php -m as a Jailkit user I get the following extensions:
    Code:
    [PHP Modules]
    Core
    date
    filter
    hash
    libxml
    openssl
    pcntl
    pcre
    Reflection
    session
    sodium
    SPL
    standard
    zlib
    
    [Zend Modules]
    But what I need is this:
    Code:
    [PHP Modules]
    apc
    apcu
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    FFI
    fileinfo
    filter
    ftp
    gd
    gettext
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mbstring
    memcached
    msgpack
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    Reflection
    session
    shmop
    SimpleXML
    soap
    sockets
    sodium
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    How can I enable these extensions for the Jailkit users?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Running "php" inside the jail will run the same php version as the system default, which may not be 7.4. If you add 'php7_4' to the jailkit sections which are installed (either in your server config or under website options) it will include all php modules/files for that version.

    This is an area that could use some enhancement, eg. it would be nice to set /usr/bin/php inside each jail to use the same php version as the website is set to (and include the corresponding jailkit section automatically). There is an issue for that, but for now you'll just have to make local modifications to achieve what you want.
     
    ahrasis likes this.
  3. sjaakmans

    sjaakmans New Member

    The problem isn’t the php version. But the missing extensions. A cronjob runs the jailkit version of php which is missing a lot of extensions.
    This causes problems with some of my websites.
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Yes, do reply back if the above doesn't fix it (and include 'php -v' output from within the jail, please).
     
  5. andrace

    andrace New Member

    I have same problem, not loaded extensions in a jailkit with php-cli

    PHP 7.2.34-28+ubuntu20.04.1+deb.sury.org+1 (cli) (built: Nov 19 2021 06:36:58) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

    a fpm has all modules but not a cli

    not loaded config files and therefore not work cron jobs dependent on extenstions
    web1@hosts02:~$ php -i | grep "Configuration"
    Configuration File (php.ini) Path => /etc/php/7.2/cli
    Loaded Configuration File => (none)
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Same response as to the original poster, only you have identified that your default php cli version is 7.2 (which I don't believe is "correct" for ubuntu 20.04). So you add php7_2 to your list of jailkit sections and see if things are resolved after jails update.
     
    ahrasis likes this.

Share This Page