[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Warn users when installing on a 32-bit system
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": "Warning: Your default directory for uploads ($1) 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 length to $1 bytes.\nMediaWiki's ResourceLoader component will work around this limit, but that will degrade performance.\nIf at all possible, you should set suhosin.get.max_value_length to 1024 or higher in php.ini, and set $wgResourceLoaderMaxQueryLength to the same value in LocalSettings.php.", + "config-using-32bit": "Warning: 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 suhosin.get.max_value_length 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
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Warn users when installing on a 32-bit system
Chad has uploaded a new change for review. ( 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, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/368945/1 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 168d7ed..1745300 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -134,6 +134,7 @@ 'envCheckUploadsDirectory', 'envCheckLibicu', 'envCheckSuhosinMaxValueLength', + 'envCheck64Bit', ]; /** @@ -1081,6 +1082,21 @@ } /** +* 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 db92652..154a7d8 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -75,6 +75,7 @@ "config-no-cli-uploads-check": "Warning: Your default directory for uploads ($1) 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 length to $1 bytes.\nMediaWiki's ResourceLoader component will work around this limit, but that will degrade performance.\nIf at all possible, you should set suhosin.get.max_value_length to 1024 or higher in php.ini, and set $wgResourceLoaderMaxQueryLength to the same value in LocalSettings.php.", + "config-using-32bit": "Warning: your system appears to be running with 32-bit integers. This is 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 8d10b51..126b6af 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -94,6 +94,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 suhosin.get.max_value_length 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: newchange Gerrit-Change-Id: Ifb3bfa0495