[Hampshire] Sending mail from PHP

Top Page

Reply to this message
Author: Samuel Penn
Date:  
To: hampshire
Subject: [Hampshire] Sending mail from PHP

Hi,

I'm trying to set up DokuWiki to send email on my OpenBSD box, and I'm
running into some issues which look like they're PHP related. So, if anyone
with PHP knowledge could help, I'd be grateful.

Apache is chrooted, so I've installed mini_sendmail-chroot in the hope
of this fixing things, and it didn't. Since I'm not seeing any actual
errors anywhere (I just get back false when calling mail() ), I've
fallen back to trying to narrow down the problem and see if PHP is
even finding the sendmail binary.

I've written a fake sendmail program which outputs a file when it's
called, and I've configured PHP.ini to use this as the sendmail
binary. Apache chroots to /var/www, and I've stuck this binary in
/var/www/usr/bin. If I run it manually within the chroot, it does
as I'd expect. However, a simple PHP test program which only calls
mail() doesn't call this sendmail (or at least, it doesn't create the
output file).

Is there a better way to troubleshoot PHP? I've not had much
experience with it, and I can't see any useful errors being output
anywhere (hence my resorting to a fake sendmail program).

Thanks.

-- 
Be seeing you,                         http://www.glendale.org.uk
Sam.                        Mail/IM (Jabber): sam@???