• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

Calling domain.sh out of php

C

Cye84

Guest
Hi, wenn i create new domains with php, i got these errors:

/usr/local/psa/bin/domain.sh -c new-domain.com -clogin mydomains
/etc/init.d/qmail: line 152: start-stop-daemon: command not found
sh: line 1: start-stop-daemon: command not found
mailmng: Service /etc/init.d/qmail failed to restart

System error 2: No such file or directory
An error occured during domain creation: unable to update domain preferences: Unable to update domain data: Failed mail post-configuration: Can't create mail domain servie: mailManager->addDomain() failed: mailmng failed: mailmng: Service /etc/init.d/qmail failed to restart

System error 2: No such file or directory

The same command in the ssh-connection works fine.
What could be wrong with my php script?
I simply call:
exec('/usr/local/psa/bin/domain.sh -c new-domain.com -clogin mydomains');

// Using Plesk 8.2 on a Debian 3.1
 
it seems that PATH variable which is used by PHP has no '/sbin' directory, since 'start-stop-daemon' command is in /sbin. Try to set PATH environment correctly at the start of PHP script to have '/sbin'.
 
'/sbin' is within the PATH variable.
By the way, why should qmail restart when i add a new domain?
 
qmail restarts to re-read configs about virtualhosts where new domain is added.
As to the error itself: I can only suggest you to change all occurences of 'start-stop-daemon' in /etc/init.d/qmail to '/sbin/start-stop-daemon'. Hope it helps.
 
But in spite of the qmail errors, the domain isn't added in plesk,
so it wouldn't help me if qmail would start correctly
 
Back
Top