Add PHP version to chrooted - FireStorm ISP

Add PHP version to chrooted

Support Wissensdatenbank

Du bist hier:
Print

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
wget https://plesk.zendesk.com/hc/article_attachments/360023025260/update_chroot.zip
unzip update_chroot.zip ; chmod u+x ./update_chroot.sh PHPPATH='/opt/plesk/php/8.1'
./update_chroot.sh --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 ./update_chroot.sh --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
./update_chroot.sh --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