Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Getting HTTP Authorization to work with PHP CGI mode
TECK
Join Date: Dec 2001
Posts: 4,182

Canada
by TECK TECK is offline 08 Oct 2006

This tutorial is vBulletin.org and cPublisher.com copywrited. All rights reserved.
Please ask permission in this thread to copy the tutorial. If granted, post a link that points to this page.


As you all know, using PHP-CGI is more secure then the ole Apache module flavour.
However, with PHP-CGI you cannot use anymore real user authentification, based on a .htaccess/.htpasswd file.

The fix is really easy (and secure), all you need is to have Apache mod_rewrite enabled.

Create a .htaccess file, with the content:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Make sure the line above is the last one in your .htaccess file, if you already have one in place.
Then, in your PHP file, use:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I needed this for the apc.php file, running on my server PHP 5.1.6 with FastCGI mode enabled.
For those who want to fix the apc.php file, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by TECK : 08 Oct 2006 at 04:06. Reason: Automerged Doublepost
Views: 2139
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 05:21.

Layout Options | Width: Wide Color: