Page 1 of 1

Run PHP script remotely with exec()

Posted: Thu Jun 09, 2005 9:53 pm
by wrgill999
I have to run a php script on my unix server from a browser. This has to be done independent of the browser...it has to run in the background.

I've tried every variation I can think of
exec('php myscript.php');
exec('pathtophp/php myscript.php');
exec('pathtophp/php /pathtoscript/myscript.php');
and any other variation.

the permissions are set correctly.

When I'm on the command line and I type in php myscript.php, it runs perfectly.

??

Thanks.

Posted: Thu Jun 09, 2005 11:57 pm
by Revan
Try the -f tag on php.