当我点击重设密码时,我收到以下错误
[b5009e59] /kb/index.php/Special:PasswordReset Exception from line 304 of /opt/html/kb/includes/UserMailer.php: PEAR mail package is not installed
Backtrace:
#0 /opt/html/kb/includes/User.php(3885): UserMailer::send(MailAddress, MailAddress, string, string, NULL)
#1 /opt/html/kb/includes/specials/SpecialPasswordReset.php(281): User->sendMail(string, string)
#2 [internal function]: SpecialPasswordReset->onSubmit(array, HTMLForm)
#3 /opt/html/kb/includes/htmlform/HTMLForm.php(470): call_user_func(array, array, HTMLForm)
#4 /opt/html/kb/includes/htmlform/HTMLForm.php(412): HTMLForm->trySubmit()
#5 /opt/html/kb/includes/htmlform/HTMLForm.php(427): HTMLForm->tryAuthorizedSubmit()
#6 /opt/html/kb/includes/specialpage/FormSpecialPage.php(142): HTMLForm->show()
#7 /opt/html/kb/includes/specialpage/SpecialPage.php(379): FormSpecialPage->execute(NULL)
#8 /opt/html/kb/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#9 /opt/html/kb/includes/Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#10 /opt/html/kb/includes/Wiki.php(588): MediaWiki->performRequest()
#11 /opt/html/kb/includes/Wiki.php(447): MediaWiki->main()
#12 /opt/html/kb/index.php(46): MediaWiki->run()
#13 {main}
我已经安装了所有模块
pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.13 stable
Auth_SASL 1.0.6 stable
Cache_Lite 1.7.16 stable
Console_Getopt 1.3.1 stable
DB 1.7.14 stable
HTTP_Request2 2.2.1 stable
Log 1.12.8 stable
MDB2 2.4.1 stable
Mail 1.2.0 stable
Net_SMTP 1.6.2 stable
Net_Socket 1.0.14 stable
Net_URL2 2.0.9 stable
PEAR 1.9.5 stable
Structures_Graph 1.0.4 stable
XML_RPC 1.5.5 stable
XML_RPC2 1.1.2 stable
XML_Util 1.2.3 stable
我重新启动了apache,也包含在include路径
中 php -c /etc/php.ini -r 'echo get_include_path()."\n";'
.:/php/includes:/usr/share/pear
我尝试过谷歌搜索,但没有解决这个问题。
尝试创建用户时stacktrace
[7f3f1adc] /kb/index.php?title=Special:UserLogin&action=submitlogin&type=signup Exception from line 304 of /opt/html/kb/includes/UserMailer.php: PEAR mail package is not installed
Backtrace:
#0 /opt/html/kb/includes/User.php(3885): UserMailer::send(MailAddress, MailAddress, string, string, NULL)
#1 /opt/html/kb/includes/specials/SpecialUserlogin.php(983): User->sendMail(string, string)
#2 /opt/html/kb/includes/specials/SpecialUserlogin.php(258): LoginForm->mailPasswordInternal(User, boolean, string, string)
#3 /opt/html/kb/includes/specials/SpecialUserlogin.php(223): LoginForm->addNewAccountMailPassword()
#4 /opt/html/kb/includes/specialpage/SpecialPage.php(379): LoginForm->execute(NULL)
#5 /opt/html/kb/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#6 /opt/html/kb/includes/Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#7 /opt/html/kb/includes/Wiki.php(588): MediaWiki->performRequest()
#8 /opt/html/kb/includes/Wiki.php(447): MediaWiki->main()
#9 /opt/html/kb/index.php(46): MediaWiki->run()
#10 {main}
调试
[caches] main: MemcachedPhpBagOStuff, message: MemcachedPhpBagOStuff, parser: MemcachedPhpBagOStuff
[caches] LocalisationCache: using store LCStoreDB
Fully initialised
User: got user 17 from cache
Connected to database 0 at localhost
User: loading options for user 17 from override cache.
User: logged in from session
User: loading options for user 17 from override cache.
MessageCache::load: Loading en... got from global cache
Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache::getParser
Parser: using preprocessor: Preprocessor_DOM
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct
User::getBlockedStatus: checking...
IP: 172.16.0.85
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 16 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
DatabaseBase::query: Writes done: INSERT IGNORE INTO `user` (user_id,user_name,user_password,user_newpassword,user_newpass_time,user_email,user_email_authenticated,user_real_name,user_token,user_registration,user_editcount,user_touched) VALUES (NULL,'Heshamfs','','',NULL,'heshamfs@spectrum-geopex.com.eg',NULL,'Hesham Sokkar','fbe6039d3d8721e290bad06e14708e86','20150521134628','0','20150521134633')
User: loading options for user 31 from database.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 16 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 16 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 16 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::randomPassword/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 7 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::crypt/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: openssl_random_pseudo_bytes generated 4 bytes of strong randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
UserMailer::send: sending mail to Heshamfs <heshamfs@spectrum-geopex.com.eg>
[Bug56269] Exception thrown with an uncommited database transaction: [7f3f1adc] /kb/index.php?title=Special:UserLogin&action=submitlogin&type=signup Exception from line 304 of /opt/html/kb/includes/UserMailer.php: PEAR mail package is not installed
#0 /opt/html/kb/includes/User.php(3885): UserMailer::send(Object(MailAddress), Object(MailAddress), 'Account creatio...', 'Someone created...', NULL)
#1 /opt/html/kb/includes/specials/SpecialUserlogin.php(983): User->sendMail('Account creatio...', 'Someone created...')
#2 /opt/html/kb/includes/specials/SpecialUserlogin.php(258): LoginForm->mailPasswordInternal(Object(User), false, 'createaccount-t...', 'createaccount-t...')
#3 /opt/html/kb/includes/specials/SpecialUserlogin.php(223): LoginForm->addNewAccountMailPassword()
#4 /opt/html/kb/includes/specialpage/SpecialPage.php(379): LoginForm->execute(NULL)
#5 /opt/html/kb/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#6 /opt/html/kb/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#7 /opt/html/kb/includes/Wiki.php(588): MediaWiki->performRequest()
#8 /opt/html/kb/includes/Wiki.php(447): MediaWiki->main()
#9 /opt/html/kb/index.php(46): MediaWiki->run()
#10 {main}
[exception] [7f3f1adc] /kb/index.php?title=Special:UserLogin&action=submitlogin&type=signup Exception from line 304 of /opt/html/kb/includes/UserMailer.php: PEAR mail package is not installed
#0 /opt/html/kb/includes/User.php(3885): UserMailer::send(Object(MailAddress), Object(MailAddress), 'Account creatio...', 'Someone created...', NULL)
#1 /opt/html/kb/includes/specials/SpecialUserlogin.php(983): User->sendMail('Account creatio...', 'Someone created...')
#2 /opt/html/kb/includes/specials/SpecialUserlogin.php(258): LoginForm->mailPasswordInternal(Object(User), false, 'createaccount-t...', 'createaccount-t...')
#3 /opt/html/kb/includes/specials/SpecialUserlogin.php(223): LoginForm->addNewAccountMailPassword()
#4 /opt/html/kb/includes/specialpage/SpecialPage.php(379): LoginForm->execute(NULL)
#5 /opt/html/kb/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#6 /opt/html/kb/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#7 /opt/html/kb/includes/Wiki.php(588): MediaWiki->performRequest()
#8 /opt/html/kb/includes/Wiki.php(447): MediaWiki->main()
#9 /opt/html/kb/index.php(46): MediaWiki->run()
#10 {main}
答案 0 :(得分:0)
将LocalSettings.php
包含路径设置错误。
set_include_path( implode( PATH_SEPARATOR, $path ) );
将其更改为
set_include_path( get_include_path() . ":" .implode( PATH_SEPARATOR, $path ) );
答案 1 :(得分:-2)
检查您的pear模块是否真正安装在/ usr / share / pear中。错误消息表示,php无法找到Mail包,因此路径似乎是错误的。您可以在控制台中运行以下命令:
pear config-get php_dir
并将结果路径添加到php.ini中的include_path变量,而不是实际路径。
答案 2 :(得分:-2)
您是否在php.ini上设置了包含路径?
这样的事情:
include_path = ".;/path/to/php/pear"
(如果存在,请验证您的php.ini中是否未注释此行)