diff --git a/upload/source/admincp/admincp_index.php b/upload/source/admincp/admincp_index.php index ca7d70c8340e3fa28df87ae2141e6cbb06a4484a..bf56c2b34a731d3e22cdd25c5419e67211b38ae2 100644 --- a/upload/source/admincp/admincp_index.php +++ b/upload/source/admincp/admincp_index.php @@ -232,8 +232,9 @@ if(isfounder()) { showtableheader('运行环境检测', 'fixpadding'); $env_ok = true; +$now_ver_gd = function_exists('gd_info')? gd_info() : false; $now_ver = array('PHP' => constant('PHP_VERSION'), 'MySQL' => helper_dbtool::dbversion(), 'gethostbyname' => function_exists('gethostbyname'), 'file_get_contents' => function_exists('file_get_contents'), 'xml_parser_create' => function_exists('xml_parser_create'), -'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => (function_exists('gd_info') ? preg_replace('/[^0-9.]+/', '', gd_info()['GD Version']) : false)); +'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => ($now_ver_gd ? preg_replace('/[^0-9.]+/', '', $now_ver_gd['GD Version']) : false)); $req_ver = array('PHP' => '5.3', 'MySQL' => '5.0', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '1.0'); $sug_ver = array('PHP' => '7.1', 'MySQL' => '5.7', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '2.0'); foreach ($now_ver as $key => $value) { diff --git a/upload/uc_server/control/admin/frame.php b/upload/uc_server/control/admin/frame.php index 140a3bbccfff9d93b3e552164f97d974e8527a30..f7134205a1ed7e5c0a72798d84d1e247acaa6b00 100644 --- a/upload/uc_server/control/admin/frame.php +++ b/upload/uc_server/control/admin/frame.php @@ -195,8 +195,9 @@ class control extends adminbase { function _get_uc_envstatus() { $version = constant('UC_SERVER_VERSION'); + $now_ver_gd = function_exists('gd_info')? gd_info() : false; $now_ver = array('PHP' => constant('PHP_VERSION'), 'MySQL' => $this->db->result_first("SELECT VERSION()"), 'gethostbyname' => function_exists('gethostbyname'), 'file_get_contents' => function_exists('file_get_contents'), 'xml_parser_create' => function_exists('xml_parser_create'), - 'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => (function_exists('gd_info') ? preg_replace('/[^0-9.]+/', '', gd_info()['GD Version']) : false)); + 'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => ($now_ver_gd ? preg_replace('/[^0-9.]+/', '', $now_ver_gd['GD Version']) : false)); $req_ver = array('PHP' => '5.3', 'MySQL' => '5.0', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '1.0'); $sug_ver = array('PHP' => '7.1', 'MySQL' => '5.7', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '2.0'); foreach ($now_ver as $key => $value) {