`
happmaoo
  • 浏览: 4543911 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

phpBB's Failed Sending Email Errors (and how to resolve)

阅读更多
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_ff7
Date: Thu Jan 29, 2004 4:15 am
Type: Fix
Keywords: email,sendmail,mail,unix
Category: Installing/upgrading/converting
Recently, 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 really figured out 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 cause this. One is simply PHP 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 "<?php phpinfo() ?>" (without quotes) in it. Upload this to your server, and view it with your web browser. Look down a bit until you see "sendmail_path" -- I found if this is broken, it usually displays "-t -i" -- the default parameters it uses for sendmail, and nothing else. Ok, so that was kinda pointless. It doesn't 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 them to 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 if you wish, reconfigure php to your liking. Hey, you're going to redo the entire thing, 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, use startssl, 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't find apachectl, try "locate apachectl" or "whereis apachectl" to help you out.
  • Test mail() using a simple script. Unfortunately, I don't have one made. Perhaps [url]php.net[/url] would have an idea?


That's it. Hope this helps someone out there!

Good luck!
分享到:
评论

相关推荐

    phpbb to vbb转换程序

    【标题】:“phpBB到vBulletin转换程序” 【知识点详解】: PHPBB和vBulletin都是流行的开源论坛软件,它们各自拥有独特的特性和用户界面。PHPBB以其轻量级和易于管理而闻名,而vBulletin则以其丰富的功能和高度可...

    phpBB-WAP v5.1

    phpBB-WAP 中文版取自于 phpbb-wap.ru 中的 phpBB-WAP v8 版本,而 phpBB-WAP 是世界上知名的 phpBB 论坛开源软件的移动终端版本。phpBB-WAP 这个名字,是 PHP Bulletin Board Wireless Application Protocol 的缩写...

    phpbb3中文语言包

    **PHPBB3中文语言包详解** PHPBB3是一款广受欢迎的开源论坛软件,以其稳定、高效和可扩展性而闻名。这款软件支持多语言环境,其中“PHPBB3中文语言包”是专为中文用户设计的本地化版本,旨在提供更友好的中文界面和...

    ezboard to phpbb 转换程序

    ezboard to phpbb 转换程序

    phpbb论坛MOD插件库

    Admin Panel for Junior Admins and Mods.zip 允许你设定二级管理人员,并且你也可以准许二级管理人员使用你允许他们使用的所有设定。你也可以同时允许游客使用你预先设定的所有选项.phpBB Version: 2.0.0 - 2.0.1 ...

    phpBB-2.0.22

    GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbbuser'@'localhost' IDENTIFIED BY 'yourpassword'; FLUSH PRIVILEGES; EXIT; ``` 请将`yourpassword`替换为你的自定义密码。 ### 4. 设置phpBB配置文件 编辑`/var/...

    PHPBB论坛拍卖插件phpbb-auction

    # Remember to upload all the language files and template files to all your # language packs and template directories # # If you use FTP please remember to use ASCII mode for text files (*.php, *.tpl) ...

    phpBB v3.2.2 正體中文.zip

    phpBB简介 phpBB是一个论坛软件,使用PHP语言开发的并开放其原始码。是模块化设计,具专业性、安全性高、支持多国语系、支持多种数据库和自定义的版面设计等优越性能,而且功能强大。 phpBB v3.2.2 正體中文 更新...

    phpBB论坛管理教程

    ### phpBB论坛管理教程知识点概览 #### 一、phpBB管理员控制面板 - **简介**:新版phpBB提供了一个高度可配置的管理员控制面板(ACP),它允许管理员轻松地调整几乎所有功能。管理员可以通过点击论坛底部的“管理...

    phpBB-2.0.22.zip

    《phpBB 2.0.22:开源论坛软件的深度解析》 phpBB是一款全球广泛应用的开源论坛软件,它的2.0.22版本在当时是颇受欢迎的一个分支。这款软件以其强大的功能、易用性和灵活性,为互联网社区提供了一个高效且可定制化...

    phpbb-安装程序

    **phpBB** 是一款开源的、基于Web的讨论论坛软件,以其强大且用户友好的功能在互联网上广受欢迎。作为一款用PHP语言编写的程序,它能够与多种数据库系统(如MySQL、PostgreSQL等)配合使用,为用户提供了一个高效、...

    phpbb 2.x.x to Discuz! 2.5F 论坛转换程序

    论坛程序安装到与 phpbb 相同的数据库里.由于 Discuz! 可以使用表名前缀, 所以不会与原有数据冲突. 两者必须在一个库中, 否则 无法转换. 2. 本程序会覆盖 Discuz! 数据库中相关信息. 3 ...

    PHPBB源码包:phpBB-2.0.21.tar.gz

    与LAMP一起使用的PHPBB论坛源码包!

    PHPBB V4 wap手机论坛

    **PHPBB V4 WAP手机论坛详解** PHPBB(全称:PHP Bulletin Board)是一款开源、免费的讨论板系统,广泛应用于创建线上社区和论坛。PHPBB V4是该系列的最新版本,针对移动设备进行了优化,特别是对于WAP(无线应用...

    phpbb3论坛程序

    **phpbb3论坛程序** **概述** `phpBB3` 是一个开源的、基于Web的论坛软件,由PHP编程语言编写,并与MySQL或其他兼容的数据库系统(如PostgreSQL)配合使用。这款强大的论坛解决方案提供了丰富的功能,包括用户管理...

    Laravel开发-laravel-phpbb-bridge

    【Laravel开发-laravel-phpbb-bridge】 在IT行业中,Laravel是一款广受欢迎的开源PHP框架,它以其优雅的语法和强大的功能深受开发者喜爱。Laravel致力于简化Web应用的开发,提供了一系列工具和服务,帮助开发者高效...

Global site tag (gtag.js) - Google Analytics