Public Member Functions | Protected Member Functions | Protected Attributes

oxSysRequirements Class Reference

List of all members.

Public Member Functions

 __construct ()
 __call ($sMethod, $aArgs)
 getConfig ()
 isAdmin ()
 getRequiredModules ()
 checkBug53632 ()
 checkCurl ()
 checkMbString ()
 checkServerPermissions ($sPath=null, $iMinPerm=777)
 checkModRewrite ()
 checkAllowUrlFopen ()
 checkPhp4Compat ()
 checkPhpVersion ()
 getPhpVersion ()
 checkRequestUri ()
 checkLibXml2 ()
 checkPhpXml ()
 checkJSon ()
 checkIConv ()
 checkTokenizer ()
 checkBcMath ()
 checkOpenSsl ()
 checkSoap ()
 checkMysqlConnect ()
 checkMysqlVersion ($sVersion=null)
 checkGdInfo ()
 checkIniSet ()
 checkRegisterGlobals ()
 checkMagicQuotesGpc ()
 checkMemoryLimit ()
 checkCollation ()
 checkDatabaseCluster ()
 checkUnicodeSupport ()
 checkFileUploads ()
 getSysReqStatus ()
 getSystemInfo ()
 getModuleInfo ($sModule=null)
 getReqInfoUrl ($sIdent)
 getMissingTemplateBlocks ()
 checkSessionAutostart ()

Protected Member Functions

 _getPhpIntSize ()
 _getShopHostInfoFromConfig ()
 _getShopSSLHostInfoFromConfig ()
 _getShopHostInfoFromServerVars ()
 _getShopHostInfo ()
 _getShopSSLHostInfo ()
 _checkModRewrite ($aHostInfo)
 _getAdditionalCheck ()
 _getBytes ($sBytes)
 _checkTemplateBlock ($sTemplate, $sBlockName)

Protected Attributes

 $_aRequiredModules = null
 $_blSysReqStatus = null
 $_aException = array('OXDELIVERY' => 'OXDELTYPE', 'OXSELECTLIST' => 'OXIDENT')
 $_aColumns
 $_sReqInfoUrl = "http://www.oxidforge.org/wiki/Installation"
 $_aInfoMap

Detailed Description

System requirements class.

Definition at line 9 of file oxsysrequirements.php.


Constructor & Destructor Documentation

oxSysRequirements.__construct (  ) 

Class constructor. The constructor is defined in order to be possible to call parent.__construct() in modules.

Returns:
null;

Definition at line 144 of file oxsysrequirements.php.


Member Function Documentation

oxSysRequirements.__call ( sMethod,
aArgs 
)

Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods

Parameters:
string $sMethod Methods name
array $aArgs Argument array
Exceptions:
oxSystemComponentException Throws an exception if the called method does not exist or is not accessible in current class
Returns:
string

Definition at line 160 of file oxsysrequirements.php.

oxSysRequirements._checkModRewrite ( aHostInfo  )  [protected]

Checks if mod_rewrite extension is loaded. Checks for one address.

Parameters:
array $aHostInfo host info to open socket
Returns:
integer

Definition at line 518 of file oxsysrequirements.php.

oxSysRequirements._checkTemplateBlock ( sTemplate,
sBlockName 
) [protected]

check if given template contains the given block

Parameters:
string $sTemplate template file name
string $sBlockName block name
See also:
getMissingTemplateBlocks
Returns:
bool

Definition at line 1059 of file oxsysrequirements.php.

oxSysRequirements._getAdditionalCheck (  )  [protected]

Additional sql: do not check collation for oxsysrequirements.$_aException columns

Returns:
string

Definition at line 850 of file oxsysrequirements.php.

oxSysRequirements._getBytes ( sBytes  )  [protected]

Parses and calculates given string form byte syze value

Parameters:
string $sBytes string form byte value (64M, 32K etc)
Returns:
int

Definition at line 1028 of file oxsysrequirements.php.

oxSysRequirements._getPhpIntSize (  )  [protected]

Returns PHP consntant PHP_INT_SIZE

Returns:
integer

Definition at line 134 of file oxsysrequirements.php.

oxSysRequirements._getShopHostInfo (  )  [protected]

returns host, port, current script, ssl information as assotiative array, false on error

Returns:
array

Definition at line 456 of file oxsysrequirements.php.

oxSysRequirements._getShopHostInfoFromConfig (  )  [protected]

returns host, port, base dir, ssl information as assotiative array, false on error takes this info from eShop config.inc.php (via oxConfig class)

Returns:
array

Definition at line 374 of file oxsysrequirements.php.

oxSysRequirements._getShopHostInfoFromServerVars (  )  [protected]

returns host, port, base dir, ssl information as assotiative array, false on error takes this info from _SERVER variable

Returns:
array

Definition at line 432 of file oxsysrequirements.php.

oxSysRequirements._getShopSSLHostInfo (  )  [protected]

returns host, port, current script, ssl information as assotiative array, false on error Takes ssl address from config so important only in admin.

Returns:
array

Definition at line 471 of file oxsysrequirements.php.

oxSysRequirements._getShopSSLHostInfoFromConfig (  )  [protected]

returns host, port, base dir, ssl information as assotiative array, false on error takes this info from eShop config.inc.php (via oxConfig class)

Returns:
array

Definition at line 403 of file oxsysrequirements.php.

oxSysRequirements.checkAllowUrlFopen (  ) 

Checks if activated allow_url_fopen or fsockopen on port 80 possible

Returns:
integer

Definition at line 554 of file oxsysrequirements.php.

oxSysRequirements.checkBcMath (  ) 

Checks if bcmath extension is loaded

Returns:
integer

Definition at line 683 of file oxsysrequirements.php.

oxSysRequirements.checkBug53632 (  ) 

Version check for http://bugs.php.net/53632 Assumme that PHP versions < 5.3.5 may have this issue, so informing users about possible issues PHP version 5.3.7 has security bug too.

Returns:
int

Definition at line 259 of file oxsysrequirements.php.

oxSysRequirements.checkCollation (  ) 

Checks tables and columns (oxsysrequirements.$_aColumns) collation

Returns:
array

Definition at line 865 of file oxsysrequirements.php.

oxSysRequirements.checkCurl (  ) 

Checks if curl extension is loaded

Returns:
integer

Definition at line 280 of file oxsysrequirements.php.

oxSysRequirements.checkDatabaseCluster (  ) 

Checks if database cluster is installed

Returns:
integer

Definition at line 901 of file oxsysrequirements.php.

oxSysRequirements.checkFileUploads (  ) 

Checks if php_admin_flag file_uploads is ON

Returns:
integer

Definition at line 921 of file oxsysrequirements.php.

oxSysRequirements.checkGdInfo (  ) 

Checks if GDlib extension is loaded

Returns:
integer

Definition at line 776 of file oxsysrequirements.php.

oxSysRequirements.checkIConv (  ) 

Checks if iconv extension is loaded

Returns:
integer

Definition at line 663 of file oxsysrequirements.php.

oxSysRequirements.checkIniSet (  ) 

Checks if ini set is allowed

Returns:
integer

Definition at line 790 of file oxsysrequirements.php.

oxSysRequirements.checkJSon (  ) 

Checks if JSON extension is loaded

Returns:
integer

Definition at line 653 of file oxsysrequirements.php.

oxSysRequirements.checkLibXml2 (  ) 

Checks if libxml2 is activated

Returns:
integer

Definition at line 633 of file oxsysrequirements.php.

oxSysRequirements.checkMagicQuotesGpc (  ) 

Checks if magic_quotes_gpc are off/on. Should be off.

Returns:
integer

Definition at line 812 of file oxsysrequirements.php.

oxSysRequirements.checkMbString (  ) 

Checks if mbstring extension is loaded

Returns:
integer

Definition at line 290 of file oxsysrequirements.php.

oxSysRequirements.checkMemoryLimit (  ) 

Checks memory limit.

Returns:
integer

Definition at line 826 of file oxsysrequirements.php.

oxSysRequirements.checkModRewrite (  ) 

Checks if mod_rewrite extension is loaded. Checks for all address.

Returns:
integer

Definition at line 486 of file oxsysrequirements.php.

oxSysRequirements.checkMysqlConnect (  ) 

Checks if mysql5 extension is loaded.

Returns:
integer

Definition at line 713 of file oxsysrequirements.php.

oxSysRequirements.checkMysqlVersion ( sVersion = null  ) 

Checks if current mysql version matches requirements ( >=5 )

Parameters:
string $sVersion MySQL version
Returns:
int

Definition at line 753 of file oxsysrequirements.php.

oxSysRequirements.checkOpenSsl (  ) 

Checks if openssl extension is loaded

Returns:
integer

Definition at line 693 of file oxsysrequirements.php.

oxSysRequirements.checkPhp4Compat (  ) 

PHP4 compatibility mode must be set off: zend.ze1_compatibility_mode = Off

Returns:
integer

Definition at line 577 of file oxsysrequirements.php.

oxSysRequirements.checkPhpVersion (  ) 

Checks PHP version. < PHP 5.2.0 - red. PHP 5.2.0-5.2.9 - yellow. PHP 5.2.10 or higher - green.

Returns:
integer

Definition at line 592 of file oxsysrequirements.php.

oxSysRequirements.checkPhpXml (  ) 

Checks if php-xml is activated ???

Returns:
integer

Definition at line 643 of file oxsysrequirements.php.

oxSysRequirements.checkRegisterGlobals (  ) 

Checks if register_globals are off/on. Should be off.

Returns:
integer

Definition at line 800 of file oxsysrequirements.php.

oxSysRequirements.checkRequestUri (  ) 

Checks if apache server variables REQUEST_URI or SCRIPT_URI are set

Returns:
integer

Definition at line 623 of file oxsysrequirements.php.

oxSysRequirements.checkServerPermissions ( sPath = null,
iMinPerm = 777 
)

Checks if permissions on servers are correctly setup

Parameters:
string $sPath check path [optional]
int $iMinPerm min permission level, default 777 [optional]
Returns:
int

Definition at line 303 of file oxsysrequirements.php.

oxSysRequirements.checkSessionAutostart (  ) 

Check if correct AutoStart setting.

Returns:
bool

Definition at line 1129 of file oxsysrequirements.php.

oxSysRequirements.checkSoap (  ) 

Checks if SOAP extension is loaded

Returns:
integer

Definition at line 703 of file oxsysrequirements.php.

oxSysRequirements.checkTokenizer (  ) 

Checks if tokenizer extension is loaded

Returns:
integer

Definition at line 673 of file oxsysrequirements.php.

oxSysRequirements.checkUnicodeSupport (  ) 

Checks if PCRE unicode support is turned off/on. Should be on.

Returns:
integer

Definition at line 911 of file oxsysrequirements.php.

oxSysRequirements.getConfig (  ) 

Returns config instance

Returns:
oxConfig

Definition at line 181 of file oxsysrequirements.php.

oxSysRequirements.getMissingTemplateBlocks (  ) 

returns array of missing template block files: 1. checks db for registered blocks 2. checks each block if it exists in currently used theme templates returned array components are of form array(module name, block name, template file) only active (oxactive==1) blocks are checked

Returns:
array

Definition at line 1085 of file oxsysrequirements.php.

oxSysRequirements.getModuleInfo ( sModule = null  ) 

Returns passed module state

Parameters:
string $sModule module name to check
Returns:
integer $iModStat

Definition at line 990 of file oxsysrequirements.php.

