Re: [PHP4BETA] mail() doesn't work : bug ?
| From: | Stig Bakken | Date: | Tue, 09 Nov 1999 20:11:36 +0000 |
| Subject: | Re: [PHP4BETA] mail() doesn't work : bug ? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6065@lists.php.net to get a copy of this message | ||
I'm not too familiar with FreeBSD's system call tracer, but try something
like this:
truss -f ./php -f testscript.php 2> trace.out
Then you can look for "exec" in strace.out and see if sendmail is exec'ed
and what parameters it gets, or if it fails.
- Stig
On Tue, 9 Nov 1999, Olivier Cahagne wrote:
| Hello,
|
| This is weird, the mail() function does not seem to work either with
| PHP-4.0b2 compiled as a module or with PHP-3.0.12 compiled as CGI.
| Symptom : I never receive mail although mail() returns 1.
|
| Both ini files have sendmail set to /usr/sbin/sendmail -t (I also tried
| /usr/sbin/sendmail). This is the only sendmail available (NetBSD 1.3.3).
| Safe-mode is off.
|
| 'Mail' works fine from a shell, and I can send mail via a CGI written in
| sh that calls /usr/sbin/sendmail.
|
| Here's the PHP script :
|
| <?
| echo system("ls");
| if (mail("cahagn_o@epita.fr", "Subject", "Body"))
| {
| echo ok;
| }
| else
| {
| echo notok;
| }
| phpinfo();
| ?>
|
| The system() and phpinfo() are juste to make sure safe_mode is off and
| sendmail is set correctly.
| So, it always returns ok but I never receive mail.
|
| I tried to set the header "Return-Path: blabla" but it does not work.
|
| Any idea ? How can I debug this ?
|
| I guess I know how mail() works as I've been using it on another
| computer (PHP-4.0B2, Solaris 2.5) for 1 month without any problem.
|
| PS: I have a basic PHP compilation (here for the module version):
|
| ./configure --with-config-file-path=/etc/httpd/conf \
| --with-apache=../apache_1.3.9
|
| --
| Olivier Cahagne
| snina@ambafrance.org
| olivier.cahagne@epita.fr
|
|