Last modified: 2014-03-19 20:40:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44205, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42205 - Installer: Fail gracefully when XML requisites are not met (currently only a blank page in browser)
Installer: Fail gracefully when XML requisites are not met (currently only a ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.22.0
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Thread:...
:
: 51042 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-16 19:19 UTC by Jesús Martínez Novo (Ciencia Al Poder)
Modified: 2014-03-19 20:40 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jesús Martínez Novo (Ciencia Al Poder) 2012-11-16 19:19:23 UTC
I haven't tested it yet, but it seems that the installer borks with a fatal error if PHP has no DOM-XML support (see URL for a report in the support forum).

It should fail more gracefully, giving a more human-readable error message.
Comment 1 Jesús Martínez Novo (Ciencia Al Poder) 2012-11-17 11:07:57 UTC
Confirmed the bug. If the DOM functions aren't installed in php, then it throws a fatal error:

Fatal error: Class 'DOMDocument' not found in /var/www/html/wiki/includes/LocalisationCache.php on line 542

Tested with a fresh 1.20.0 installation.

The main page that displays the "setup the wiki first" doesn't throw any error. I don't know if it's possible to catch this error from the installer before loading the localisation cache.
Comment 2 Andre Klapper 2013-05-03 15:37:18 UTC
Still valid in git master of today.

Steps to reproduce:
1. Fedora 18
2. Make sure that php-xml is NOT installed.
3. Install MediaWiki
4. Go to http://localhost/mediawiki/
5. Click "set up the wiki"

Actual outcome:
A blank page. Confusion.

Expected outcome:
Some error message in the browser.

Other comments:

Looking at /var/log/httpd/error_log I see:

PHP Fatal error: Class 'DOMDocument' not found in /var/www/html/mediawiki/includes/cache/LocalisationCache.php on line 587, referer: http://localhost/mediawiki/
Comment 3 Andre Klapper 2013-05-03 15:51:24 UTC
Confirming that after installing php-xml in Fedora via
    yum install php-xml
and running
    apachectl restart
and now having
    php-xml.i686 0:5.4.14-1.fc18
installed, this problem does not happen anymore.
Comment 4 Andre Klapper 2013-06-22 13:43:53 UTC
So my naive idea was to change envCheckXML() in /includes/installer/Installer.php from
  if ( !function_exists( "utf8_encode" ) )
to
  if ( !function_exists( 'utf8_encode' ) || !class_exists( 'DOMDocument' ) )
only to realize that these checks are only run *after* the Language setting dialog which is of course too late, as MediaWiki has already failed silently.

I assume environment checks are only done after the language dialog in order to present that page in the prefered language of the user?
Comment 5 Andre Klapper 2013-07-09 16:33:51 UTC
*** Bug 51042 has been marked as a duplicate of this bug. ***
Comment 6 Gerrit Notification Bot 2013-07-30 00:04:55 UTC
Change 76663 had a related patch set uploaded by MarkAHershberger:
Install without XML support

https://gerrit.wikimedia.org/r/76663
Comment 7 Mark A. Hershberger 2013-07-30 00:06:31 UTC
Should probably get Niklas or Siebrand to look at this patch.
Comment 8 Andre Klapper 2013-10-11 14:58:31 UTC
(In reply to comment #7)
> Should probably get Niklas or Siebrand to look at this patch.

hexmode: Siebrand gave a +1 on the patch.
Comment 9 Gerrit Notification Bot 2014-03-19 12:26:29 UTC
Change 76663 abandoned by Hashar:
Install without XML support

Reason:
Abandoning for now. As I commented previously, I dont like adding yet another serialized file + bunch of code as a workaround for third parties not having the PHP extension XML.

https://gerrit.wikimedia.org/r/76663

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links