private GetEnabledExtensionsCount ( ) : int | ||
Результат | int |
public PHPConfigInfo GetPHPConfigInfo() { PHPConfigInfo configInfo = new PHPConfigInfo(); // If PHP is not registered properly then just return information about // how it registered. if (!IsPHPRegistered()) { configInfo.RegistrationType = _registrationType; return configInfo; } configInfo.RegistrationType = _registrationType; configInfo.HandlerName = _currentPHPHandler.Name; configInfo.Executable = _currentPHPHandler.Executable; configInfo.Version = GetPHPExecutableVersion(_currentPHPHandler.Executable); if (String.IsNullOrEmpty(PHPIniFilePath)) { throw new FileNotFoundException("php.ini file does not exist"); } configInfo.PHPIniFilePath = PHPIniFilePath; PHPIniFile file = new PHPIniFile(PHPIniFilePath); file.Parse(); PHPIniSetting setting = file.GetSetting("error_log"); if (setting != null) { configInfo.ErrorLog = setting.TrimmedValue; } else { configInfo.ErrorLog = String.Empty; } configInfo.EnabledExtCount = file.GetEnabledExtensionsCount(); configInfo.InstalledExtCount = file.Extensions.Count; ICollection issues = ValidateConfiguration(file); configInfo.IsConfigOptimal = (issues.Count == 0); return configInfo; }
public PHPConfigInfo GetPHPConfigInfo() { var configInfo = new PHPConfigInfo(); // If PHP is not registered properly then just return information about // how it registered. if (!IsPHPRegistered()) { configInfo.RegistrationType = _registrationType; return configInfo; } configInfo.RegistrationType = _registrationType; configInfo.HandlerName = _currentPhpHandler.Name; configInfo.HandlerIsLocal = _currentPhpHandler.IsLocallyStored; configInfo.Executable = _currentPhpHandler.Executable; configInfo.Version = GetPHPExecutableVersion(_currentPhpHandler.Executable); configInfo.PHPIniFilePath = PHPIniFilePath; var file = new PHPIniFile(PHPIniFilePath); file.Parse(); var setting = file.GetSetting("error_log"); configInfo.ErrorLog = setting != null ? setting.GetTrimmedValue() : String.Empty; configInfo.EnabledExtCount = file.GetEnabledExtensionsCount(); configInfo.InstalledExtCount = file.Extensions.Count; ICollection issues = ValidateConfiguration(file); configInfo.IsConfigOptimal = (issues.Count == 0); return configInfo; }
public PHPConfigInfo GetPHPConfigInfo() { // Check if PHP is not registered if (_currentFastCgiApplication == null || _currentPHPHandler == null) { return null; } PHPConfigInfo configInfo = new PHPConfigInfo(); configInfo.HandlerName = _currentPHPHandler.Name; configInfo.ScriptProcessor = _currentPHPHandler.ScriptProcessor; configInfo.Version = GetPHPExecutableVersion(_currentPHPHandler.ScriptProcessor); string phpIniPath = GetPHPIniPath(); if (String.IsNullOrEmpty(phpIniPath)) { throw new FileNotFoundException("php.ini file does not exist"); } configInfo.PHPIniFilePath = phpIniPath; PHPIniFile file = new PHPIniFile(phpIniPath); file.Parse(); PHPIniSetting setting = file.GetSetting("error_log"); if (setting != null) { configInfo.ErrorLog = setting.Value; } else { configInfo.ErrorLog = String.Empty; } configInfo.EnabledExtCount = file.GetEnabledExtensionsCount(); configInfo.InstalledExtCount = file.Extensions.Count; return configInfo; }