Horde_Test
in package
Table of Contents
- $_appList : array<string|int, mixed>
- Inter-Horde application dependencies.
- $_fileList : array<string|int, mixed>
- Required configuration files.
- $_moduleList : array<string|int, mixed>
- The module list <pre> KEY: extension name VALUE: Either the description or an array with the following entries: descrip: (string) Module description error: (string) Error message fatal: (boolean) Is missing extension fatal? function: (string) Reference to function to run. If function returns boolean false, error message will be output.
- $_pearList : array<string|int, mixed>
- PEAR modules list.
- $_phpver : array<string|int, mixed>
- The PHP version of the system.
- $_settingsList : array<string|int, mixed>
- PHP settings list.
- $_supported : array<string|int, mixed>
- Supported versions of PHP.
- __construct() : mixed
- Constructor.
- appTests() : string
- Any application specific tests that need to be done.
- getPhpVersionInformation() : object
- Obtain information on the PHP version.
- pearModuleCheck() : string
- Check the list of PEAR modules.
- phpModuleCheck() : string
- Check the list of PHP modules.
- phpSettingCheck() : string
- Checks the list of PHP settings.
- requiredAppCheck() : string
- Check the list of required Horde applications.
- requiredFileCheck() : string
- Check the list of required files
- _checkFileinfo() : bool
- Additional check for fileinfo module.
- _checkGcDivisor() : bool
- Additional check for 'session.gc_divisor'.
- _checkGcProbability() : bool
- Additional check for 'session.gc_probability'.
- _checkIconvImplementation() : bool
- Additional check for iconv module implementation.
- _checkLibxmlVersion() : bool
- Additional check for libxml version.
- _checkLzCompression() : bool
- Check for either horde_lz4 or lzf.
- _checkMemcache() : mixed
- _checkMemoryLimit() : bool
- Additional check for 'session.gc_divisor'.
- _checkMongo() : mixed
- _checkMysql() : mixed
- _checkPam() : mixed
- _outputLine() : string
- Internal output function.
- _requiredFileCheck() : string
- Check the list of required files
- _splitPhpVersion() : mixed
- Parse PHP version.
- _status() : string
- Output the results of a status check.
Properties
$_appList
Inter-Horde application dependencies.
protected
array<string|int, mixed>
$_appList
= array()
KEY: app name VALUE: An array with the following entries: error: (string) Error message. version: (string) Minimum version required of the app.
$_fileList
Required configuration files.
protected
array<string|int, mixed>
$_fileList
= array('config/conf.php' => 'You need to login to Horde as an administrator and create the configuration file.')
KEY: file path VALUE: The error message to use (null to use default message)
$_moduleList
The module list <pre> KEY: extension name VALUE: Either the description or an array with the following entries: descrip: (string) Module description error: (string) Error message fatal: (boolean) Is missing extension fatal? function: (string) Reference to function to run. If function returns boolean false, error message will be output.
protected
array<string|int, mixed>
$_moduleList
= array('ctype' => array('descrip' => 'Ctype Support', 'error' => 'The ctype functions are required by various Horde libraries. Don\\t compile PHP with <code>--disable-all/--disable-ctype</code>.', 'fatal' => \true), 'dom' => array('descrip' => 'DOM XML Support', 'error' => 'Horde will not run without the dom extension. Don\'t compile PHP with <code>--disable-all/--disable-dom</code>.', 'fatal' => \true), 'fileinfo' => array('descrip' => 'MIME Magic Support (fileinfo)', 'error' => 'The fileinfo extension is used to provide MIME Magic scanning on unknown data. Don\'t compile PHP with <code>--disable-all/--disable-fileinfo</code>.'), 'fileinfo_check' => array('descrip' => 'MIME Magic Support (fileinfo) - Configuration', 'error' => 'The fileinfo extension could not open the default MIME Magic database location. You will need to manually specify the MIME Magic database location in the config file.', 'function' => '_checkFileinfo'), 'ftp' => array('descrip' => 'FTP Support', 'error' => 'FTP support is only required if you want to authenticate against an FTP server, upload your configuration files with FTP, or use an FTP server for file storage. Compile PHP with <code>--enable-ftp</code> to ensure the extension is active on your server.'), 'gd' => array('descrip' => 'GD Support', 'error' => 'Horde will use the GD extension to perform manipulations on image data (compile PHP with <code>--with-gd</code>). It is recommended to use the PECL imagick library instead over this extension.'), 'gettext' => array('descrip' => 'Gettext Support', 'error' => 'Horde will not run without gettext support. Compile PHP with <code>--with-gettext</code>.', 'fatal' => \true), 'geoip' => array('descrip' => 'GeoIP Support (PECL extension)', 'error' => 'Horde can optionally use the GeoIP extension to provide faster country name lookups.'), 'hash' => array('descrip' => 'Hash Support', 'error' => 'Horde will not run without the hash extension. Don\'t compile PHP with <code>--disable-all/--disable-hash</code>.', 'fatal' => \true), 'horde_lz4/lzf' => array('descrip' => 'LZ4/LZF Compression Support (PECL extension)', 'error' => 'If the horde_lz4 or lzf PECL extensions are available, Horde can perform real-time compression on cached data to optimize storage resources. It is recommended to use horde_lz4, as its compression speed is twice as fast as the lzf extension\'s.', 'function' => '_checkLzCompression'), 'iconv' => array('descrip' => 'Iconv Support', 'error' => 'If you want to take full advantage of Horde\'s localization features and character set support, you will need the iconv extension. Don\\t compile PHP with <code>--disable-all/--disable-iconv</code>.'), 'iconv_libiconv' => array('descrip' => 'GNU Iconv Support', 'error' => 'For best results make sure the iconv extension is linked against GNU libiconv.', 'function' => '_checkIconvImplementation'), 'imagick' => array('descrip' => 'Imagick (PECL extension)', 'error' => 'Horde can make use of the Imagick library to manipulate images. It is highly recommended to use the PECL extension (although, alternatively, Horde can be configured to use the convert command line utility instead).'), 'json' => array('descrip' => 'JSON Support', 'error' => 'Horde will not run without the json extension. Don\'t compile PHP with <code>--disable-all/--disable-json</code>.', 'fatal' => \true), 'ldap' => array('descrip' => 'LDAP Support', 'error' => 'LDAP support is only required if you want to use an LDAP server for anything like authentication, address books, or preference storage. Compile PHP with <code>--with-ldap</code> to activate the extension.'), 'mbstring' => array('descrip' => 'Mbstring Support', 'error' => 'If you want to take full advantage of Horde\'s localization features and character set support, you will need the mbstring extension. Compile PHP with <code>--enable-mbstring</code> to activate the extension.'), 'memcached' => array('descrip' => 'Memcached Support (PECL extension)', 'error' => 'The memcache(d) PECL extension is only needed if you are using a Memcached server for caching or sessions. See horde/doc/INSTALL for information on how to install PECL/PHP extensions.', 'function' => '_checkMemcache'), 'mongodb' => array('descrip' => 'MongoDB support (PECL extension)', 'error' => 'If you want to use the MongoDB NoSQL database backend, you must install the mongo(db) extension.', 'function' => '_checkMongo'), 'mysql' => array('descrip' => 'MySQL Support', 'error' => 'The MySQL extensions are only required if you want to use a MySQL database server for data storage. See the PHP documentation on how to enable MySQL support when compiling PHP.', 'function' => '_checkMysql'), 'openssl' => array('descrip' => 'OpenSSL Support', 'error' => 'The OpenSSL extension is required for various cryptographic actions (highly recommended). Compile PHP with <code>--with-openssl</code> to activate the extension.'), 'pam' => array('descrip' => 'PAM Support (PECL extension)', 'error' => 'The PAM PECL extension is required to allow PAM authentication to be used.', 'function' => '_checkPam'), 'pdo' => array('descrip' => 'PDO', 'error' => 'The PDO extension is required if you plan on using a database backend other than mysql or mysqli with Horde_Db.'), 'pgsql' => array('descrip' => 'PostgreSQL Support', 'error' => 'The PostgreSQL extension is only required if you want to use a PostgreSQL database server for data storage.'), 'session' => array('descrip' => 'Session Support', 'error' => 'Session support is required to use Horde. Don\'t compile PHP with <code>--disable-all/--disable-session</code>.', 'fatal' => \true), 'SimpleXML' => array('descrip' => 'SimpleXML support', 'error' => 'Horde will not run without the SimpleXML extension. Don\'t compile PHP with <code>--disable-all/--disable-simplexml</code>.', 'fatal' => \true), 'tidy' => array('descrip' => 'Tidy support', 'error' => 'The tidy PHP extension is used to sanitize HTML data. Compile PHP with <code>--with-tidy</code> to activate the extension.'), 'xml' => array('descrip' => 'XML Parser support', 'error' => 'Horde will not run without the xml extension. Don\'t compile PHP with <code>--disable-all/--without-xml</code>.', 'fatal' => \true, 'function' => '_checkLibxmlVersion'), 'zlib' => array('descrip' => 'Zlib Support', 'error' => 'The zlib extension is highly recommended for use with Horde. It allows page compression and handling of ZIP and GZ data. Compile PHP with <code>--with-zlib</code> to activate.'))
If function returns a string, this error message will be used. phpver: (string) The PHP version above which to do the test
$_pearList
PEAR modules list.
protected
array<string|int, mixed>
$_pearList
= array('File_Fstab' => array('error' => 'Horde requires the File_Fstab package if using the localhost driver for the Accounts block.'), 'Net_DNS2' => array('error' => 'Net_DNS2 can speed up hostname lookups against broken DNS servers.'), 'Math_BigInteger' => array('error' => 'The Math_BigInteger library is used in decoding certain embedded attachments in TNEF data.'), 'Predis\\Client' => array('error' => 'The Predis library is only needed if you are using a Redis server as a hash table backend for caching or sessions. This library is provided by the pear.nrk.io PEAR channel.'))
KEY: PEAR class name VALUE: An array with the following entries: depends: (?) This module depends on another module. error: (string) Error message. function: (string) Reference to function to run if module is found. path: (string) The path to the PEAR module. Only needed if KEY is not autoloadable. required: (boolean) Is this PEAR module required?
$_phpver
The PHP version of the system.
protected
array<string|int, mixed>
$_phpver
$_settingsList
PHP settings list.
protected
array<string|int, mixed>
$_settingsList
= array('allow_url_include' => array('setting' => \false, 'error' => 'This is a security hazard. Horde will attempt to disable automatically, but it is best to manually disable also.'), 'magic_quotes_runtime' => array('setting' => \false, 'error' => 'magic_quotes_runtime may cause problems with database inserts, etc. Horde will attempt to disable automatically, but it is best to manually disable also. This setting is deprecated in PHP 5.3.'), 'magic_quotes_sybase' => array('setting' => \false, 'error' => 'magic_quotes_sybase may cause problems with database inserts, etc. Horde will attempt to disable automatically, but it is best to manually disable also. This setting is deprecated in PHP 5.3.'), 'memory_limit' => array('setting' => 'value', 'error' => 'If PHP\'s internal memory limit is not set high enough Horde will not be able to handle large data items. It is recommended to set the value of memory_limit in php.ini to at least 64M.', 'function' => '_checkMemoryLimit'), 'register_globals' => array('setting' => \false, 'error' => 'Horde will fatally exit if register_globals is set. Turn it off. This setting is deprecated in PHP 5.3.'), 'safe_mode' => array('setting' => \false, 'error' => 'If safe_mode is enabled, Horde cannot set enviroment variables, which means Horde will be unable to translate the user interface into different languages. This setting is deprecated in PHP 5.3.'), 'session.auto_start' => array('setting' => \false, 'error' => 'Horde won\'t work with automatically started sessions, because it explicitly creates new session when necessary to protect against session fixations.'), 'session.gc_divisor' => array('setting' => 'value', 'error' => 'PHP automatically garbage collects old session information, as long as this setting (and session.gc_probability) are set to non-zero. It is recommended that this value be "10000" or higher (see doc/INSTALL).', 'function' => '_checkGcDivisor'), 'session.gc_probability' => array('setting' => 'value', 'error' => 'PHP automatically garbage collects old session information, as long as this setting (and session.gc_divisor) are set to non-zero. It is recommended that this value be "1". Some distributions may implement the garbage collection externally through a cronjob though.', 'function' => '_checkGcProbability'), 'session.use_trans_sid' => array('setting' => \false, 'error' => 'Horde will work with session.use_trans_sid turned on, but you may see double session-ids in your URLs, and if the session name in php.ini differs from the session name configured in Horde, you may get two session ids and see other odd behavior. The URL-rewriting that use_trans_sid does also tends to break XHTML compliance. In short, you should really disable this.'), 'tidy.clean_output' => array('setting' => \false, 'error' => 'This will break output of any dynamically created, non-HTML content. Horde will attempt to disable automatically, but it is best to manually disable also.'), 'zlib.output_compression' => array('setting' => \false, 'error' => 'You should not enable output compression unconditionally because some browsers and scripts don\'t work well with output compression. Enable compression in Horde\'s configuration instead, so that we have full control over the conditions where to enable and disable it.'))
KEY: setting name VALUE: An array with the following entries: error: (string) Error message. function: (string) Reference to function to run. If function returns non-empty value, error message will be output. setting: (mixed) Either a boolean (whether setting should be on or off) or 'value', which will simply output the value of the setting.
$_supported
Supported versions of PHP.
protected
array<string|int, mixed>
$_supported
= array('7.4', '8.0', '8.1', '8.2')
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —appTests()
Any application specific tests that need to be done.
public
appTests() : string
Return values
string —HTML output.
getPhpVersionInformation()
Obtain information on the PHP version.
public
getPhpVersionInformation() : object
Return values
object —stdClass TODO
pearModuleCheck()
Check the list of PEAR modules.
public
pearModuleCheck() : string
Return values
string —The HTML output.
phpModuleCheck()
Check the list of PHP modules.
public
phpModuleCheck() : string
Return values
string —The HTML output.
phpSettingCheck()
Checks the list of PHP settings.
public
phpSettingCheck([mixed $settings = null ]) : string
Parameters
- $settings : mixed = null
Tags
Return values
string —The HTML output.
requiredAppCheck()
Check the list of required Horde applications.
public
requiredAppCheck() : string
Return values
string —The HTML output.
requiredFileCheck()
Check the list of required files
public
requiredFileCheck() : string
Return values
string —The HTML output.
_checkFileinfo()
Additional check for fileinfo module.
protected
_checkFileinfo() : bool
Return values
bool —False on error.
_checkGcDivisor()
Additional check for 'session.gc_divisor'.
protected
_checkGcDivisor() : bool
Return values
bool —Returns true if error string should be displayed.
_checkGcProbability()
Additional check for 'session.gc_probability'.
protected
_checkGcProbability() : bool
Return values
bool —Returns true if error string should be displayed.
_checkIconvImplementation()
Additional check for iconv module implementation.
protected
_checkIconvImplementation() : bool
Return values
bool —False on error.
_checkLibxmlVersion()
Additional check for libxml version.
protected
_checkLibxmlVersion() : bool
Return values
bool —False on error.
_checkLzCompression()
Check for either horde_lz4 or lzf.
protected
_checkLzCompression() : bool
Return values
bool —False on error.
_checkMemcache()
protected
_checkMemcache() : mixed
Return values
mixed —_checkMemoryLimit()
Additional check for 'session.gc_divisor'.
protected
_checkMemoryLimit() : bool
Return values
bool —Returns true if error string should be displayed.
_checkMongo()
protected
_checkMongo() : mixed
Return values
mixed —_checkMysql()
protected
_checkMysql() : mixed
Return values
mixed —_checkPam()
protected
_checkPam() : mixed
Return values
mixed —_outputLine()
Internal output function.
protected
_outputLine(array<string|int, mixed> $entry) : string
Parameters
- $entry : array<string|int, mixed>
-
Array with the following values:
1st value: Header 2nd value: Test Result 3rd value: Error message (if present) 4th value: Error level (if present): 0 = error, 1 = warning
Return values
string —HTML output.
_requiredFileCheck()
Check the list of required files
protected
_requiredFileCheck(array<string|int, mixed> $filelist, string $php[, bool $is_local = false ]) : string
Parameters
- $filelist : array<string|int, mixed>
-
List of files to check.
- $php : string
-
PHP CLI location.
- $is_local : bool = false
-
Is filelist a "local" file?
Return values
string —The HTML output.
_splitPhpVersion()
Parse PHP version.
protected
_splitPhpVersion(string $version) : mixed
Parameters
- $version : string
-
A PHP-style version string (X.X.X).
Return values
mixed —_status()
Output the results of a status check.
protected
_status(bool $bool[, bool $required = true ]) : string
Parameters
- $bool : bool
-
The result of the status check.
- $required : bool = true
-
Whether the checked item is required.
Return values
string —The HTML of the result of the status check.