note 10901 deleted from function.mail by jimw

From: Date: Wed, 31 Oct 2001 23:10:22 +0000
Subject: note 10901 deleted from function.mail by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19886@lists.php.net to get a copy of this message
PHP and qmail: the solution? A lot of people have reported that the mail() function does not work with qmil for them. I had this problem: qmail worked fine from the command line but when i ran php mail() nothing happened. The apache error_log read : qmail-inject: fatal: read error On further investigation it appeared that qmail had been trying to open the /root/.lists file which it didn't have permissions for... But why did qmail want to open settings for root when it was being called by the apache user 'nobody'. A full techie explanation is beyond me but I found eventually that the httpd.conf file was to blame . In this file there are two lines which specify which user and group apache runs as: User nobody Group nobody I found that if these lines were placed _before_ the section of the file which deals with the modules (the AddModule commands etc) it sorted out the problem: mod_php correctly calls qmail as 'nobody'. i hope this helps somebody else as much as it helped me!

« previous php.notes (#19886) next »