Hello,
Short story : I need PLESK BIN to be executed from a PHP file.
Long story
testshell.php :
newplesk.sh :
All of these files are chown in xxx : psacln the .SH is chown +x , the subscription is added through putty but i would like it to work when a WEB button is clicked.
Any help please ? Best Regards.
Short story : I need PLESK BIN to be executed from a PHP file.
Long story
- I made a SH script to add Plesk subscription (newplesk.sh)
- I need this script to be started from a PHP file.
- It's working through SSH when typing
Code:
php testplesk.php
- It's not working when I enter the direct path into web browser (https://example.com/testplesk.php)
Code:
<?php
exec('php testshell.php');
?>
testshell.php :
Code:
<?php
shell_exec('sudo sh newplesk.sh');
?>
newplesk.sh :
Code:
plesk bin subscription --create 6.domain.tld -owner admin -service-plan "Default Domain" -ip xxx.xxx.xxx.xxx -login jdoe6 -passwd "pwd6"
All of these files are chown in xxx : psacln the .SH is chown +x , the subscription is added through putty but i would like it to work when a WEB button is clicked.
Any help please ? Best Regards.