InstallUtil Class Reference

Static Public Member Functions

static getSupportedDatabaseTypes ()
static checkWebServer (array $minimumRequiredVersions, &$actualVersion)
static checkApacheModDeflate ()
static checkPhp ($minimumRequiredVersion, &$actualVersion)
static checkPhpTimezoneSetting ()
static isPdoInstalled ()
static isPdoMysqlInstalled ()
static isLdapInstalled ()
static isMbStringInstalled ()
static isMcryptInstalled ()
static checkPhpMaxMemorySetting ($minimumMemoryRequireBytes, &$actualMemoryLimitBytes)
static checkPhpUploadSizeSetting ($minimumUploadRequireBytes, &$actualUploadLimitBytes)
static checkPhpPostSizeSetting ($minimumPostRequireBytes, &$actualPostLimitBytes)
static isFileUploadsOn ()
static checkDatabase ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, $minimumRequiredVersion, &$actualVersion)
static checkAPC ($minimumRequiredVersion, &$actualVersion)
static checkSoap ()
static checkSPL ()
static checkPCRE ()
static checkCtype ()
static checkImap ()
static checkZip ()
static checkServerVariable (&$error)
static checkMemcache ($minimumRequiredVersion, &$actualVersion)
static checkCurl ($minimumRequiredVersion, &$actualVersion)
static checkYii ($minimumRequiredVersion, &$actualVersion)
static checkRedBean ($minimumRequiredVersion, &$actualVersion)
static checkMemcacheConnection ($host, $port)
static checkDatabaseMaxAllowedPacketsSize ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, $minimumRequireBytes, &$actualBytes)
static checkDatabaseMaxSpRecursionDepth ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, $minimumRequiredMaxSpRecursionDepth, &$maxSpRecursionDepth)
static checkDatabaseThreadStackValue ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, $minimumRequiredThreadStackValue, &$threadStackValue)
static checkDatabaseOptimizerSearchDepthValue ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, &$optimizerSearchDepth)
static checkDatabaseDefaultCollation ($databaseType, $databaseHostname, $databaseName, $databaseUsername, $databasePassword, $databasePort, $notAllowedDatabaseCollations, &$databaseDefaultCollation)
static checkDatabaseLoadLocalInFile ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort)
static checkDatabaseLogBinValue ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, &$logBinValue)
static checkDatabaseLogBinTrustFunctionCreatorsValue ($databaseType, $databaseHostname, $databaseUsername, $databasePassword, $databasePort, &$logBinTrustFunctionCreatorsValue)
static connectToDatabase ($databaseType, $host, $databaseName, $username, $password, $port)
static createSuperUser ($username, $password)
static createBaseControlUserConfigUtilUserAccount ()
static generateRandomPasswordForSystemUser ()
static createSystemUser ($username, $password=null, $hideFromSelecting=true, $hideFromLeaderboard=true, $firstName=null, $lastName=null)
static autoBuildDatabase (&$messageLogger, $autoBuildTestModels=false)
static writeConfiguration ($instanceRoot, $databaseType, $databaseHost, $databaseName, $username, $password, $port, $memcacheHost=null, $memcachePort=null, $minifyScripts=true, $language, $perInstanceFilename= 'perInstance.php', $debugFilename= 'debug.php', $hostInfo, $scriptUrl, $submitCrashToSentry=true)
static setZurmoTokenAndWriteToPerInstanceFile ($instanceRoot, $perInstanceFilename= 'perInstance.php')
static isDebugConfigWritable ($instanceRoot)
static doesDebugConfigExist ($instanceRoot)
static isPerInstanceConfigWritable ($instanceRoot)
static isApplicationLogRuntimeWritable ($instanceRoot)
static isMinScriptCacheRuntimeDirectoryWritable ($instanceRoot)
static writeInstallComplete ($instanceRoot)
static isVersion ($version)
static runInstallation ($form, &$messageStreamer)
static getMaxAllowedFileSize ()
static runFromInstallCommand ($args, $validateForm=false)
static runAutoBuildFromUpdateSchemaCommand ($messageLogger)
static getDefaultHostInfo ()
static getDefaultScriptUrl ($route= '')

Static Protected Member Functions

static getBytes ($size)
static checkVersion ($minimumRequiredVersion, $actualVersion)
static getVersionFromPhpInfo ($regEx)

Detailed Description

