| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/otelreskator.ru/wp-content/plugins/w3-total-cache/ |
Upload File : |
<?php
namespace W3TC;
/**
* Checks if different server modules are enabled and installed
*/
class Util_Installed {
static public function opcache() {
return function_exists( 'opcache_reset' ) && ini_get( 'opcache.enable' );
}
static public function apc() {
return function_exists( 'apc_store' ) || function_exists( 'apcu_store' );
}
static public function apc_opcache() {
return function_exists( 'apc_compile_file' ) && ini_get( 'apc.enable' );
}
public static function is_opcache_validate_timestamps() {
return ini_get( 'opcache.validate_timestamps' );
}
public static function is_apc_validate_timestamps() {
return ini_get( 'apc.stat' );
}
static public function curl() {
return function_exists( 'curl_init' );
}
static public function eaccelerator() {
return function_exists( 'eaccelerator_put' );
}
static public function ftp() {
return function_exists( 'ftp_connect' );
}
static public function memcached_auth() {
static $r = null;
if ( is_null( $r ) ) {
if ( !class_exists( '\Memcached' ) )
$r = false;
else {
$o = new \Memcached();
$r = method_exists( $o, 'setSaslAuthData' );
}
}
return $r;
}
static public function memcached() {
return class_exists( 'Memcache' ) || class_exists( 'Memcached' );
}
static public function memcached_memcached() {
return class_exists( 'Memcached' );
}
static public function memcached_aws() {
return class_exists( '\Memcached' ) &&
defined( '\Memcached::OPT_CLIENT_MODE' ) &&
defined( '\Memcached::DYNAMIC_CLIENT_MODE' );
}
static function memcache_auth() {
static $r = null;
if ( is_null( $r ) ) {
if ( !class_exists( '\Memcached' ) )
$r = false;
else {
$o = new \Memcached();
$r = method_exists( $o, 'setSaslAuthData' );
}
}
return $r;
}
static public function redis() {
return class_exists( 'Redis' );
}
static public function tidy() {
return class_exists( 'tidy' );
}
static public function wincache() {
return function_exists( 'wincache_ucache_set' );
}
static public function xcache() {
return function_exists( 'xcache_set' );
}
/**
* Check if memcache is available
*
* @param array $servers
* @param boolean $binary_protocol
* @param string $username
* @param string $password
* @return boolean
*/
static public function is_memcache_available( $servers, $binary_protocol, $username, $password ) {
static $results = array();
$key = md5( implode( '', $servers ) );
if ( !isset( $results[$key] ) ) {
$memcached = Cache::instance( 'memcached', array(
'servers' => $servers,
'persistent' => false,
'binary_protocol' => $binary_protocol,
'username' => $username,
'password' => $password
) );
if ( is_null( $memcached ) )
return false;
$test_string = sprintf( 'test_' . md5( time() ) );
$test_value = array( 'content' => $test_string );
$memcached->set( $test_string, $test_value, 60 );
$test_value = $memcached->get( $test_string );
$results[$key] = ( $test_value['content'] == $test_string );
}
return $results[$key];
}
}