Topic on Project:Support desk

Page display 500 Internal Server Error after loading extension

12
Summary by Ciencia Al Poder

Incompatibilities with PHP 7.1. Please use PHP 7.0 until the bug is fixed

星耀晨曦 (talkcontribs)

When I load an extension, the page can not be displayed properly and displayed 500 Internal Server Error. However after loading Renameuser extension, WikiEditor extension and SpamBlacklist extension, page can work properly, these extensions can also be used normally. My wiki version is:

MediaWiki 1.28.1
PHP 7.1.3 (cgi-fcgi)
MySQL 5.7.18-log

and url(Normal status). Can someone come to help me?

Malyacko (talkcontribs)

See Manual:How to debug - the error log of your webserver software might have more information why you get an HTTP 500 error.

星耀晨曦 (talkcontribs)

Oh..Thanks.

I tested, my wiki displayed some error logs.

One of among the log showed:"PHP Deprecated: Function mcrypt_create_iv() is deprecated in D:\瀛﹀洯閮藉競\w\includes\libs\CryptRand.php on line 256".

I found "This function was DEPRECATED in PHP 7.1.0" in php manual. Is my php version(7.1.3) too high for the reason?

Ciencia Al Poder (talkcontribs)

The deprecation warning shouldn't be a problem in itself, unless those errors are being output on the final page. They are warnings for developers, they should be ignored in production environments. This one is tracked in task T143788.

You may try silencing that warning in php.ini so it doesn't spam your logs, in case it's also the cause of the 500 error by changing the error_reporting line:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
星耀晨曦 (talkcontribs)

Yes, the deprecation warning should't be worried. But, this warning is already here when the page is normal. More seriously is..When I load Cite extension, the page doesn't display properly, and displayed two kinds error logs:"PHP Warning: Parameter 1 to Cite::clearState() expected to be a reference, value given in D:\瀛﹀洯閮藉競\w\includes\Hooks.php on line 195" and "PHP Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in D:\瀛﹀洯閮藉競\w\includes\Hooks.php on line 195".

The line 195 is "$retval = call_user_func_array( $callback, $hook_args );".

Ciencia Al Poder (talkcontribs)

Ok, that's probably the interesting error and not the deprecation notice :)

Extension:Cite is already bundled with 1.28.1 tarball, so it should be working properly. Did you modify the Extension:Cite afterwards? be sure you're using the extension that comes from the MediaWiki tarball.

星耀晨曦 (talkcontribs)

No. I haven't modified any extensions. Mediawiki is also downloaded from the official website(this website).

In fact, there are many problems in mywiki. For example, when I load CiteThisPage extension, the page error and showed PHP Warning: Parameter 1 to CiteThisPageHooks::onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink() expected to be a reference, value given in D:\瀛﹀洯閮藉競\w\includes\Hooks.php on line 195.

It seems that there is a problem with Hooks.php on line 195.

Ciencia Al Poder (talkcontribs)

What version of PHP are you using? I don't see anything wrong with those extensions on my test wiki

星耀晨曦 (talkcontribs)

As mentioned above, the version of the PHP is 7.1.3 .

Ciencia Al Poder (talkcontribs)

Ok, I've found it: task T153505

Those are issues with PHP 7.1. You should use PHP 7.0 for now until that's resolved, or manually fixing it in your installation meanwhile.

星耀晨曦 (talkcontribs)

P.S. When I load SpamBlacklist extension, pages under "User" and "User talk" namespaces can't be created.

67.244.49.134 (talkcontribs)

Extension:Babel is known to be incompatible with the web updated, as noted on the documentation page.