diff options
author | szaimen <szaimen@e.mail.de> | 2022-07-11 16:46:31 +0200 |
---|---|---|
committer | Simon L. (Rebase PR Action) <szaimen@e.mail.de> | 2022-07-13 09:33:33 +0000 |
commit | cf9b1082ed4550d3ece15d1c2cc613a0a5e008bc (patch) | |
tree | 0a17d7528b39dcb1b99cacd9aef6d7ef4a032f59 /core | |
parent | 22de24324728025c5299850317fc697b33375caf (diff) | |
download | nextcloud-server-cf9b1082ed4550d3ece15d1c2cc613a0a5e008bc.tar.gz nextcloud-server-cf9b1082ed4550d3ece15d1c2cc613a0a5e008bc.zip |
add a setup check for 64 bit
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/setupchecks.js | 9 | ||||
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 79 |
2 files changed, 88 insertions, 0 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 6fd6fce5dcf..ec9ffbe604e 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -421,6 +421,15 @@ type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } + if (!data.is64bit) { + messages.push({ + msg: t( + 'core', + 'It seems like you are running a 32bit PHP version. Nextcloud needs 64bit to run well. Please upgrade your OS and PHP to 64bit!' + ), + type: OC.SetupChecks.MESSAGE_TYPE_WARNING + }) + } if (data.imageMagickLacksSVGSupport) { messages.push({ msg: t('core', 'Module php-imagick in this instance has no SVG support. For better compatibility it is recommended to install it.'), diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 8fd4681d4d1..c217ea2f35a 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -251,6 +251,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -311,6 +312,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -372,6 +374,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -431,6 +434,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -488,6 +492,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -545,6 +550,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -604,6 +610,7 @@ describe('OC.SetupChecks tests', function() { ], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -661,6 +668,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -718,6 +726,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -775,6 +784,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -853,6 +863,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -910,6 +921,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -967,6 +979,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1024,6 +1037,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: true, @@ -1085,6 +1099,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1143,6 +1158,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1198,6 +1214,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1256,6 +1273,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: false, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1314,6 +1332,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: false, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1333,6 +1352,64 @@ describe('OC.SetupChecks tests', function() { }); }); + it('should return an error for 32bit instances', function(done) { + var async = OC.SetupChecks.checkSetup(); + + suite.server.requests[0].respond( + 200, + { + 'Content-Type': 'application/json', + }, + JSON.stringify({ + hasFileinfoInstalled: true, + isGetenvServerWorking: true, + isReadOnlyConfig: false, + wasEmailTestSuccessful: true, + hasWorkingFileLocking: true, + hasValidTransactionIsolationLevel: true, + suggestedOverwriteCliURL: '', + isRandomnessSecure: true, + securityDocs: 'https://docs.nextcloud.com/myDocs.html', + isFairUseOfFreePushService: true, + serverHasInternetConnectionProblems: false, + isMemcacheConfigured: true, + forwardedForHeadersWorking: true, + isCorrectMemcachedPHPModuleInstalled: true, + hasPassedCodeIntegrityCheck: true, + OpcacheSetupRecommendations: [], + isSettimelimitAvailable: true, + hasFreeTypeSupport: true, + missingIndexes: [], + missingPrimaryKeys: [], + missingColumns: [], + cronErrors: [], + cronInfo: { + diffInSeconds: 0 + }, + isMemoryLimitSufficient: true, + appDirsWithDifferentOwner: [], + isImagickEnabled: true, + areWebauthnExtensionsEnabled: true, + is64bit: false, + recommendedPHPModules: [], + pendingBigIntConversionColumns: [], + isMysqlUsedWithoutUTF8MB4: false, + isDefaultPhoneRegionSet: true, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true, + reverseProxyGeneratedURL: 'https://server', + temporaryDirectoryWritable: true, + }) + ); + + async.done(function( data, s, x ){ + expect(data).toEqual([{ + msg: 'It seems like you are running a 32bit PHP version. Nextcloud needs 64bit to run well. Please upgrade your OS and PHP to 64bit!', + type: OC.SetupChecks.MESSAGE_TYPE_WARNING + }]); + done(); + }); + }); + it('should return an info if there is no default phone region', function(done) { var async = OC.SetupChecks.checkSetup(); @@ -1371,6 +1448,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, @@ -1428,6 +1506,7 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], isImagickEnabled: true, areWebauthnExtensionsEnabled: true, + is64bit: true, recommendedPHPModules: [], pendingBigIntConversionColumns: [], isMysqlUsedWithoutUTF8MB4: false, |