\MainWP\ChildMainWP_Child_Server_Information_Base

Class MainWP_Child_Server_Information_Base

Base set of methods to collect a Child Site's server information.

Summary

Methods
Properties
Constants
get_class_name()
get_curl_support()
get_curl_version()
curlssl_compare()
get_curl_ssl_version()
get_file_system_method()
get_openssl_working_status()
get_my_sql_version()
get_php_memory_limit()
get_db_size()
No public properties found
No constants found
get_warnings()
check_mainwp_directory()
check()
filesize_compare()
get_curl_timeout()
mainwp_required_functions()
get_loaded_php_extensions()
get_current_version()
get_mainwp_version()
get_zip_archive_enabled()
get_gzip_enabled()
get_bzip_enabled()
get_wordpress_version()
get_wordpress_memory_limit()
check_if_multisite()
get_ssl_support()
get_ssl_warning()
get_php_version()
get_max_execution_time()
get_upload_max_filesize()
get_post_max_size()
get_max_input_time()
get_os()
get_architecture()
memory_usage()
get_output_buffer_size()
get_php_safe_mode()
get_sql_mode()
get_php_allow_url_fopen()
get_php_exif()
get_php_ip_tc()
get_php_xml()
get_server_getaway_interface()
get_server_ip()
get_server_name()
get_server_software()
get_server_protocol()
get_server_request_time()
get_server_http_accept()
get_server_accept_charset()
get_http_host()
get_complete_url()
get_user_agent()
get_https()
server_self_connect()
get_remote_address()
get_remote_host()
get_remote_port()
get_script_file_name()
get_server_port()
get_current_page_uri()
get_wp_root()
time_compare()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Get class name.

Returns

string —

CLASS Class name.

get_curl_support()

get_curl_support() : boolean

Check if PHP class curl_version() is enabled.

Returns

boolean —

If 'curl_version' function exists, return true, if not, return false.

get_curl_version()

get_curl_version() : string

Get current cURL Version.

Returns

string —

Current cURL Version.

curlssl_compare()

curlssl_compare(string  $version, string  $operator) : boolean|integer

Compare current cURL & SSL versions to required values.

Parameters

string $version

Required values to compare to.

string $operator

Comparison operator.

Returns

boolean|integer —

When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.

get_curl_ssl_version()

get_curl_ssl_version() : string

Get curl ssl version.

Returns

string —

SSL version.

get_file_system_method()

get_file_system_method() : string

Get file system method.

Returns

string —

$fs The returned file system method.

get_openssl_working_status()

get_openssl_working_status() : boolean

To verify openssl working.

Returns

boolean —

Working status.

get_my_sql_version()

get_my_sql_version() : string

Get current MySQL version.

Returns

string —

Return the current MySQL version.

get_php_memory_limit()

get_php_memory_limit() : string

Get current PHP memory limit.

Returns

string —

Return current PHP memory limit.

get_db_size()

get_db_size() : string

Get db size.

Returns

string —

Return current db size.

get_warnings()

get_warnings() : integer

Initiate check on important System Variables and compare them to required defaults.

Returns

integer —

$i Number of detected issues.

check_mainwp_directory()

check_mainwp_directory(string  $message = '', string  $path = '') : boolean

Check if MainWP Directory is writeable.

Parameters

string $message

Return message - Directory not found, Directory not writable, writeable.

string $path

MainWP directory path.

Returns

boolean —

TRUE if exists & writeable, FALSE if not.

check()

check(string  $pCompare, string  $pVersion, string  $pGetter, string  $pExtraCompare = null, string  $pExtraVersion = null, boolean  $sizeCompare = false) : boolean|integer

Check Child Site system variables for any issues.

Parameters

string $pCompare

Comparison operator.

string $pVersion

Version to compare to.

string $pGetter

The method to grab the data with.

string $pExtraCompare

Extra comparison operator.

string $pExtraVersion

Extra version to compare to.

boolean $sizeCompare

Size to compare to.

Returns

boolean|integer —

When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.

filesize_compare()

filesize_compare(string  $value1, string  $value2, string  $operator = null) : boolean|integer

Compare filesizes.

Parameters

string $value1

First value to compare.

string $value2

Second value to compare.

string $operator

Comparison operator.

Returns

boolean|integer —

When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise. Returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.

get_curl_timeout()

get_curl_timeout() : integer

Get current cURL Timeout.

Returns

integer —

Current cURL timeout value.

mainwp_required_functions()

mainwp_required_functions() 

Check for disabled PHP functions.

get_loaded_php_extensions()

get_loaded_php_extensions() 

Get loaded PHP extensions.

get_current_version()

get_current_version() : string

