PHP FastCGI apparently don't support HTTP Basic Authentication - at least not in a straight forward way.

The problem is that user credentials are not supplied in PHP_AUTH_USER and PHP_AUTH_PW.

The "standard" way of solving this is to patch your .htaccess to supply the Authorization header in an environment variable instead.

Comments

arnested’s picture

Status: Active » Needs review
StatusFileSize
new462 bytes
new2.02 KB

Patch attached.

wulff’s picture

jherencia’s picture

Status: Needs review » Needs work

Well, I do not see how this patch could fix Drupal's .htaccess, so if you agree, we need to add a README.txt that explains this problem and how to fix it.

arnested’s picture

Well, the patch can't fix Drupals .htaccess - and it shouldn't do that either.

Users of the module that run into the FastCGI / Basic Auth problem can use the patch to patch their own .htaccess.

But you have a very good point. There should be a README explaining the quirks around FastCGI / Basic Auth and how to work around the quirks.

I'll create a README but I will probably take some time before I get to it.

wulff’s picture

Status: Needs work » Needs review
StatusFileSize
new2.32 KB

I have added a basic README file to the patch from #1.

arnested’s picture

Thank you, wulff.

The README is just like I imagined it should be!

jherencia’s picture

Status: Needs review » Fixed

Exactly what I was thinking :).

Thank you very much for both of you, committed: http://drupalcode.org/project/services_basic_auth.git/commit/0a9793e

jherencia’s picture

Do you think I should create 7.x-1.1?

arnested’s picture

The patch for .htaccess will not have any effect unless you also commit the change to the .inc file.

But then I think you should do a release - because that could clean up the project wulff and I am currently working on :-)

jherencia’s picture

Ooppps, the git command Dreeditor gave me didn't have the -a flag. Now it's ok.

arnested’s picture

Beautiful. Thanks you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.