Double execution trouble with procmail script invoke

From: Date: Fri, 14 Jun 2002 06:09:20 +0000
Subject: Double execution trouble with procmail script invoke
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102157@lists.php.net to get a copy of this message
I have a fairly obscure setup where I have procmail directly executing a PHP script specially made for this purpose. This php script uses the same code (classes) used for the web applications, and the classes works just fine. The symptom: I am getting double INSERT's into database. Conclusion: The php script is getting invoked twice. I concluded this by inserting some dummy rows into the DB wtih 'getmypid()' as the values, and two rows get inserted, each with a PID one digit apart, yet all other data the same. Attempts: I have attempted to diddle all kinds of stuff, turned of register_globals, register_argc_argv, surfed usenet archives, web. seems I have no clue who is invoking this. Interestingly, only one process' output gets piped to the MAIL_IMPORT_LOG log file (see below). Any suggestions greatly appreciated. Using 4.1.1 and ADODB 2.12 on RedHat 7.2 Here is my procmail if anyone cares... DOCUMENT_ROOT=/home/app/htdocs/classes MAIL_IMPORT_LOG=/home/app/tmp/import.log PROC_SUBJECT=formail -xSubject: PROC_FROM=formail -xFrom: PROC_TO=formail -xTo: TRAP="php -q /home/app/poller/mail_importer.php" :0 * ^To:.*test.host.com { :0 c | $TRAP >> $MAIL_IMPORT_LOG :0 mail/import }

« previous php.general (#102157) next »