We've just installed drupal on an IIS machine in our office. It has installed successfully, however we cannot create any content or save settings in the admin menu.
It seems that the "action" attribute in the HTML FORMs are being cleared. For example, when you create a page, the form on index.php?q=node/add/page should post to (ie, the form element's action attribute) "index.php?q=node/add/page". (like it does on all the Mac and Linux servers I've setup with drupal).
What happens is that is just goes to "index.php".
I thought that there might have been some security feature of IIS that was stripping the URL parameters when a form was using the POST method, but a simple test php page on the same server proves otherwise.
Any ideas"?
Comments
more info
Hi Matt,
Can you provide some more info? What server, what version of IIS? Are you running via FastCGI or ISAPI? Are you testing/browsing via localhost, by ip, or from outside? Also, are you running URL_Rewrite or another module for clean urls? Sorry for all the questions but I think there could be a couple of culprits.
chicagomom on Twitter and d.o.
Ok.. i think I found the
Ok.. i think I found the problem - but not yet the solution...
We are using:
Drupal 6.14
IIS 7.0 (Microsoft Windows Server 2008)
PHP 5.2.8
MySQL 5.1.31
Now, I tested drupal on my mac laptop, and the environment variable $_SERVER['REQUEST_URI'] shows "index.php?q=node/add/page".
On the Windows+IIS machine that environment variable = "index.php". Hence the value that is appearing in the form's #action element.
Is this a problem in IIS? Or a compatibility issue that needs to be updated in drupal?
Found this hotfix from
Found this hotfix from Microsoft - apparently there's a bug with IIS7 (not 6) where that SERVER variable is set incorrectly:
http://support.microsoft.com/kb/954946
Waiting for the hotfix to be installed on the server to see if it fixes the problem.... failing that, it least now I can see exactly the problem, I can write a patch in drupal's "request_uri()" function to work around the problem. Ugly.
Thanks for the update
Thanks for the update on this important issue! FYI, for anyone else if you're planning to use clean urls the MS URL_Rewrite 2.0 RC includes this hotfix.
chicagomom on Twitter and d.o.