oxSysRequirements.getPhpVersion (  ) 

Gets PHP version.

Returns:
float|string

Definition at line 613 of file oxsysrequirements.php.

oxSysRequirements.getReqInfoUrl ( sIdent  ) 

Returns or prints url for info about missing web service configuration

Parameters:
string $sIdent Module identifier
Returns:
mixed

Definition at line 1008 of file oxsysrequirements.php.

oxSysRequirements.getRequiredModules (  ) 

Sets system required modules

Returns:
array

Definition at line 201 of file oxsysrequirements.php.

oxSysRequirements.getSysReqStatus (  ) 

Checks system requirements status

Returns:
bool

Definition at line 941 of file oxsysrequirements.php.

oxSysRequirements.getSystemInfo (  ) 

Runs through modules array and checks if current system fits requirements. Returns array with module info: array( $sGroup, $sModuleName, $sModuleState ): $sGroup - group of module $sModuleName - name of checked module $sModuleState - module state: -1 - unable to datect, should not block 0 - missing, blocks setup 1 - fits min requirements 2 - exists required or better

Returns:
array $aSysInfo

Definition at line 966 of file oxsysrequirements.php.

oxSysRequirements.isAdmin (  ) 

Possibility to mock isAdmin() function as we do not extend oxsuperconfig.

Returns:
bool

Definition at line 191 of file oxsysrequirements.php.


Member Data Documentation

oxSysRequirements.$_aColumns [protected]

Definition at line 38 of file oxsysrequirements.php.

oxSysRequirements.$_aException = array('OXDELIVERY' => 'OXDELTYPE', 'OXSELECTLIST' => 'OXIDENT') [protected]

Definition at line 31 of file oxsysrequirements.php.

oxSysRequirements.$_aInfoMap [protected]
Initial value:
 array(
        "php_version"        => "PHP_version_at_least_5.3.25",
        "lib_xml2"           => "LIB_XML2",
        "php_xml"            => "DOM",
        "open_ssl"           => "OpenSSL",
        "soap"               => "SOAP",
        "j_son"              => "JSON",
        "i_conv"             => "ICONV",
        "tokenizer"          => "Tokenizer",
        "mysql_connect"      => "MySQL_client_connector_for_MySQL_5",
        "gd_info"            => "GDlib_v2_.5Bv1.5D_incl._JPEG_support",
        "mb_string"          => "mbstring",
        "bc_math"            => "BCMath",
        "allow_url_fopen"    => "allow_url_fopen_or_fsockopen_to_port_80",
        "php4_compat"        => "Zend_compatibility_mode_must_be_off",
        "request_uri"        => "REQUEST_URI_set",
        "ini_set"            => "ini_set_allowed",
        "register_globals"   => "register_globals_must_be_off",
        "memory_limit"       => "PHP_Memory_limit_.28min._14MB.2C_30MB_recommended.29",
        "unicode_support"    => "UTF-8_support",
        "file_uploads"       => "file_uploads_on",
        "mod_rewrite"        => "apache_mod_rewrite_module",
        "server_permissions" => "Files_.26_Folder_Permission_Setup",
        "zend_optimizer"     => "Zend_Optimizer",
        "bug53632"           => "Not_recommended_PHP_versions",
        "session_autostart"  => "session.auto_start_must_be_off",
        "magic_quotes_gpc"   => "magic_quotes_must_be_off"
        
    )

Definition at line 99 of file oxsysrequirements.php.

oxSysRequirements.$_aRequiredModules = null [protected]

Definition at line 17 of file oxsysrequirements.php.

oxSysRequirements.$_blSysReqStatus = null [protected]

Definition at line 24 of file oxsysrequirements.php.

oxSysRequirements.$_sReqInfoUrl = "http://www.oxidforge.org/wiki/Installation" [protected]

Definition at line 92 of file oxsysrequirements.php.


The documentation for this class was generated from the following file: