Run PHP script remotely with exec()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wrgill999
Forum Newbie
Posts: 2
Joined: Thu Mar 10, 2005 12:23 pm

Run PHP script remotely with exec()

Post 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.
Revan
Forum Commoner
Posts: 83
Joined: Fri Jul 02, 2004 12:37 am
Location: New Mexico, USA
Contact:

Post by Revan »

Try the -f tag on php.
Post Reply