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 Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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@domain.com < ~/maildir/mailmessage Quote Link to comment 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 scotDiddle@MyCompany.com < 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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.