Add PHP version to chrooted

Support Wissensdatenbank

Du bist hier:

Add PHP version to chrooted

For cronjobs to work with PHP, SSH access must be enabled on the customer account. We recommend to use the secure chrooted environment. In order to use PHP at all, the following commands must be executed. Please replace 8.1 with the PHP version you want to use. Of course, it is a prerequisite that the corresponding PHP version is already installed in Plesk.


mkdir /tmp/chroottmp
cd /tmp/chroottmp
unzip ; chmod u+x ./ PHPPATH='/opt/plesk/php/8.1'
./ --add $PHPPATH/bin/php VHOSTS=`grep HTTPD_VHOSTS_D /etc/psa/psa.conf | awk '{print $2}'` cp -a /usr/share/zoneinfo $VHOSTS/chroot/usr/share/zoneinfo for i in $PHPPATH/lib/php/modules/*.so; do ./ --add $i; done mkdir -p $VHOSTS/chroot$PHPPATH/etc/ cp -a $PHPPATH/etc/ $VHOSTS/chroot$PHPPATH/; rm -rf $VHOSTS/chroot$PHPPATH/etc/php-fpm.d
sed -i.bkp 's/;date.timezone =/date.timezone = Europe\/Zurich/' $VHOSTS/chroot/$PHPPATH/etc/php.ini
./ --apply all
cd /
rm /tmp/chroottmp



War dieser Artikel hilfreich?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Please submit the reason for your vote so that we can improve the article.
Brauchst du Hilfe?
Related Post