View Single Post
  (#5 (permalink)) Old
Kieran Kieran is offline
Techie & Moderator
Kieran is on a distinguished road
 
Kieran's Avatar
 
Posts: 753
Join Date: Apr 2006
Location: Swindon, UK
Default Re: shebang for php5 - 11/02/2008, 2:04 PM

Quote:
Originally Posted by arnoldkrg View Post
However, a bounce message was sent to the originator of the email. Obviously not desirable since the message was actually forwarded to and received by the script.

Changed the shebang line to the following:

#!/usr/bin/php -q

the -q switch suppresses the bounce message and allows the piped email to be processed silently.
Good call there; that is exactly what you are supposed to do when you are running a script blind (no user will be present to see output and so output is not required). This switch is also useful for those running PHP scripts via a cron job.

Thanks for sharing