• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.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