imp 2.2.6 can send mail w/php3 but not php4

Liam Hoekenga liamr@umich.edu
Tue, 31 Jul 2001 13:05:41 -0400 (EDT)


I've got imp 2.2.6 working fine with php 3.0.18 (cgi).
I would like to get it to work with 4.0.6 (cgi).

It can send mail while using php 3x, but not php 4x.  Now, before anyone
raises the cry of "go read the FAQ", I've tried the suggestions listed in
there (section 5.3.5 even - didn't work), and I don't think the problem
I'm having is the one described in the faq.

It's not that mail you try to send appears to get sent and never
arrives... it's that when you press the "send" button, the contents of
your message composition window are replaced with a completely fresh (and
blank) copy.  Same thing happens when you try to forward a message.

Here's the deal..
this fragment of php code works from both php4 and php3.

    <?
    mail("liamr@umich.edu", "cheese", "cheese is yummy\n");
    ?>

If I truss the webserver while I execute that code, I can see execute
sendmail:

   execve("/usr/lib/sendmail", 0x00038C64, 0x00038C74)  argc = 3
       *** SUID: ruid/euid/suid = 60001 / 0 / 0  ***

If I truss the webserver while I try to send a message from imp, if I'm
using php3, I can see it execute sendmail.  If I rename sendmail, I see it
get an Err#2 ENONENT when it tries to exec sendmail:

   execve("/usr/lib/sendmail", 0x00038C64, 0x00038C74) Err#2 ENOENT

and I message to that effect in apache's error log.

If I'm using php4 with imp, nothing.  No system calls of any sort related
to sendmail, and on the user side, pressing send only gets you a fresh
copy of the composition screen.

The path to sendmail is defined in the appropriate places (php.ini,
php3.ini, defaults.php3), and we're not running php in safe mode.

from horde/imp/config/defaults.php3
   $default->path_to_sendmail               = "/usr/lib/sendmail";

(i've also tried adding the "-t -i" flags to the end of that).

from my php.ini:
   sendmail_path   =       "/usr/lib/sendmail -t -i"         ;

from my php3.ini
   sendmail_path   =                               ;

(mind you phpinfo() from php3 reports that it's default sendmail path is
"/usr/lib/sendmail -t" even without assigning it a value in the ini file.
php4 isn't so lucky.  If I don't assign it a value in php.ini, it's lost.)

Since the mail() call does work with both of my php installations, I'm
kinda thinking that when I'm running php4 with imp, it's not actually
getting to the piece of the imp code that calls sendmail.

Does anyone have suggestions?  I'm a bit baffled here.

The software in question... php 3.0.18, php 4.0.6, Apache 1.3.20, solaris
(sparc) 2.6,  imp 2.2.6, horde 1.2.6, and tested from various flavors of
Netscape 4, IE 5, and Mozilla 0.9x on Solaris and MacOS.

Liam Hoekenga
UM Webmaster Team