When I try to use PHP to send mail through qmail I get a "qmail-inject: fatal: read error in my Apache error_log."
I have read through the PHP list and I have seen (and tried) the following solutions:
- Put /var/qmail/bin/qmail-inject into php.ini
- Ensured that all appropriate sendmail links exist
- Also tried the permutations of sendmail, and sendmail default etc in php.ini.
- Tried (temporarily!) adding apache (web-server is run under user apache, group apache) to root group (only for testing - not advisable permanent solution).
- I don't have anything calling QMAILMFTFILE but I am not sure where this is called from. It doesn't show in printenv. Maybe someone could clarify this? But I tried adding QMAILMFTFILE=/tmp/.lists to my apache start-up file just in case.
- Added user apache group apache in httpd.conf before modules are called.
qmail functions well on my computer but it's not the problem in any case because the e-mail never enters the mail system. The error mentioned above shows up in the Apache error-log. PHP is performing very well in every other capacity.
There have been a number of solutions given in the PHP list and I have tried them all but none have worked. Does someone have the definitive answer on this?
How can I test this further?
And, is it possible to put the call to qmail directly into the PHP application (eg phpWebsite, theexchangeproject etc.)?
I am running Mandrake Linux 8.0 with PHP 4.0.4pl1 and Apache 1.3.19.