• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Php cli + ssh chroot

futureweb

Regular Pleskian
Php cli + ssh chroot (solved)

Hey there,

I got a little Problem with SSH CHROOT - I need CLI PHP in some of our SSH CHROOT.
So far so good - PHP binary, some libraries ... and everything looks good.

But there is one weird thing - everytime I start PHP on CLI I get this error: No entry for terminal type "linux";
And I just can't figure it out how to get rid of this error?

Hope someone here can help me on this

Thank you
Andreas Schnederle-Wagner
 
Last edited:
Andreas are you running php with full cgi-path? ie /usr/bin/php -f <full-path-to>
 
Hi,

same error if calling "php" or "/bin/php" - guess "/bin/" is in ENV PATH in chroot ...

Andreas
 
You may have to switch those users to /bin/bash (Domain settings). Since that errors indicates loading php on a linux terminal which is not existant.
 
Well - under Domain settings I got "/bin/bash (chrooted)" - no idea why PHP thinks it runs on linux Terminal!
And I found some other problems - all shared PHP Modules are not loaded into chrooted PHP etc. etc. etc.

Anyone got PHP running without problems in Plesk CHROOT environment? Maybe some tips how to do?

thank you
 
Was able to get rid of the "no entry for terminal type" error by copying the terminfo into chroot
(/var/www/vhosts/DOMAIN/lib/terminfo/*)

I guess this implies no security threat, or?

But still the problem with all the PHP modules - guess I have to pick every and also put it into chroot?
With big troubles when updating PHP on Server ... every chroot env needs PHP / PHP Modules update too then?

Andreas
 
Last edited:
alright ... for everyone who want's to do the same:

I compiled an extra PHP Version for CLI:
'./configure' '--prefix=/usr/local/php5318-cgi' '--with-config-file-path=/usr/local/php5318-cgi/etc' '--with-config-file-scan-dir=/usr/local/php5318-cgi/php.d' '--with-jpeg-dir=/usr/local/php5318-cgi' '--with-png-dir=/usr/local/php5318-cgi' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--cache-file=config.cache' '--with-libdir=lib64' '--disable-debug' '--with-pic' '--disable-rpath' '--with-pear' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--enable-ucd-snmp-hack' '--with-unixODBC' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--with-apxs2=/usr/sbin/apxs' '--with-mysql' '--with-gd' '--enable-dom' '--disable-dba' '--without-unixODBC' '--enable-pdo' '--enable-xmlreader' '--enable-xmlwriter' '--with-pdo-mysql' '--enable-mbstring' '--with-mysqli' '--with-xsl' '--with-kerberos' '--with-openssl' '--with-imap' '--with-imap-ssl' '--enable-soap'

so whole php is located at "/usr/local/php5318-cgi/" ... then I had to copy severy lib64 libraries to the chroot - and now I got a working PHP install with all needed featues under my chroot
 
Back
Top