0

I have MediaWiki 1.28, PHP 7.1.1, php-fpm, nginx 1.10.3, and arch linux.

Mediawiki says it's compatible with php 7 but is not fully compatible with PHP 7.1.1. However, the error I'm getting I believe is a PHP 5.3 compatibility issue. I'm getting PHP "expected to be a reference" warnings for my mediawiki extensions. They were installed by default in the MediaWiki 1.28 installation.

I don't know to what extent the incompatibility affects my installation or what the appropriate solution is.

I was getting an nginx "upstream header too big" error that was causing 502 responses for some pages:

When I'm logged in and try to access certain urls like /MediaWiki:Common.css or Index.php?title=Special:Search&search=Common.css&fulltext=Search&profile=all then I get a 502 response. If I go to these urls while logged out, they return normal 200. I solved it via this post's advice: upstream sent too big header while reading response header from upstream.

Is the PHP compatibility issue the cause of the php-fpm buffer issue? Should I downgrade to php 7 or could I modify the extensions? Can my extensions be updated because this bug fix has been performed already?

This is the nginx block that runs the php files:

location ~ \.php$ {
   include /etc/nginx/fastcgi_params;
   fastcgi_buffers 16 16k; # Added this fix
   fastcgi_buffer_size 32k; # Added this fix
   fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
   fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
   fastcgi_param  QUERY_STRING $query_string;
   fastcgi_index /index.php;
}

And some of the journalctl:

Feb 12 18:51:09 hochine nginx[5471]: 2017/02/12 18:51:09 [error] 5474#5474: *115 FastCGI sent in stderr: "PHP message: PHP Warning:  Parameter 1 to CiteHooks::onResourceLoaderRegisterModules() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195" while reading response header from upstream, client: 127.0.0.1, server: mediawiki, request: "GET /load.php?debug=false&lang=en&modules=ext.pygments%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "localhost", referrer: "http://localhost/wiki/MediaWiki:Common.css"
Feb 12 18:51:26 hochine nginx[5471]: 2017/02/12 18:51:26 [error] 5474#5474: *134 FastCGI sent in stderr: "PHP message: PHP Warning:  Parameter 1 to Poem::init() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 1 to SyntaxHighlight_GeSHi::onParserFirstCallInit() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /usr/share/webapps/mediawiki/includes/Hooks.php on line 195
Feb 12 18:51:26 hochine nginx[5471]: PHP message: PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /usr
Feb 12 18:51:26 hochine nginx[5471]: 2017/02/12 18:51:26 [error] 5474#5474: *134 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: mediawiki, request: "GET /index.php?title=Special:Search&search=Common.css&fulltext=Search&profile=all HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "localhost"
Community
  • 1
  • 1
user193661
  • 879
  • 10
  • 29

0 Answers0