Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 9th, 2001, 08:44 PM
acorn acorn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 acorn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question auth_db_mod

Basically I want to set up a password protected directory using .htaccess. I
am expecting maybe 1000 logins per day so rather than use a flatfile
.htpasswd file I decided to use a DBM file. I can use flatfile no worries.
Enter auth_dbm_mod and auth_db_mod. I have both these on the server as well
as AnyDBM_File, DB_File, SDBM_File and GDBM_File (no NDBM_File). I have
tries all combinations of auth_dbm_mod with AnyDBM_File, SDBM_File and
GDBM_File and auth_db_mod with DB_File just like in the Apache Docs.
.htaccess can't find the password.

.htaccess is
--------------------
AuthDBUserFile /home/correctpath/cgi-bin/data/htpass
AuthName "Members Test Area"
AuthType Basic
Require user agony
-----------------or
AuthDBMUserFile /home/correctpath/cgi-bin/data/htpass
AuthName "Members Test Area"
AuthType Basic
Require user agony
----------------
The relevent PERL code creating the DB file is
+++++++++++
use DB_File; or
use GDBM_File; or
use AnyDBM_File; or
use SDBM_File; and to add the username password

$cryptpass = crypt($pass, as);
dbmopen(%newentry,"$datapath/htpass",0666);
$newentry{$username} = $cryptpass;
dbmclose(%newentry);
+++++++++++

I can't see what I'm doing wrong. Any ideas?

Michael

Reply With Quote
  #2  
Old June 10th, 2001, 06:48 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Is your cgi-bin ScriptAlias'ed? If so, move your /data/htpass elsewhere. Configuring Apache to use both mod_auth_dbm and mod_auth_db are known to cause problem. That is why most precompiled binary of Apache always add --disable-module=auth_dbm and --enable-module=auth_db explicitly.

Reply With Quote
  #3  
Old June 13th, 2001, 11:14 PM
acorn acorn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 acorn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs down

Well I got rid of auth_dbm_mod and placed my db file into a http directory chmod 777 (just to be safe). Still no luck, unfortunately I don't have access to error logs so I'm really doing this blind. I don't think the problem was the db file in the cgi-bin as the flat file database works fine in the cgi-bin. I'll have access to a server with error logs next week so I'll try and figure out the problem on that. Untill then flatfile db will have to do.

Thanks FreeBSD for taking the time to give me a few pointers much appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > auth_db_mod


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway