php 7.1.0 to 7.1.3 breakage

From Wikistix
Jump to: navigation, search

Upgrade broke MediaWiki 1.27.1, with the following traceback:

MediaWiki internal error. 

Original exception: [WI2ZAMY2ckcAAXoh3UoAAAAr] /wiki/Main_Page MWException from line 1285 of /home/abc/w/includes/parser/Preprocessor_DOM.php: PPFrame_DOM::expand: Invalid parameter type 
Backtrace: 
#0 /home/abc/w/includes/parser/Parser.php(3366): PPFrame_DOM->expand(NULL, integer) 
#1 /home/abc/w/includes/parser/Parser.php(1248): Parser->replaceVariables(string) 
#2 /home/abc/w/includes/parser/Parser.php(446): Parser->internalParse(string) 
#3 /home/abc/w/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer) 
#4 /home/abc/w/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput) 
#5 /home/abc/w/includes/poolcounter/PoolWorkArticleView.php(139): AbstractContent->getParserOutput(Title, integer, ParserOptions) 
#6 /home/abc/w/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork() 
#7 /home/abc/w/includes/page/Article.php(666): PoolCounterWork->execute() 
#8 /home/abc/w/includes/actions/ViewAction.php(44): Article->view() 
#9 /home/abc/w/includes/MediaWiki.php(503): ViewAction->show() 
#10 /home/abc/w/includes/MediaWiki.php(288): MediaWiki->performAction(Article, Title) 
#11 /home/abc/w/includes/MediaWiki.php(745): MediaWiki->performRequest() 
#12 /home/abc/w/includes/MediaWiki.php(519): MediaWiki->main() 
#13 /home/abc/w/index.php(43): MediaWiki->run() 
#14 {main}

Thankfully, the fix is easy. Noticing that php dumped a bunch of warnings on startup:

$ php
PHP Warning:  Module 'apcu' already loaded in Unknown on line 0
PHP Warning:  Module 'curl' already loaded in Unknown on line 0
PHP Warning:  Module 'dom' already loaded in Unknown on line 0
PHP Warning:  Module 'iconv' already loaded in Unknown on line 0
PHP Warning:  Module 'json' already loaded in Unknown on line 0
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP Warning:  Module 'pgsql' already loaded in Unknown on line 0

Edited php.ini to remove these extra unnecessary duplicate extensions, and bingo, MediaWiki was happy again.


Misinformation found herein copyright Paul Ripke (aka “stix”) stixpjr@gmail.com.