function scan_inis_for_loader() { $ldloc = ''; $sysinfo = get_sysinfo(); if (empty($sysinfo['PHP_INI'])) { $ini_files_not_found = array("Main ini file"); $ini_file_list = get_additional_ini_files(); } else { $ini_files_not_found = array(); $ini_file_list = array_merge(array($sysinfo['PHP_INI']), get_additional_ini_files()); } $server_type = find_server_type(); $shared_server = SERVER_SHARED == $server_type; foreach ($ini_file_list as $f) { $ldloc = get_loader_location_from_ini($f); if (array_key_exists(ERROR_INI_ZE_LINE_NOT_FOUND, $ldloc['errors'])) { unset($ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND]); } if ($shared_server && array_key_exists(ERROR_INI_NOT_FOUND, $ldloc['errors'])) { if (false == user_ini_space_path($f)) { $ldloc['errors'][ERROR_INI_NOT_FOUND] = "A system ini file cannot be found or read by the Wizard - you cannot do anything about this on your shared server."; } else { $ldloc['errors'][ERROR_INI_USER_INI_NOT_FOUND] = $ldloc['errors'][ERROR_INI_NOT_FOUND]; } } elseif (array_key_exists(ERROR_INI_NOT_FOUND, $ldloc['errors'])) { $ini_files_not_found[] = $f; } if (!empty($ldloc['location'])) { break; } } if (!empty($ini_files_not_found)) { $plural = count($ini_files_not_found) > 1 ? "s" : ""; $ldloc['errors'][ERROR_INI_NOT_FOUND] = "The following ini file{$plural} could not be found by the Wizard: " . join(',', $ini_files_not_found); if (is_restricted_server()) { $ldloc['errors'][ERROR_INI_NOT_FOUND] .= "<br> This may be due to server restrictions in place."; } } if (empty($ldloc['location'])) { $ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND] = "The necessary zend_extension line could not be found in the configuration."; } return $ldloc; }
function scan_inis_for_loader() { $ldloc = ''; $sysinfo = get_sysinfo(); if (empty($sysinfo['PHP_INI'])) { $ini_files_not_found = array("Main ini file"); $ini_file_list = get_additional_ini_files(); } else { $ini_files_not_found = array(); $ini_file_list = array_merge(array($sysinfo['PHP_INI']), get_additional_ini_files()); } $server_type = find_server_type(); $shared_server = SERVER_SHARED == $server_type; foreach ($ini_file_list as $f) { $ldloc = get_loader_location_from_ini($f); if (array_key_exists(ERROR_INI_ZE_LINE_NOT_FOUND, $ldloc['errors'])) { unset($ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND]); } if ($shared_server && array_key_exists(ERROR_INI_NOT_FOUND, $ldloc['errors'])) { if (false == user_ini_space_path($f)) { $ldloc['errors'][ERROR_INI_NOT_FOUND] = "安装向导不能找到或读取系统的ini文件,在该共享服务器上不能继续进行安装。"; } else { $ldloc['errors'][ERROR_INI_USER_INI_NOT_FOUND] = $ldloc['errors'][ERROR_INI_NOT_FOUND]; } } elseif (array_key_exists(ERROR_INI_NOT_FOUND, $ldloc['errors'])) { $ini_files_not_found[] = $f; } if (!empty($ldloc['location'])) { break; } } if (!empty($ini_files_not_found)) { $plural = count($ini_files_not_found) > 1 ? "s" : ""; $ldloc['errors'][ERROR_INI_NOT_FOUND] = "向导没有找到以下配置文件: " . join(',', $ini_files_not_found); if (is_restricted_server()) { $ldloc['errors'][ERROR_INI_NOT_FOUND] .= "<br>可能是服务器进行了限制。"; } } if (empty($ldloc['location'])) { $ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND] = "配置文件没有找到Zend扩展。"; } return $ldloc; }