Enabling HTTP PUT and DELETE Requests for PHP Applications on Microsoft IIS

If you are using a Microsoft IIS server, it is possible that, by default, it does not accept HTTP PUT and DELETE requests. In this case, you need to explicitly allow these methods by specifying them in the verb parameter within your web.config file.

Example web.config Entries

<add name="php-5.6.30_1" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP_versioner\5.6N\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="php-5.6.30" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP\5.6.30-nts\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="php-7.1.2" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP\7.1.2-nts\php-cgi.exe" resourceType="Either" requireAccess="Script" />

Make sure to adjust the scriptProcessor path according to your specific PHP installation directory.

If the verb parameter does not include PUT and DELETE, requests using these methods will be blocked by IIS and your PHP application will not receive them.

×