Get the current MainWP Child plugin version.

Returns

string —

$currentVersion The MainWP Child plugin current version.

get_mainwp_version()

get_mainwp_version() : string|boolean

Get the current MainWP Child plugin version.

Returns

string|boolean —

Most recent MainWP Child version or FALSE.

get_zip_archive_enabled()

get_zip_archive_enabled() : boolean

Check if PHP class \ZipArchive is enabled.

Returns

boolean —

If '\ZipArchive' class exists, return true, if not, return false.

get_gzip_enabled()

get_gzip_enabled() : boolean

Check if PHP function gzopen is enabled.

Returns

boolean —

If 'gzopen' function exists, return true, if not, return false.

get_bzip_enabled()

get_bzip_enabled() : boolean

Check if PHP function bzopen is enabled.

Returns

boolean —

If 'bzopen' function exists, return true, if not, return false.

get_wordpress_version()

get_wordpress_version() : string

Get current WordPress version.

Returns

string —

$wp_version Current WordPress version.

get_wordpress_memory_limit()

get_wordpress_memory_limit() : string

Get current WordPress memory limit.

Returns

string —

Current WordPress memory limit.

check_if_multisite()

check_if_multisite() : boolean

Check if in multisite WordPress environment.

Returns

boolean —

If multisite detected, return false, if not, return true.

get_ssl_support()

get_ssl_support() : boolean

Check if PHP extension OpenSSL is enabled.

Returns

boolean —

If 'openssl' extension is loaded, return true, if not, return false.

get_ssl_warning()

get_ssl_warning() : false|string

Get any SSL warnings.

Returns

false|string —

Return error message if there are warnings, FALSE otherwise.

get_php_version()

get_php_version() : string

Get current PHP version.

Returns

string —

Current PHP version.

get_max_execution_time()

get_max_execution_time() : string

Get max execution time.

Returns

string —

Return the PHP max execution time.

get_upload_max_filesize()

get_upload_max_filesize() : string

Get the max uplaod filesize.

Returns

string —

Return the maximum upload filesize.

get_post_max_size()

get_post_max_size() : string

Get the max post size.

Returns

string —

Return the post maximum filesize.

get_max_input_time()

get_max_input_time() : string

Get max input time.

Returns

string —

Return current maximum input time.

get_os()

get_os() 

Get operating system.

get_architecture()

get_architecture() 

Get System architecture.

memory_usage()

memory_usage() 

Get the current Memory usage.

get_output_buffer_size()

get_output_buffer_size() : string

Get the current output buffer size.

Returns

string —

Return the current back track limit.

get_php_safe_mode()

get_php_safe_mode() 

Check if PHP is in Safe Mode.

get_sql_mode()

get_sql_mode() 

Get current SQL mode.

get_php_allow_url_fopen()

get_php_allow_url_fopen() 

Check if PHP Allow URL fopen is enabled.

get_php_exif()

get_php_exif() 

Check if PHP exif is enabled.

get_php_ip_tc()

get_php_ip_tc() 

Check if PHP IP TC is enabled.

get_php_xml()

get_php_xml() 

Check if PHP XML is enabled.

get_server_getaway_interface()

get_server_getaway_interface() 

Get current server gateway interface.

get_server_ip()

get_server_ip() 

Get server IP.

get_server_name()

get_server_name() 

Get server name.

get_server_software()

get_server_software() 

Get server software.

get_server_protocol()

get_server_protocol() 

Get server protocol.

get_server_request_time()

get_server_request_time() 

Get server request time.

get_server_http_accept()

get_server_http_accept() 

Get server HTTP accept.

get_server_accept_charset()

get_server_accept_charset() 

Get server accepted charset.

get_http_host()

get_http_host() 

Get server HTTP host.

get_complete_url()

get_complete_url() 

Get server complete URL.

get_user_agent()

get_user_agent() 

Get server user agent.

get_https()

get_https() 

Check if HTTPS is on.

server_self_connect()

server_self_connect() 

Server self-connection test.

get_remote_address()

get_remote_address() 

Get server remote address.

get_remote_host()

get_remote_host() 

Get server remote host.

get_remote_port()

get_remote_port() 

Get server remote port.

get_script_file_name()

get_script_file_name() 

Get server script filename.

get_server_port()

get_server_port() 

Get server port.

get_current_page_uri()

get_current_page_uri() 

Get current page URL.

get_wp_root()

get_wp_root() 

Get WordPress root directory.

time_compare()

time_compare(string  $a, string  $b) : integer

Time comparison.

Parameters

string $a

Time 1.

string $b

Time 2.

Returns

integer —

Return 0 if $a is equal to $b, -1 if $a > $b or 1 if $a < $b.