views:

80

answers:

1

Hey Everyone,

I've set up a daemon (daemon.php) using PEAR's System_Daemon which waits for something to appear in the database. Once something is there, the daemon gets enough information and sends it out to another script (execute.php) using the shell_exec command this way I'm not worried about waiting for a response and holding up the daemon.

Both of the scripts work fine alone and I'm even able to call shell_exec before calling System_Daemon::start(); . However, if I trying calling it AFTER System_Daemon::start();, then I get an Access Denied only when outputting to a file.

I'm still new to Daemons in general, so any ideas or thoughts would be great!

Thanks Guys!

A: 

As far as i know, System_Daemon uses a lock file (look for some pid file in /var/run/appname/). This might be the issue with you, but I am not sure how it can affect calling shell_exec(). Will keep chekcing and let you know if I find anything. Do update if you have any luck.

pinaki
Well, I'm able to use wget, which I can modify my code to make it work, but whenever I use the command `php` or `/usr/bin/php` I get either a file not found or a access denied message. Hope this helps out somewhat.
Jesse