• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Sudoing several Plesk command line utilities from PHP fails

ESKIS

New Pleskian
Hi,

I'm 'sudoing' Plesk command line utilities (those in /usr/local/psa/bin/) like 'customer' or 'site' from PHP, via the exec() function.

Ex : "sudo /usr/local/psa/bin/site --create ecz-1.toto.com -webspace-name ecz-clt-001.toto.com -www false -www-root toto.com -php true -notify false"

Of course, I've customized the sudoers to avoid password prompting. Testing on the command line is OK.

Running such a command from PHP works fine.

But if within the same script I fire a second exec() of the same kind (for exemple to add anoter domain), the PHP script seems to be interrupted when the second Plesk command returns.

Note that the Plesk commands executes, because the second domain is created, but tracing shows that PHP stops somewhere in the exec().

Any idea of what is happening ?

Thanks,
 
Back
Top