patrik
Verified User
- Joined
- Sep 6, 2006
- Messages
- 128
I'm having some problems to fork a process to the background from a DA plugin I'm writing. It all comes down to the following:
I have a test.php script which contains:
If I run it in the terminal: php test.php, it does what I expect which is: forking the sa-learn process to the background and continues with the script (= ends it, forked process still running). But when I access it from DirectAdmin (http://testbed1.kontrollpanelen.se:2222/CMD_PLUGINS/salearn/test.php) it does NOT continue with the script, it waits for the process to end before it generates the page and sends it to the browser.
Why doesn't it work when accessing the script from DA!?
Thanks,
I have a test.php script which contains:
PHP:
#!/usr/local/bin/php -c /usr/local/lib/php.ini
<?php
echo system("nohup nice -n 20 /usr/bin/sa-learn --spam --dbpath /home/testuser1/.spamassassin/ \\
--mbox /var/mail/testuser1 >/dev/null &");
?>
Why doesn't it work when accessing the script from DA!?
Thanks,
Last edited: