Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 22nd April 2011, 12:45
NdK NdK is offline
Join Date: Jul 2009
Location: Bologna, ITA
Posts: 41
Thanks: 1
Thanked 3 Times in 1 Post
Default HTTP Basic auth and FastCGI

Hello all.

I've been bitten twice by this, so I thought to share the solution.
The problem is that, if you use fastcgi(+suexec) your php scripts won't see $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] and scripts that rely on it (obviously) won't work and keep asking credentials.

Just add this rewrite rule in your .htaccess :
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
and all works again.

(credits to the post by Dmitry in http://bugs.php.net/bug.php?id=35752 ).
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:04.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.