Hello,
I'm not sure if it is a PHP question or a RedHat question but here is what happened to me today.
I have set up a php script that is called once I receive a mail to a particular mail account thanks to this line added in my aliases :
my_alias |"/path_to_php_as_cgi/php /path_to_my_script/script.chp"
As you can see, the php script uses the CGI version of PHP. The script does a few things and send me an email when the task is finished.
The problems started when the script ran endlessly, thus sending me more than 9500 emails.
Although the mail() command is outside of any loop, I don't understand the reason why the script has been called forever. I had to delete the script on the server to stop this crazy self-spamming.
So, is there something I should do to prevent this to happen again? Note that the script worked greatly on a freeBSD system. So why on earth would it run endlessly on this RedHat thing.
Thanks for the helping.