Re: [PHP-DEV] [PHP] mail() help (fwd)

2001-07-31 Thread Jani Taskinen


This is most likely the patch that 'broke' it;



revision 1.121
date: 2001/02/21 07:39:13;  author: sas;  state: Exp;  lines: +2 -2
Instead of assuming that sendmail lives in /usr/lib, if we don't find it,
we also check /usr/lib now.

PR: #9362

-AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, 
$PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
+AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], 
+$PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)



I think this is good. If some resource isn't available, then the function
using the resource shouldn't be enabled either. So the correct fix would
be to add a error message to mail() function, IMO.

--Jani


On Tue, 17 Jul 2001, Rasmus Lerdorf wrote:

I am not a fan of that config change that happened in 4.0.6 that checked
to see if a sendmail binary is on the path and if it isn't it disables the
mail() function at compile time.  I really think this should be a simple
warning so people can configure php to point to whatever they want, or
simply install sendmail afterwards and not need to recompile PHP.  Could
whoever made this change please fix it?

-Rasmus

-- Forwarded message --
Date: Tue, 17 Jul 2001 06:38:49 -0500
From: Patrick W. Rateliff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] mail() help

I am getting this error when using the trying to use the mail function.  Any
insite will help, I have been up for too long working on a few projects and
my brain is damn near melted.


mail() is not supported in this PHP build in

so when I built PHP 4.06 I am assuming I missed a option, but just want to
make sure before i head back and re-do things.  Is there a simple option to
turn on the mail support.






-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PHP] mail() help (fwd)

2001-07-31 Thread Heikki Korpela

On Wed, 1 Aug 2001, Jani Taskinen wrote:

 I think this is good. If some resource isn't available, then the function
 using the resource shouldn't be enabled either. So the correct fix would
 be to add a error message to mail() function, IMO.
 --Jani

The fact that the machine that PHP is compiled on doesn't have a
specific binary often has nothing to do with:

1) what the machine PHP will be *run on* will include
2) what sort of binaries the machine will have tomorrow

A sensible default should be provided, regardless of whether or not
you can set it in php.ini.

As for bumping a warning when sendmail_path is null in php_mail -
that sounds like a good idea. How's this look like?

-- 
--
  Heikki Korpela -- [EMAIL PROTECTED] -- http://iki.fi/heko/

===
RCS file: /repository/php4/ext/standard/mail.c,v
retrieving revision 1.41
diff -u -IExp -b -B -p -r1.41 mail.c
--- mail.c  30 Jul 2001 06:18:06 -  1.41
+++ mail.c  1 Aug 2001 05:05:02 -
@@ -154,6 +154,7 @@ PHPAPI int php_mail(char *to, char *subj
}
return 1;
 #else
+   php_error(E_WARNING, Your sendmail_path is null - cannot send mail! 
+Check php.ini);
return 0;
 #endif
}
@@ -192,6 +193,7 @@ PHPAPI int php_mail(char *to, char *subj
 #endif
 #endif
{
+   php_error(E_WARNING, Mail delivery program returned with exit 
+code: %d, ret);
return 0;
} else {
return 1;


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] [PHP] mail() help (fwd)

2001-07-17 Thread Rasmus Lerdorf

I am not a fan of that config change that happened in 4.0.6 that checked
to see if a sendmail binary is on the path and if it isn't it disables the
mail() function at compile time.  I really think this should be a simple
warning so people can configure php to point to whatever they want, or
simply install sendmail afterwards and not need to recompile PHP.  Could
whoever made this change please fix it?

-Rasmus

-- Forwarded message --
Date: Tue, 17 Jul 2001 06:38:49 -0500
From: Patrick W. Rateliff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] mail() help

I am getting this error when using the trying to use the mail function.  Any
insite will help, I have been up for too long working on a few projects and
my brain is damn near melted.


mail() is not supported in this PHP build in

so when I built PHP 4.06 I am assuming I missed a option, but just want to
make sure before i head back and re-do things.  Is there a simple option to
turn on the mail support.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]