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 } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php