Re: [PHP4BETA] mail() doesn't work : bug ?
| From: | Olivier Cahagne | Date: | Tue, 09 Nov 1999 22:42:03 +0000 |
| Subject: | Re: [PHP4BETA] mail() doesn't work : bug ? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6079@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.
Sorry, there's no truss on the NetBSD box I have access to (either it
doesn't exist or root didn't install it).
man truss -> man trace but trace doesn't seem to exist neither.
I can't get debugger_on() to work.
> | 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
Tel: (613) 593 7406
Ambassade de France au Canada
Service Culturel
464, Wilbrod St.
K1N 6M8, Ottawa, Ontario, Canada