jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368945 )

Change subject: Warn users when installing on a 32-bit system
......................................................................


Warn users when installing on a 32-bit system

Don't fail to install, because we don't explicitly need to break
32-bit support. But in this day and age it's becoming increasingly
likely to break things on a 32-bit system. So let's at least let
a system admin know that YMMV.

Change-Id: Ifb3bfa049532d82f67fe4375944af1516400513c
---
M includes/installer/Installer.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
3 files changed, 17 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 46aa518..ae80c8b 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -134,6 +134,7 @@
                'envCheckUploadsDirectory',
                'envCheckLibicu',
                'envCheckSuhosinMaxValueLength',
+               'envCheck64Bit',
        ];
 
        /**
@@ -1082,6 +1083,20 @@
        }
 
        /**
+        * 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
         * @return string|false
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index bb245f5..6319b76 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -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.",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 3bf7ccb..30eb5ee 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -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}}",

-- 
To view, visit https://gerrit.wikimedia.org/r/368945
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb3bfa049532d82f67fe4375944af1516400513c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to