|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-06-11 23:40 UTC] 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("karthur@kzoo.edu", "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'"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 UTC |
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\"").