Page MenuHomePhabricator

MWInit::classExists sometimes doesn't catch the ReflectionException properly.
Closed, InvalidPublic

Description

I can't reproduce this, but several users have reported it in the support forum.

Basically people get things like:

"Unexpected non-MediaWiki exception encountered, of type "ReflectionException" exception 'ReflectionException' with message 'Class SkinMonoBook does not exist' in W:\www\wi\includes\Init.php:148"

The ReflectionException should be caught inside the MWInit::classExists method, but isn't. Possibly a php bug.


Version: 1.18.x
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49794

Details

Reference
bz33949

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:06 AM
bzimport set Reference to bz33949.
bzimport added a subscriber: Unknown Object (MLST).

It was suggested a little while back that we might not need these workarounds for HipHop, but AFAIK no one has actually checked whether this is a case

The PHP INI setting xdebug.show_exception_trace = 1 (or possibly an old, buggy
version of xdebug that does not respect the setting) likely is causing these
error messages (see bug 49794, which includes a screenshot). Perhaps the
installer should check this setting and show a warning if it is enabled.

As for comment 2 ("[...] we might not need these workarounds for HipHop [...]"),
Ic3e769f1 got rid of the workarounds.

(In reply to comment #3)

[...] Perhaps the
installer should check this setting and show a warning if it is enabled.

Although that doesn't help much for 1.21 (in the installer, this is underneath the xdebug errors on the environment check screen):

Erro ao iniciar a sessão: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ki/Projects/mediawiki/core/includes/Init.php:168)

In 1.22, (with the HipHop workaround removed), it is possible to see results
of the environment checks.

(In reply to comment #3)

The PHP INI setting xdebug.show_exception_trace = 1 (or possibly an old,
buggy
version of xdebug that does not respect the setting) likely is causing these
error messages (see bug 49794, which includes a screenshot).

Although I have no idea what is causing "Unexpected non-MediaWiki exception
encountered [...]". That I have not yet managed to reproduce.

codedriller wrote:

I got this weird situation after enabling bad eAccelerator.

MediaWiki 1.19.9
Windows 7 SP1 x64
PHP 5.4.22 (from XAMPP 1.8.2)
eAccelerator from http://www.apachelounge.com/viewtopic.php?t=4849, thread-safe

Situation resolved after corrected eAccelerator from http://www.apachelounge.com/viewtopic.php?t=5027 has been installed.

This bug does not seem to be caused by MediaWiki.

Umherirrender claimed this task.

MWInit was removed with I370b9d68d412c8f47b68be2b54ec1e86b7c06fd7 - https://gerrit.wikimedia.org/r/#/c/143207/

Umherirrender set Security to None.