ID: 28748 User updated by: karthur at kzoo dot edu Reported By: karthur at kzoo dot edu Status: Wont fix Bug Type: iPlanet related Operating System: Solaris 8 PHP Version: 4.3.6 New Comment:
Thanks for the quick feedback. However, we have a similar problem with exec so the suggested work-around won't help. I'm going to try to rewrite mail.c to use sfio from AT&T. The downside is that I'll then have to reimplement that fix everytime we upgrade php. I can share the code I come up with if anyone is interested. If it does work, then I'll try to look more into the exec function as well. If it doesn't work then another work-around I thought of is to have php write the email to a file and then have a cron-scheduled system script pass the file off to sendmail. Previous Comments: ------------------------------------------------------------------------ [2004-06-12 22:31:45] [EMAIL PROTECTED] This problem is well known and a problem of Solaris in all versions. For PHP 4.3.4 we ported a lot of code from PHP5 back to eliminate fopen(),... Scripts now start without any problems (until PHP 4.3.3 even this could fail). But there are still a lot of extensions that use stdio functions. A solution would be to write a temporary file with the complete mail (headers and text) and then execute: exec("/bin/sh -c \"/usr/lib/sendmail -t </tmp/mail.txt\""). ------------------------------------------------------------------------ [2004-06-12 19:07:13] karthur at kzoo dot edu Upon further searching this sounds like bug report 25195 which had no solution given. Any chance someone has discovered a work-around for this? ------------------------------------------------------------------------ [2004-06-11 23:40:17] karthur at kzoo dot edu Description: ------------ mail() stops working a few minutes after Sunone 6 web server starts, which makes this look like a resource problem... Config line: "./configure --with-mysql=/usr/local/mysql --with-nsapi=/home/netscape/servers --enable-track-vars --enable-libgcc --with-ldap" Note that mail() does work briefly after web server is restarted so it doesn't seem to be a configuration problem. Reproduce code: --------------- <?php mail("[EMAIL PROTECTED]", "Test Subject", "Test Body"); ?> Expected result: ---------------- expect to receive an email Actual result: -------------- no email received I get no php or system errors but the following error shows up in the IPlanet logs: "trying to GET /is/sys net/test/email.php, php4_execute reports: PHP Warning: mail(): Could not execute mail delivery program '/usr/lib/sendmail -t'" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28748&edit=1