ScotDiddle Posted September 3, 2008 Share Posted September 3, 2008 Hi Folks, I am trying to understand why my Linux system returns false at any attempt with the mail() function. function_exists('mail'); returns true. I am using Zend Core (PHP 5.2) for Oracle. Any help will be appreciated. Scot L. Diddle, Richmond VA Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/ Share on other sites More sharing options...
discomatt Posted September 3, 2008 Share Posted September 3, 2008 Have you configured sendmail in PHP properly? Are you calling the function correctly? Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632874 Share on other sites More sharing options...
ScotDiddle Posted September 3, 2008 Author Share Posted September 3, 2008 discomatt, I'm not sure... When I search for sendmail I get back circles... 541388 0 lrwxrwxrwx 1 root root 21 Jan 11 2007 /usr/sbin/sendmail -> /etc/alternatives/mta 327691 0 lrwxrwxrwx 1 root root 30 Jan 11 2007 /usr/lib/sendmail -> /etc/alternatives/mta-sendmail In alternatives I see: /etc/alternatives ls -ltr *send* lrwxrwxrwx 1 root root 26 Jan 11 2007 mta-sendmail -> /usr/lib/sendmail.sendmail My php.ini config file says sendmail lives in: sendmail_path = "/usr/sbin/sendmail -t -i" When I enter sendmail from my ptty window, I get back: "To address needed" I am a mainframe programmer, and have very little experience with u/linux. Scot Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632898 Share on other sites More sharing options...
discomatt Posted September 3, 2008 Share Posted September 3, 2008 Have you configured sendmail properly? http://www.linuxjournal.com/article/5507 Have you successfully sent emails from the command line using sendmail? sendmail [email protected] < ~/maildir/mailmessage Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632911 Share on other sites More sharing options...
ScotDiddle Posted September 3, 2008 Author Share Posted September 3, 2008 discomatt, Failed... While I am waiting on my Linux gurus to allow me additional sudo capabilities, I will read the link you sent. ~ sudo sendmail [email protected] < HiMom.txt collect: Cannot write ./dfm83FuSLu012197 (bfcommit, uid=51, gid=51): Permission denied queueup: cannot create queue file ./qfm83FuSLu012197, euid=51: Permission denied ~ Thanks, Scot Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632919 Share on other sites More sharing options...
discomatt Posted September 3, 2008 Share Posted September 3, 2008 This might be the reason Make sure the user running PHP/Apache has access to sendmail as well Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632931 Share on other sites More sharing options...
ScotDiddle Posted September 3, 2008 Author Share Posted September 3, 2008 Discomatt, I thought about that as well... Where is the "Apache/PHP" user defined ? ps -ef shows: nobody 11599 11183 0 11:44 ? 00:00:00 /usr/local/Zend/apache2/bin/http Thanks, Scot Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632937 Share on other sites More sharing options...
discomatt Posted September 3, 2008 Share Posted September 3, 2008 http://www.linux.com/feature/113744 Covers the basics on setting up a proper user/group to run PHP Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632938 Share on other sites More sharing options...
ScotDiddle Posted September 3, 2008 Author Share Posted September 3, 2008 Discomatt, You 'da Man !!!. Everyone who has trouble with PHP mail returning "false" should read this thread, and follow your links. My mail() function now work ! Thank-you very much. Scot L. Diddle, Richmonc VA Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-632988 Share on other sites More sharing options...
discomatt Posted September 3, 2008 Share Posted September 3, 2008 Glad I could help Congrats on getting things set up! Link to comment https://forums.phpfreaks.com/topic/122571-solved-mail-returns-false/#findComment-633094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.