Help! mail() isn't working... [message #7335] |
Mon, 18 November 2002 18:36 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Sorry for this title, but I'm really getting desperate here. I try to verify a contact mailer script but it fails to send any mails. Output claims:
Quote: | Warning: mail() is not supported in this PHP build in /home/httpd/www-root/mambo/emailfriend/emailarticle.php on line 139
|
The only thing the script is doing is using mail(), nothing more. PHP version is 4.24-dev (stable branch) running as module on apache 1.3.27. There are no explicit compile options for using mail functionality nor am I aware of configuration errors in my php.ini.
Any help would be greatly appreciated.
bye
Olliver
[Updated on: Mon, 18 November 2002 18:37] Report message to a moderator
|
|
|
Re: Help! mail() isn't working... [message #7337 is a reply to message #7335] |
Mon, 18 November 2002 18:43 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
PHP's mail() function is dependant on sendmail being detected during install. If no sendmail binary (or symlink to equivalent utility, qmail for example) is found mail() will NOT be avaliable.
FUDforum Core Developer
|
|
|
|
|
Re: Help! mail() isn't working... [message #7343 is a reply to message #7342] |
Mon, 18 November 2002 21:28 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
what does: function_exists("mail") return?
I suspect it returns false, meaning that the mail() function is not avaliable. When you ran ./configure of PHP, was sendmail in the PATH, it was not it probably explains why you don't have mail() function.
FUDforum Core Developer
|
|
|
Re: Help! mail() isn't working... [message #7347 is a reply to message #7343] |
Mon, 18 November 2002 22:28 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Hi,
I made the following test:
<?PHP if(function_exists("mail")) echo "it's there"; ?>
It keeps claiming it would be there. Speaking of paths: I compiled PHP as unpriviliged user. since the path is in /usr/sbin/ it's not available for me but for all other users with root privileges. Could this be the reason? Hm, although I hate compiling as root I should try it to see if something changes.
bye
Olliver
|
|
|
Re: Help! mail() isn't working... [message #7348 is a reply to message #7347] |
Mon, 18 November 2002 22:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You can just add /usr/bin to your $PATH enviroment variable that should be enough.
If the function mail() is avaliable you should be able to use it...
FUDforum Core Developer
|
|
|
|