Enough banging my head against the wall...
I'm building an application in PHP made up of web server stuff and batch stuff...
Most of the time the batch stuff will run off of a cron schedule, but every now and then, and for testing, we want to be able to fire off the batch from a web interface.
Here's what's going on:
In the batch I have:
removed all reference to HTTP variables
set the carriage returns to UNIX format
It runs ok from the command line. Lovely
Then I have a webpage calling the batch, and I can't get it to work.
I have tried both exec and passthru and both of them seem to work (exec gives what looks like error 0 - everything's fine) as far as the web page is concerned.
The web page calls the exec/passthru, but nothing happens. It doesn't product output (will write to sql table when it's working), and more 'interestingly' nothing appears in the logs for it.
Even more 'interesting' is that when I use an obviously wrong filename for the batch, exec still reports 0 and nothing ends up in the log.