The purpose of this class is to drill through Modules, build the database, and provide the other function required to complete an install.

Definition at line 42 of file InstallUtil.php.


Member Function Documentation

static checkWebServer ( array $  minimumRequiredVersions,
&$  actualVersion 
) [static]
Parameters:
$requiredVersions An array mapping server names to minimum required versions. eg: array('apache' => '2.2.16')

Definition at line 59 of file InstallUtil.php.

static checkApacheModDeflate (  )  [static]
Returns:
The Apache ModDeflate version, or false if not installed.

Definition at line 93 of file InstallUtil.php.

static checkPhp ( minimumRequiredVersion,
&$  actualVersion 
) [static]
Parameters:
$minimumRequiredVersion Minimum required php version in "5.3.3" format.

Definition at line 100 of file InstallUtil.php.

static checkPhpTimezoneSetting (  )  [static]
Returns:
true/false for if the timezone has been set.

Definition at line 109 of file InstallUtil.php.

static checkPhpMaxMemorySetting ( minimumMemoryRequireBytes,
&$  actualMemoryLimitBytes 
) [static]
Returns:
true, or the max memory setting is less than the minimum required.

Definition at line 143 of file InstallUtil.php.

static checkPhpUploadSizeSetting ( minimumUploadRequireBytes,
&$  actualUploadLimitBytes 
) [static]
Returns:
true if the max file size is sufficient.

Definition at line 153 of file InstallUtil.php.

static checkPhpPostSizeSetting ( minimumPostRequireBytes,
&$  actualPostLimitBytes 
) [static]
Returns:
true if the max post size is sufficient.

Definition at line 163 of file InstallUtil.php.

static isFileUploadsOn (  )  [static]
Returns:
true if file uploads is set to on.

Definition at line 173 of file InstallUtil.php.

static checkDatabase ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
minimumRequiredVersion,
&$  actualVersion 
) [static]
Returns:
true, or the MySQL version if less than required, or false if not installed.

Definition at line 211 of file InstallUtil.php.

static checkAPC ( minimumRequiredVersion,
&$  actualVersion 
) [static]
Returns:
true, or the APC version if less than required, or false if not installed.

Definition at line 230 of file InstallUtil.php.

static checkSoap (  )  [static]
Returns:
true if Soap extension is loaded, or false if not loaded.

Definition at line 243 of file InstallUtil.php.

static checkSPL (  )  [static]
Returns:
true if SPL extension is loaded, or false if not loaded. Required by Yii framework.

Definition at line 252 of file InstallUtil.php.

static checkPCRE (  )  [static]
Returns:
true if PCRE extension is loaded, or false if not loaded. Required by Yii framework.

Definition at line 261 of file InstallUtil.php.

static checkCtype (  )  [static]
Returns:
true if Ctype extension is loaded, or false if not loaded.

Definition at line 269 of file InstallUtil.php.

static checkImap (  )  [static]
Returns:
true if IMAP extension is loaded, or false if not loaded.

Definition at line 277 of file InstallUtil.php.

static checkZip (  )  [static]
Returns:
true if zip extension is loaded, or false if not loaded.

Definition at line 285 of file InstallUtil.php.

static checkServerVariable ( &$  error  )  [static]
Returns:
true if all $_SERVER variable are loaded correctly, otherwise return false. Required by Yii framework.

Definition at line 294 of file InstallUtil.php.

static checkMemcache ( minimumRequiredVersion,
&$  actualVersion 
) [static]
Returns:
true, or the memcache version if less than required, or false if not installed.

Definition at line 329 of file InstallUtil.php.

static checkCurl ( minimumRequiredVersion,
&$  actualVersion 
) [static]
Returns:
true, or the Curl version if less than required, or false if not installed.

Definition at line 342 of file InstallUtil.php.

static checkMemcacheConnection ( host,
port 
) [static]
Returns:
true, or an array of connection error number and string .

Definition at line 380 of file InstallUtil.php.

static checkDatabaseMaxAllowedPacketsSize ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
minimumRequireBytes,
&$  actualBytes 
) [static]

Check database max_allowed_packet_size value.

Definition at line 399 of file InstallUtil.php.

static checkDatabaseMaxSpRecursionDepth ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
minimumRequiredMaxSpRecursionDepth,
&$  maxSpRecursionDepth 
) [static]

Check database max_sp_recursion_depth value.

