protected override void DoProcessing() { try { using (ServerManager serverManager = new ServerManager()) { ServerManagerWrapper serverManagerWrapper = new ServerManagerWrapper(serverManager, this.SiteName, this.VirtualPath); PHPConfigHelper _configHelper = new PHPConfigHelper(serverManagerWrapper); string phpCgiExePath = PrepareFullScriptProcessorPath(ScriptProcessor); _configHelper.RegisterPHPWithIIS(phpCgiExePath); } } catch (DirectoryNotFoundException ex) { ReportTerminatingError(ex, "DirectoryNotFound", ErrorCategory.ObjectNotFound); } }
public void RegisterPHPWithIIS(string phpExePath) { EnsureServerConnection(); try { PHPConfigHelper configHelper = new PHPConfigHelper(ManagementUnit); configHelper.RegisterPHPWithIIS(phpExePath); } catch (ArgumentException) { RaiseException("ErrorInvalidPHPExecutablePath"); } catch (FileNotFoundException) { RaiseException("ErrorNoPHPFilesInDirectory"); } catch (DirectoryNotFoundException) { RaiseException("ErrorNoExtDirectory"); } }