Re: mail() -- has anyone had it fail ...

From: Date: Wed, 19 Jun 2002 22:21:58 +0000
Subject: Re: mail() -- has anyone had it fail ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103030@lists.php.net to get a copy of this message
Hello, On 06/19/2002 05:29 PM, Erik Price wrote:
I am just wondering if anyone has ever seen what happens if the mail() function is called in a PHP script if the PHP binary was never compiled with awareness of sendmail. I'm trying to figure out if that might be the source of my problem with the mail() function. One of the annotations at http://www.php.net/manual/en/function.mail.php suggests that you will get a message like: "mail() not supported in this PHP build" ... if PHP was not compiled with awareness of sendmail (during the "./configure" script). I don't get this message. So I am hoping that sendmail was recognized on my system. But for some reason, even with the simplest string arguments, I can't get the mail() function to work! It returns empty/0 every time. So if anyone can confirm that the above message is what you see if that is the source of the problem, I would be very grateful. I would rather not recompile PHP just to find this out.
The problem is that most likely you did not compile PHP with the root user because /usr/sbin is usually not in the PATH of the non-priviledge users. You need to recompile PHP with any user with a command line like this: PATH=$PATH:/usr/sbin ./configure --your-configure-options-here -- Regards, Manuel Lemos

« previous php.general (#103030) next »