Re: Re: Weird behavior of exec()

From: Date: Fri, 16 Jul 2010 15:45:24 +0000
Subject: Re: Re: Weird behavior of exec()
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-306950@lists.php.net to get a copy of this message
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.

« previous php.general (#306950) next »