Topic on Project:Support desk

MWException: PEAR mail package is not installed even after installing it and checking include path - fedora server (using dnf package)

4
Reesericdotci (talkcontribs)

I am getting a strange pear mail error after installing it on Fedora Server and checking the include path through following the checklist on PEAR's site. Here's all the debug info I got:


Webpage:

[3b4977d818b6fe8f04e8b74a] /index.php?title=Special:ConfirmEmail MWException: PEAR mail package is not installed

Backtrace:

from /usr/share/mediawiki/includes/mail/UserMailer.php(369)

#0 /usr/share/mediawiki/includes/mail/UserMailer.php(173): UserMailer::sendInternal()

#1 /usr/share/mediawiki/includes/user/User.php(3068): UserMailer::send()

#2 /usr/share/mediawiki/includes/user/User.php(3042): User->sendMail()

#3 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(145): User->sendConfirmationMail()

#4 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(729): SpecialConfirmEmail->submitSend()

#5 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(619): HTMLForm->trySubmit()

#6 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(635): HTMLForm->tryAuthorizedSubmit()

#7 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(118): HTMLForm->show()

#8 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(79): SpecialConfirmEmail->showRequestForm()

#9 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(701): SpecialConfirmEmail->execute()

#10 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()

#11 /usr/share/mediawiki/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#12 /usr/share/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest()

#13 /usr/share/mediawiki/includes/MediaWiki.php(562): MediaWiki->main()

#14 /usr/share/mediawiki/index.php(49): MediaWiki->run()

#15 /usr/share/mediawiki/index.php(45): wfIndexMain()

#16 {main}


pear version:

PEAR Version: 1.10.15

PHP Version: 8.2.18

Zend Engine Version: 4.2.18

Running on: Linux localhost.localdomain 6.8.9-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May  2 18:44:19 UTC 2024 x86_64


pear list:

Installed packages, channel pear.php.net:

=========================================

Package          Version State

Archive_Tar      1.5.0   stable

Auth_SASL        1.2.0   stable

Console_Getopt   1.4.3   stable

Mail             2.0.0   stable

Mail_Mime        1.10.12 stable

Net_SMTP         1.12.1  stable

Net_Socket       1.2.2   stable

PEAR             1.10.15 stable

PEAR_Manpages    1.10.0  stable

Structures_Graph 1.1.1   stable

XML_Util         1.4.5   stable


ls -lah on /usr/share/pear:

drwxrwxr-x.  11 caddy apache 4.0K May 20 20:59 pear

ls -lah on /usr/share/pear/

drwxrwxr-x.   2 caddy apache  162 May 20 20:59 Mail


php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;

;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"

include_path = ".:/usr/share/pear/"


the pear bool was true when checking, and the include path included pear when using check_php

Samwilson (talkcontribs)

@Reesericdotci: You shouldn't install PEAR globally for it to be used by MediaWiki, it's in the MW vendor/ directory already along with all other PHP dependencies. How did you install MediaWiki? You may need to either make sure you've downloaded all submodules, or run composer update --no-dev -o.

Reesericdotci (talkcontribs)

I installed MediaWiki using `sudo dnf install mediawiki` - I can try symlinking to vendor maybe?

Reesericdotci (talkcontribs)

Alright, running composer update --no-dev -o in /var/www/wiki worked for me - thank you!