« Previous Next »

Thread: WebDav and Expression Web - Cannot save php files (405)

Last post 05-17-2009 6:52 PM by kgolding. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 10-28-2008, 5:05 AM

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    WebDav and Expression Web - Cannot save php files (405)

    Hello everyone,

    I'm having a hard time getting Webdav to work as it should. The problem is very simply that it will not let me save php files.

    Now... I have of course read all of the guides about configuring this, and I have of course carried out the various recommendations such as applyToWebDAV="false" for fileextensions and verbs in requestfiltering in applicationhost.config. I've also tried specifically adding add fileExtension=".php" allowed="true".

    I've done all the right bits here:
    http://learn.iis.net/page.aspx/350/installing-and-configuring-webdav-on-iis-70/
    And here:
    http://learn.iis.net/page.aspx/354/how-to-configure-webdav-with-request-filtering/

    I've tried endless variations but cannot get it to save a php file. The resulting error is 405 method not allowed - which would indicate the request filtering issue, but nope - nada.

    I'm pretty sure my settings are generally correct because I can edit and save other files and even ones such as web.config which would have normally also been blocked.

    This is what I've got installed on the new machine:

    • Server 2008 Web Edition (x64)
    • SQL Server 2008 Web
    • Microsoft WebDAV Extension for IIS 7.0 (x64)
    • Update for WebDAV Extension for IIS 7.0 (x64)
    • Remote authoring using Expression Web 2
    • Also installed:
      • FTP 7.0
      • FrontPage 2002 Server Extensions for IIS 7.0
        (these are present but not installed on any of the websites)
      • mysql-5.1.28-rc-winx64
      • mysql-gui-tools-5.0-r12-win32
      • php-5.2.6-nts-Win32 via Fast-CGI

     Everything is working well apart from this particular problem.

    Any advice is very much appreciated

    Regards,
    Rob

     

  • 10-28-2008, 11:27 AM In reply to

    • eokim
    • Top 500 Contributor
    • Joined on 02-22-2008, 7:31 PM
    • Posts 24

    Re: WebDav and Expression Web - Cannot save php files (405)

    You don't have to set <requestFiltering /> for uploading a specific file extension, such as php. Please, restore the setting.

    One possiblity I can think of is that <handler> mapping for .php. 

    Please, go to <handlers> section where you put php handler, and change verb attribute to "GET,POST,HEAD". Your verb probably set "*".

    ex)

    <handlers>
     <add name="PHP via FastCGI" path="*.php" verb="GET, HEAD, POST" modules="FastCgiModule" scriptProcessor="D:\php\php-cgi.exe" resourceType="Unspecified" />
    </handlers>

     

     

  • 10-28-2008, 6:30 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: WebDav and Expression Web - Cannot save php files (405)

    Thanks for the reply eokim,

    I've reverted the request filters to the defaults and have only got the applyToWebDAV="false" bits remaining.

    The PHP handler was set to "*" as you had suggested it might, so I changed it via the handlers interface to GET,HEAD,POST.

     Then I examined the config and copied the line to paste in here:

    <add name="PHP - FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" resourceType="Unspecified" requireAccess="Script" />

    That was looking very promising, but after signing in with expression Web and attempting to create or edit a php file, the same error happens: 

    405 - HTTP verb used to access this page is not allowed.
            Server Error   405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.    

    Is there anything else that comes to mind that might be interfering?

    I notice that the PHP FastCGI handler is at the top of the handlers list, and WebDAV is near the bottom. Would it possibly help to move WebDAV above FastCGI?

    Regards,
    Rob

  • 10-28-2008, 7:37 PM In reply to

    • eokim
    • Top 500 Contributor
    • Joined on 02-22-2008, 7:31 PM
    • Posts 24

    Re: WebDav and Expression Web - Cannot save php files (405)

    It sounds like your setting is correct. Can you upload other files except .php?

  • 10-28-2008, 7:59 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: WebDav and Expression Web - Cannot save php files (405)

    Yes, but I'll try a few more odd types right now. 

    .kmz .dat .docx .js .csv .mdb

    yes, everything else seems to upload fine.

    There must be a clue in there somewhere, but it has be stumped.

    Regards
    Rob

  • 10-28-2008, 8:08 PM In reply to

    • eokim
    • Top 500 Contributor
    • Joined on 02-22-2008, 7:31 PM
    • Posts 24

    Re: WebDav and Expression Web - Cannot save php files (405)

    Rob: Hi, I have sent you email asking config file. Would you please send me? then, I will take a look. Thanks.

  • 10-28-2008, 8:29 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: WebDav and Expression Web - Cannot save php files (405)

    Hi eokim,

    I'm just checking the email account I've used here and it's not receiving emails (that explains why I wasn't getting any notifications from the forum here either).

    I'll send you a message via the contact function with my primary email address in it now, and then I'll go and find out what has happened with the other email account.

    Thanks heaps

    Rob

  • 10-28-2008, 9:19 PM In reply to

    • robax
    • Top 500 Contributor
    • Joined on 10-28-2008, 8:37 AM
    • Posts 17

    Re: WebDav and Expression Web - Cannot save php files (405)

    This is now sorted out thanks to eokim's request to send through any local web.configs. I had a look inside the local web.config for the default web site and sure enough, there was a duplicate of the original PHP FastCGI handler sitting there with a wildcard set for the verbs.

    Once that was cleared out, the inherited one (with the changes detailed earlier in this thread) took over, and php files can now be written at will.

    Thanks for getting me on track with this!

    Rob

  • 05-17-2009, 6:52 PM In reply to

    • kgolding
    • Not Ranked
    • Joined on 08-24-2006, 5:45 PM
    • Posts 3

    Re: WebDav and Expression Web - Cannot save php files (405)

     Thanks for that, I would have spent a lot of time trying to resolve this issue. Adding the verb="GET,HEAD,POST" corrected this issue. however, it seems like the verb mapping has some issues:

    1. "*" should work, as that is what IIS 7 will put in there if you select the "All verbs" radio option in the verbs tab of the Request Restrictions dialogue, so it seems to me the WebDav stack should also understand this setting.

    2. if you set the verb value to something like: verb="GET, HEAD, POST", eg, note the spaces, this also should not cause any issues for the WebDav tool, however, it does.

     Anyway, thanks again for the note, I might have spent a lot of time trying to figure this one out, given that the php mapping was explicitly set to allow "All verbs".

Page 1 of 1 (9 items)
Microsoft Communities