PHPBB'S FAILED SENDING Email Errors (and how to resolve)

zhaozj2021-02-16  71

Description: This article targets the "failed sending email" error on UNIX and people using PHP's mail () function (not phpBB's SMTP function) Author: dougk_ff7Date: Thu Jan 29, 2004 4:15 amType: FixKeywords: email, sendmail, mail, unixCategory: Installing / upgrading / convertingRecently, I've been playing around with some stuff that uses mail () in PHP, and I know I've hit errors in the past when I've set phpBB to use the mail () function, AND I never real fasice why each case Was failing. It started when I got the real error from php (When Another Program Called Mail ()) - "PHP Fatal Error: Call to undefined function mail ()" - Looking Around For A Bit, I Found That There Are A Few Things That Can't Find Sendmail, SO You NEED TO POINT It in The Right Direction Using The "sendmail_path" option in php.ini. if That Fails to work, you're going to have to do a bit more work. create a new .php file (for example, phpinfo.php), with only " (w iTHOUT quotes) in it. Upload this to your server, And View it with your web browser. Look Down a bit unchil you see "sendmail_path" - i Found if this is broker, it usually displays "-t -i" - the default parameters it uses for sendmail, and nothing else. Ok, so that was kinda pointless. It does not tell us very much more. Anyway, now the real reason for creating the phpinfo () file. Please follow these steps * exactly * (or Modify Slightly for your setup, you'll get the idea):

Copy That Entire ./configure line up at the top of the phpinfo () Page - It'll Make Your Life Much Less Painful, Trust Me. Don't Worry About The Single Quotes, They're Fine. Just Leave Them. Check for a working sendmail -.. postfix and most other MTAs should provide this, qmail will provide a compatible warpper Just make sure there's something / usr / lib / sendmail, / usr / bin / sendmail, and / usr / sbin / sendmail Are Good Bets, AS Far As I Know. if Your Sendmail Is elsewhere, Make A Symlink Back to / USR / Sbin / Sendmail ("Ln -S / Path / TO / Your / Sendmail / USR / SBIN / Sendmail") - For QMail, That's "ln -s / var / qmail / bin / sendmail / usr / sbin / sendmail" Either Grab the Latest Source of php, or find the source you Built PHP from (this will Require Root Later on, SO if you 'RE ON A Shared Host, See IF The Problem Exists Outside of PHPBB, AND IF It Does, Ask The Work ON IT for You. If You Are Using a Clean Source Tree, Skip this Step. if NOT, Run Make Clean Run The ./configure line you just copied, or i F you wish, reconfigure php to your liking. hey, you're going to redo the entire, why not do it right? Run make, su to root, and make install. check php.ini (if you don't know WHERE IT IS, TRY "LOCATE PHP.INI") - Make Sure The sendmail_path is Correct. Run apachectl stop, Followed by apachectl start (ssl)? - if you use ssl, usst, if NOT, JUST USE START. I found that apachectl restart seems to have some strange quirks, and may just die on you after rebuilding PHP. If you can not find apachectl, try "locate apachectl" or "whereis apachectl" to help you out. Test mail () using A Simple Script. Unfortunately, I DON '

转载请注明原文地址:https://www.9cbs.com/read-15927.html

New Post(0)