• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

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