From: Leonardo on
Em 16/07/2010 09:23, Bob McConnell escreveu:
> You are running b.php as an external command, so it is running as a CLI,
> not in the httpd server. You need to check to see how your PHP command
> line is configured, it may need the full tag no matter how the server is
> set up.
>
> Bob McConnell

While reading your post, I thought about using the script and binary
full paths. Now it works.

exec('/usr/local/bin/php /full_path_here/a.php > output.txt &');

The weirdest to me thing is this:

passthru('pwd'); // shows the current directory correctly
passthru('php -h'); // shows php help output correctly

So, if my current working directory is correct, and if "php -h" is
enough for help message, why should I use full path in my sample?

Anyway, it's working and my application is back on-line.

Thank you.