Add PHP Composer to chrooted
Please add PHP Composer to chrooted Environments.
Many Customers Need PHP Composer to install various scripts, cms Systems and libaries.
A current big Problem is the new typo-neos System - you must use Composer to install at sources correctly
A other Problem are PHP API's and Libaries like Payment Companies like PAYMILL etc..

We are building an extension to help you use Composer straight from the Plesk interface. Help us make a better solution for you by taking a survey on how you use Composer.
The survey will take 4-6 minutes:
https://pt-research.typeform.com/to/LyPiPG
Beta version of the Extension is available for Plesk Obsidian: https://docs.plesk.com/release-notes/obsidian/whats-new/
-
Carlos commented
That is useless, I can't pass commands to it.
-
Anonymous commented
Hello,
i have some problems with composer in an chrootet environment.
I'm using this:
OS: Ubuntu 18.04.3 LTS
Produkt: Plesk Onyx 17.8.11 Update Nr. 71 , zuletzt aktualisiert: 26. Okt. 2019 00:49:08It's not possible, to make composer available for a chroot user.
chroot /var/www/vhosts/chroot composer
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.utf8)Fatal error: Uncaught Error: Class 'Phar' not found in /usr/lib/plesk-9.0/composer.phar:23
Stack trace:
#0 {main}
thrown in /usr/lib/plesk-9.0/composer.phar on line 23Can somebody tell me, what's wrong?
-
Gabriel T commented
No extension could possibly cover all abilities of composer in my opinion. I would still prefer it as a CLI module that's why I personally add it to chroot in all my servers normally. However a lot of libraries are needed to make it work correctly in CLI context.
-
rdk commented
An extension is great, but there should be an option to use composer from cli as most of the developers would prefer to use it in a traditional way (from cli).
-
Tobias Daur commented
+1
-
Balogh Zoltán commented
A possible solution, it works for me. The timezone and the path for php.ini and the php extensions directory maybe different:
wget https://plesk.zendesk.com/hc/article_attachments/115005093613/update_chroot.tar.gz
tar -xvzf update_chroot.tar.gz
rm update_chroot.tar.gz
cp /etc/ld.so.conf* /var/www/vhosts/chroot/etc
./update_chroot.sh --add ldconfig
./update_chroot.sh --add ldconfig.real
./update_chroot.sh --add env
./update_chroot.sh --add php
mkdir /var/www/vhosts/chroot/usr/share
cp -a /usr/share/zoneinfo /var/www/vhosts/chroot/usr/share
for i in /usr/lib/php5/20131226/*.so ; do ./update_chroot.sh --add $i ; done
cp -a /etc/php5/cli/php.ini /var/www/vhosts/chroot/etc
sed -i.bkp 's/;date.timezone =/date.timezone = Europe\/Budapest/' /var/www/vhosts/chroot/etc/php.ini
mkdir /var/www/vhosts/chroot/usr/lib/plesk-9.0
cp -a /usr/lib/plesk-9.0/composer.phar /var/www/vhosts/chroot/usr/lib/plesk-9.0/
./update_chroot.sh --add composer
./update_chroot.sh --apply all
chroot /var/www/vhosts/chroot composer -
Balogh Zoltán commented
+1 VERY urgent
-
Anonymous commented
+1 VERY urgent
-
Anonymous commented
+1 very urgent
-
Björn Strausmann commented
+1 urgent
-
Cool Dark commented
+1 urgent
-
Anonymous commented
Composer in chroot is most important. Most popular webmailer Roundcube needs composer for installing plugins...
All other server solutions habe no problem with copmposer only plesk has :( :(
-
Sidi commented
Another example is additional commands relating to deploy with the composer:
php[env] artisan db:seed --class=delete_tables
php[env] artisan migrate -
Elompenta commented
You've created a beutifull tool with you applications composer.json scan ;)
I think this topic is already done in Plesk 12.5 or?
-
zio fester commented
Hi all,
reading the manual I have found here:
http://download1.parallels.com/Plesk/Doc/it-IT/online/plesk-customer-guide/index.htm?fileName=74969.htmit seems not to be possible to run composer in non-chroot enviroments. But carefully reading this post:
https://github.com/composer/composer/issues/2867
And copying the necessary files needed by php to run (namely, php modules like phar and others), it is possible to have it running. So, in my opinion, it is always best to do some investigations directly before asking support that could come very long after you have asked.
-
zio fester commented
Hi plesk/parallels/odin staff, do you have a timeline for this feature?
-
Anonymous commented
It is really important to us to have PHP Composer in Chroot Env :)
-
Anonymous commented
composer in chroot is very important
-
Anonymous commented
Composer functionality in chroot vhost would be really nice
-
deilbrecht commented
@AK
we are a hosting company and would appreciate the combination of the composer with chrooted environments, too.