Merge "Warn users when installing on a 32-bit system"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 12 Aug 2017 21:08:05 +0000 (21:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 12 Aug 2017 21:08:05 +0000 (21:08 +0000)
includes/installer/Installer.php
includes/installer/i18n/en.json
includes/installer/i18n/qqq.json

index 46aa518..ae80c8b 100644 (file)
@@ -134,6 +134,7 @@ abstract class Installer {
                'envCheckUploadsDirectory',
                'envCheckLibicu',
                'envCheckSuhosinMaxValueLength',
+               'envCheck64Bit',
        ];
 
        /**
@@ -1081,6 +1082,20 @@ abstract class Installer {
                return true;
        }
 
+       /**
+        * Checks if we're running on 64 bit or not. 32 bit is becoming increasingly
+        * hard to support, so let's at least warn people.
+        *
+        * @return bool
+        */
+       protected function envCheck64Bit() {
+               if ( PHP_INT_SIZE == 4 ) {
+                       $this->showMessage( 'config-using-32bit' );
+               }
+
+               return true;
+       }
+
        /**
         * Convert a hex string representing a Unicode code point to that code point.
         * @param string $c
index bb245f5..6319b76 100644 (file)
@@ -75,6 +75,7 @@
        "config-no-cli-uploads-check": "<strong>Warning:</strong> Your default directory for uploads (<code>$1</code>) is not checked for vulnerability\nto arbitrary script execution during the CLI install.",
        "config-brokenlibxml": "Your system has a combination of PHP and libxml2 versions that is buggy and can cause hidden data corruption in MediaWiki and other web applications.\nUpgrade to libxml2 2.7.3 or later ([https://bugs.php.net/bug.php?id=45996 bug filed with PHP]).\nInstallation aborted.",
        "config-suhosin-max-value-length": "Suhosin is installed and limits the GET parameter <code>length</code> to $1 bytes.\nMediaWiki's ResourceLoader component will work around this limit, but that will degrade performance.\nIf at all possible, you should set <code>suhosin.get.max_value_length</code> to 1024 or higher in <code>php.ini</code>, and set <code>$wgResourceLoaderMaxQueryLength</code> to the same value in <code>LocalSettings.php</code>.",
+       "config-using-32bit": "<strong>Warning:</strong> your system appears to be running with 32-bit integers. This is [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit not advised].",
        "config-db-type": "Database type:",
        "config-db-host": "Database host:",
        "config-db-host-help": "If your database server is on different server, enter the host name or IP address here.\n\nIf you are using shared web hosting, your hosting provider should give you the correct host name in their documentation.\n\nIf you are installing on a Windows server and using MySQL, using \"localhost\" may not work for the server name. If it does not, try \"127.0.0.1\" for the local IP address.\n\nIf you are using PostgreSQL, leave this field blank to connect via a Unix socket.",
index 5214c22..a5c6790 100644 (file)
@@ -95,6 +95,7 @@
        "config-no-cli-uploads-check": "CLI = [[w:Command-line interface|command-line interface]] (i.e. the installer runs as a command-line script, not using HTML interface via an internet browser)",
        "config-brokenlibxml": "Status message in the MediaWiki installer environment checks.",
        "config-suhosin-max-value-length": "{{doc-important|Do not translate \"length\", \"suhosin.get.max_value_length\", \"php.ini\", \"$wgResourceLoaderMaxQueryLength\" and \"LocalSettings.php\".}}\nMessage shown when PHP parameter <code>suhosin.get.max_value_length</code> is between 0 and 1023 (that max value is hard set in MediaWiki software).",
+       "config-using-32bit": "Warning message shown when installing on a 32-bit system.",
        "config-db-type": "Field label in the MediaWiki installer followed by possible database types.",
        "config-db-host": "Used as label.\n\nAlso used in {{msg-mw|Config-missing-db-host}}.",
        "config-db-host-help": "{{doc-singularthey}}",