Definition at line 419 of file InstallUtil.php.

static checkDatabaseThreadStackValue ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
minimumRequiredThreadStackValue,
&$  threadStackValue 
) [static]

Check database thread_stack value.

Definition at line 439 of file InstallUtil.php.

static checkDatabaseOptimizerSearchDepthValue ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
&$  optimizerSearchDepth 
) [static]

Check database optimizer_search_depth value.

Definition at line 459 of file InstallUtil.php.

static checkDatabaseDefaultCollation ( databaseType,
databaseHostname,
databaseName,
databaseUsername,
databasePassword,
databasePort,
notAllowedDatabaseCollations,
&$  databaseDefaultCollation 
) [static]

Check database default collation.

Definition at line 478 of file InstallUtil.php.

static checkDatabaseLoadLocalInFile ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort 
) [static]

Check if load local in enabled.

Definition at line 501 of file InstallUtil.php.

static checkDatabaseLogBinValue ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
&$  logBinValue 
) [static]

Check if log_bin is turned off.

Definition at line 526 of file InstallUtil.php.

static checkDatabaseLogBinTrustFunctionCreatorsValue ( databaseType,
databaseHostname,
databaseUsername,
databasePassword,
databasePort,
&$  logBinTrustFunctionCreatorsValue 
) [static]

Check if log_bin_trust_function_creators is turned on. We check this only when log_bin is turned on.

Definition at line 553 of file InstallUtil.php.

static connectToDatabase ( databaseType,
host,
databaseName,
username,
password,
port 
) [static]

Connects to the database.

Definition at line 580 of file InstallUtil.php.

static createSuperUser ( username,
password 
) [static]

Creates the first user.

Definition at line 594 of file InstallUtil.php.

static createBaseControlUserConfigUtilUserAccount (  )  [static]

creates user account to be used in backend tasks such as actions and jobs

Returns:
User

Definition at line 621 of file InstallUtil.php.

static generateRandomPasswordForSystemUser (  )  [static]

generates a random password for system user accounts.

Returns:
string

Definition at line 630 of file InstallUtil.php.

static createSystemUser ( username,
password = null,
hideFromSelecting = true,
hideFromLeaderboard = true,
firstName = null,
lastName = null 
) [static]

Create a system user that can be used for running jobs and workflow background processes. Block login via mobile, web, and api.

Parameters:
$username 
null $password
bool $hideFromSelecting
bool $hideFromLeaderboard
Returns:
User
Exceptions:
FailedToSaveModelException 

Definition at line 645 of file InstallUtil.php.

static writeConfiguration ( instanceRoot,
databaseType,
databaseHost,
databaseName,
username,
password,
port,
memcacheHost = null,
memcachePort = null,
minifyScripts = true,
language,
perInstanceFilename = 'perInstance.php',
debugFilename = 'debug.php',
hostInfo,
scriptUrl,
submitCrashToSentry = true 
) [static]

Writes configuration to debug.php and phpInstance.php.

Definition at line 708 of file InstallUtil.php.

static setZurmoTokenAndWriteToPerInstanceFile ( instanceRoot,
perInstanceFilename = 'perInstance.php' 
) [static]

Generate zurmo token and write it to perInstance file.

Parameters:
$instanceRoot 
Returns:
string

Definition at line 828 of file InstallUtil.php.

static writeInstallComplete ( instanceRoot  )  [static]

Writes into perInstance.php that the installation is complete.

Definition at line 932 of file InstallUtil.php.

static runInstallation ( form,
&$  messageStreamer 
) [static]

Given an installSettingsForm, run the install including the schema creation and default data load. This is used by the interactive install and the command line install.

Parameters:
object $form
object $messageStreamer

Definition at line 989 of file InstallUtil.php.

static getMaxAllowedFileSize (  )  [static]

Looks at the post_max_size, upload max size, and database max_allowed_packets

Returns:
integer of max allowed file size for uploads.

Definition at line 1091 of file InstallUtil.php.

static runFromInstallCommand ( args,
validateForm = false 
) [static]

Method to run installation from command line. Use .

Parameters:
array $args

Definition at line 1106 of file InstallUtil.php.

static runAutoBuildFromUpdateSchemaCommand ( messageLogger  )  [static]

From the command line, run the autobuild method which will effectively update the database schema.

Definition at line 1200 of file InstallUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Nov 20 07:10:25 2017