header photo

via positiva

Fear and Loathing in IIS

So, yesterday I had a lull at work and I took it upon myself to update our much-neglected internal knowledgebase (Drupal, naturally). It's an odd configuration -- PHP/MySQL running on IIS alongside a python timesheet program and an ASP application -- but it was working until a server crash a few months ago.

What I thought would be a quick job turned into eight hours of pain thanks to what I eventually realized was an obscure bug in IIS 4.0 and higher. If you're ever trying to install Drupal on IIS, save yourself the pain and do not run PHP in CGI mode. I posted a handbook entry on Drupal.org to share the pain. In a nutshell, IIS plus PHP in CGI mode means that server redirects on a web app's login page trash the session data. Converting to ISAPI mode solves it. After getting that sorted out, things seem to be humming along nicely. Hooray!

now to be fair

All the php install guides for IIS say you should run in ISAPI mode anyway. Now we know why. :)

Depends...

I've read advice that goes both ways. A number of install guides say that ISAPI mode is 'buggy' and shouldn't be used on production servers. The age of a number of the guides makes deciding what information is out of date tricky.

I'm certainly an ISAPI believer, now, though. ;)

Thanks a lot

Such obscure bugs are horrible; thank you for sharing!

Not always?

I've had this problem in the past myself, but just did a fresh install of Drupal 4.7.6 using PHP 5.01 running in CGI mode on IIS 6... and it worked
I posted a comment to the handbook thread with a few more details:
[[http://drupal.org/node/56654#comment-194801]]

.... don't know what to make of it... but it's working so far. I'll be updating the Drupal thread with any updates...

problem

I am running IIS 5 and PHP with ISAPI and I am getting the same 'redirect' problem. I've put in a brand new drupal 5.2 install and once I set up my admin user I get access denied. When I log in I come back to the home screen with an access denied error, just as you describe above. I did a phpinfo and it is running ISAPI.

Any ideas on what I coule be doing wrong.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <img> <i> <b> <strike> <h3> <h4>
  • Lines and paragraphs break automatically.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Twitter-style @usersnames are linked to their Twitter account pages.
  • Twitter-style #hashtags are linked to search.twitter.com.

More information about formatting options

Miniblog