-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xlisModule Uses wrong configuration key/value pairs when adding handler config #305
Comments
Pull request for this is reviewed and approved. |
@Devvox93 I can't you find a PR from you, either open or closed. You never sent in a PR? 🙂 |
@Devvox93 awesome! I will help you getting it reviewed and merged. |
…ommunity#305). * Updated **xIISModule** to parse verbs correctly (issue dsccommunity#323).
- Add handler to specified site (dsccommunity#305). - Parse verbs correctly (dsccommunity#323).
Thanks for taking this up @scottmckenzie. I've been crazy busy and it totally slipped my mind :/ |
Yes, @scottmckenzie is doing a great job! No worries @Devvox93, no need to apologize. We all are very busy 🙂 |
I'm using Windows Server 2012 R2 64Bit.
I noticed that after the first successful run of the resource I was getting this error:
[[xIisModule]PHPModuleMapping] Adding fastCgi.
Filename:
Error: Cannot add duplicate collection entry of type 'application' with combined key attributes 'fullPath, arguments'
respectively set to 'C:\PHP\php-cgi.exe, '
+ CategoryInfo : NotSpecified: (:) [], CimException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.AddConfigu
rationCommand
+ PSComputerName : localhost
The cause of that error is that the handler mapping gets incorrectly added as a managed handler, instead of a module mapping due to a missing Module key/value pair. Renaming the 'Module' key to 'Modules' fixed the issue.
Current Hashtable used by Add-webconfiguration /system.webServer/handlers iis:\ for adding handler:
@{ Name = $Name Path = $RequestPath Verb = $Verb -join ',' Module = $ModuleType ScriptProcessor = $Path }
Producing this xml in applicationHost.config
<add name="PHP-FastCGI" path="*.php" verb="*" scriptProcessor="C:\PHP\php-cgi.exe" />
It should be:
@{ Name = $Name Path = $RequestPath Verb = $Verb -join ',' Modules = $ModuleType ScriptProcessor = $Path ResourceType = 'File' }
Resulting in
<add name="PHP-FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" resourceType="File" />
Happy to submit a PR.
The text was updated successfully, but these errors were encountered: