| => |v\">)([^ <]*)(.* $thread_safe, 'DEBUG_BUILD' => $debug_build, 'PHP_INI' => $php_ini_path, 'CGI_CLI' => $cgi_cli); } function ioncube_will_work(&$what_to_do){ $sys_info = ic_system_info(); if ($sys_info['THREAD_SAFE'] && !$sys_info['CGI_CLI']) return "(reason: multi-thread PHP build)"; if ($sys_info['DEBUG_BUILD']) return "(reason: debug PHP build)"; if (ini_get('safe_mode')) { $what_to_do = "Ask your provider to enable safe_mode in php.ini file"; return "(safe_mode enabled in php.ini)"; } elseif (!ini_get('enable_dl')) { $what_to_do = "Ask your provider to enable safe_mode in php.ini file"; return "(enable_dl disabled in php.ini)"; } elseif (!is_dir($pp=realpath(ini_get('extension_dir')))) { $what_to_do = "Ask your provider to create folder: $pp"; return "(extension_dir setting in php.ini is incorrect - points to not-existing folder)"; } $_u = php_uname(); $_os = substr($_u,0,strpos($_u,' ')); $_os_key = strtolower(substr($_u,0,3)); $_php_version = phpversion(); $_php_family = substr($_php_version,0,3); $_loader_sfix = (($_os_key == 'win') ? '.dll' : '.so'); $_ln_old="ioncube_loader.$_loader_sfix"; if (($os_key == 'lin') || ($os_key == 'fre')){ $what_to_do = "Please get loader for $_php_family for $_os (file $_ln_old) here and upload it to /amember/ioncube/ folder"; } } function ioncube_is_installed(){ echo "Testing whether your system has ionCube Loader in php.ini..."; $res = extension_loaded('ionCube Loader'); print $res ? "OK" : "Failed"; print "
"; return $res; } function zend_is_installed(){ echo "Testing whether your system has Zend Optimizer in php.ini..."; $res = extension_loaded('Zend Optimizer'); print $res ? "OK" : "Failed"; print "
"; return $res; } function test_ioncube_loading(){ echo "Testing whether your system can load ionCube Loader dynamically..."; $err = ioncube_will_work($what_to_do); print ($err=='') ? "OK" : "Failed $err"; print "
"; return ($err==''); } if (phpversion() < "4.0.6"){ print "aMember requires PHP version 4.0.6 or later. We recommend you to upgrade to latest version"; exit(); } elseif (ioncube_is_installed()) { $enc = "ionCube Loader installed"; } elseif (zend_is_installed()){ $enc = "Zend Optimizer installed"; } elseif (test_ioncube_loading()){ $enc = "ionCube dynamic loading possible"; } else { } print "Testing results:
"; if ($enc){ print "No additional configuration required and aMember will work on your hosting using the following loading method: $enc

"; } else { print "Unfortunately, no available loaders found in your system and some additional configuration required. Please contact your hosting support and ask them to do ONE from the following: "; } if (!function_exists('mysql_connect')){ print "
Additionally, PHP has no MySQL support compiled-in, please ask your hosting provider to add it.

"; } $version = phpversion() . " (" . php_sapi_name() . ")"; $safe_mode = ini_get('safe_mode') ? 'Enabled' : 'Disabled'; $enable_dl = ini_get('enable_dl') ? 'Enabled' : 'Disabled'; $extension_dir = ini_get('extension_dir'); $ext = array_diff(get_loaded_extensions(), array('standard', 'overload', 'pcre', 'session', 'com', 'tokenizer', 'apache')); $extensions = join(', ', $ext); if (file_exists("/usr/bin/curl")) $curl_bin = "/usr/bin/curl"; elseif (file_exists("/usr/bin/curl")) $curl_bin = "/usr/local/bin/curl"; elseif (in_array('curl', $ext)) $curl_bin = "Not found, but curl PHP extension is available"; else $curl_bin = "Not found, and curl PHP extension is not available"; $uname = php_uname(); print << PHP version $version OS $uname safe_mode $safe_mode enable_dl $enable_dl extension_dir $extension_dir PHP Extensions $extensions CURL binary $curl_bin CUT; ?>