• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question PLESK BIN Command Line not Working through PHP

rxb

New Pleskian
Hello,

Short story : I need PLESK BIN to be executed from a PHP file.

Long story
  1. I made a SH script to add Plesk subscription (newplesk.sh)
  2. I need this script to be started from a PHP file.
  3. It's working through SSH when typing
    Code:
    php testplesk.php
  4. It's not working when I enter the direct path into web browser (https://example.com/testplesk.php)
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.
 
Yo you review your error log? also check the open_basedir, probably you also don't have correct path/var ENV from web.
 
Back
Top