我希望我的wiki能够向注册用户发送确认电子邮件(即确认电子邮件地址)。 - 那么简单
在我的 Windows XP SP3 框中,我安装了:
MediaWiki版本:1.23.3
PHP版本:5.4.25(apache2handler)
MySql版本:5.6.17-log
在同一台机器上,我从命令提示符(CMD)获得以下输出:
D:\www\php\pear> pear list
输出:
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.12 stable
Auth_SASL 1.0.6 stable
Consoloe_Getopt 1.3.1 stable
Mail 1.2.0 stable
Net_SMTP 1.6.2 stable
Net_Socket 1.0.14 stable
PEAR 1.9.5 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.3 stable
在我的LocalSettings.php中,我有:
#SMTP setup
$wgSMTP = array(
'host' => "mydomain.com",
'port' => 25,
'auth' => true,
'username' => "user@mydomain.com",
'password' => "myPassword",
);
在我的DefaultSettings.php中,我有
$wgSMTP = false;
在我的php.ini中,我有:(注意在开头是#39 ;;'(默认为此))
;include_path = ".;c:\php\includes"
(尝试发送用户电子邮件确认时的stacktrace):
[e41daf7d] /wiki/index.php?title=Special:ConfirmEmail Exception from line 304 of
D:\www\Html\wiki\includes\UserMailer.php: PEAR mail package is not installedBacktrace:
#0 D:\www\Html\wiki\includes\User.php(3885): UserMailer::send(MailAddress, MailAddress, string, string, NULL)
#1 D:\www\Html\wiki\includes\User.php(3862): User->sendMail(string, string)
#2 D:\www\Html\wiki\includes\specials\SpecialConfirmemail.php(77): User->sendConfirmationMail()
#3 D:\www\Html\wiki\includes\specials\SpecialConfirmemail.php(58): EmailConfirmation->showRequestForm()
#4 D:\www\Html\wiki\includes\specialpage\SpecialPage.php(379): EmailConfirmation->execute(NULL)
#5 D:\www\Html\wiki\includes\specialpage\SpecialPageFactory.php(503): SpecialPage->run(NULL)
#6 D:\www\Html\wiki\includes\Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#7 D:\www\Html\wiki\includes\Wiki.php(588): MediaWiki->performRequest()
#8 D:\www\Html\wiki\includes\Wiki.php(447): MediaWiki->main()
#9 D:\www\Html\wiki\index.php(46): MediaWiki->run()
#10 {main}
堆栈跟踪表明没有安装PEAR Mail包,显然我收到此包的稳定状态,如上所述......
我做错了什么? ......
-Thanks
答案 0 :(得分:1)
找到它!!!
在我的 php.ini 中
我编辑了行
轮{
;include_path = ".;c:\php\includes"
作为
include_path = ".;c:\php\includes; c:\php\pear; d:\www\php\pear; d:\www\php\pear\pear"
修复了它,现在我收到了通知电子邮件...... :)
谢谢...