Last modified: 2014-03-19 20:40:08 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.
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.
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/
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.
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?
*** Bug 51042 has been marked as a duplicate of this bug. ***
Change 76663 had a related patch set uploaded by MarkAHershberger: Install without XML support https://gerrit.wikimedia.org/r/76663
Should probably get Niklas or Siebrand to look at this patch.
(In reply to comment #7) > Should probably get Niklas or Siebrand to look at this patch. hexmode: Siebrand gave a +1 on the patch.
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