Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old August 21st, 2000, 04:18 AM
romanka romanka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Canada
Posts: 16 romanka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,when I excluded the directive Auth_MySQL_Info in .htaccess file, it said "access denied :no passwd provided", but then I included this directive, it said "Auth_MSQL_Info not allowed here" (in the error log file of conf)", please help! or are there any other directive that i can use in order to send the login info to mysql?
Thanks

Reply With Quote
  #2  
Old August 21st, 2000, 04:40 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I assumed you already created necessary info -> http://bourbon.netvision.net.il/mysql/mod_auth_mysql/ "Creating the necessary SQL information".

Show us your .htaccess file and the appropriate section of your mod_auth_mysql of your httpd.conf

Keep in mind, at http://bourbon.netvision.net.il/mysql/mod_auth_mysql/ , there is a line ->
AuthName My Company's Financial Information
the realm name, use some informative name

This is wrong. If your company is not a single word, it has to be quoted:
AuthName "My Company"

Reply With Quote
  #3  
Old August 21st, 2000, 05:19 AM
romanka romanka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Canada
Posts: 16 romanka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My .htaccess file contains:
Auth_MySQL_DB membership
Auth_MySQL_Password_Table

Auth_MuSQl_Password_Field password
AuthName "Membership"
AuthType Basic
require romanka

*note: i didn't includen Auth_MySQL_Username_Field since the username field is "username",

the appropriate section in httpd.conf:
<Directory "/usr/local/apache/htdocs/test">
Options All
AllowOverride All
</Directory>

*note: test is the directory that I want to protect.
Thanks for your help!

Reply With Quote
  #4  
Old August 21st, 2000, 05:25 AM
romanka romanka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Canada
Posts: 16 romanka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The abouve situation would result :
MySQL auth: connect failed: Access denied for user: 'username@localhost' <Using password: No>
That's from the error log file

Reply With Quote
  #5  
Old August 21st, 2000, 06:36 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
You need to read http://bourbon.netvision.net.il/mysql/mod_auth_mysql/ again. Way too many mistakes here. You also definitely need to figure out the standard htaccess/htpasswd combo before trying to db authentication. Also, you should use all the default table and db names.

##My .htaccess file contains:
make sure such .htaccess is in /usr/local/apache/htdocs/test

##Auth_MySQL_DB membership
okay. But you should use a general db to begin with to ensure apache understands "Auth_MySQL_General_DB"

##Auth_MySQL_Password_Table
I assume it's "mysql_auth", it's default.

##Auth_MuSQl_Password_Field password
Hey, ya mispelled MySQL!!
Such line should be:
Auth_MySQL_Password_Field password

##AuthName "Membership"
This should be:
AuthName Membership
As I mentioned, if it's "Membership Only", then do this:
AuthName "Membership Only"

##AuthType Basic
okay

##require romanka
This should be:
require user romanka
You should set it to "require valid-user" to begin with.

In addition, you should specify the following:
Auth_MySQL_Empty_Passwords off
Auth_MySQL_Encryption_Types Crypt_DES

To summaries things up:

AuthName Membership
AuthType Basic
require valid-user
Auth_MySQL_Password_Table
Auth_MySQL_Password_Field password
Auth_MySQL_Empty_Passwords off
Auth_MySQL_Encryption_Types Crypt_DES

As for your httpd.conf, specify this line at the bottom:

Just this:
Auth_MySQL_General_DB membership

Not this:
<IfModule mod_auth_mysql.c>
Auth_MySQL_General_DB membership
</IfModule>

For MySQL:
prompt> mysqladmin create membership
prompt> mysql membership
mysql> create table mysql_auth (
-> username char(25),
-> password char(25),
-> primary key (username)
-> );

Be warned, you need to create a "httpd" user in the first place. Read "Telling apache to protect the page using that information" from the URL.


[This message has been edited by freebsd (edited August 21, 2000).]

Reply With Quote
  #6  
Old August 22nd, 2000, 02:52 AM
romanka romanka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Canada
Posts: 16 romanka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks.....now I can use mod_auth_mysql...
but....there comes another problem....whenver i type the correct user name and passwd, it prompted "Authorization failed. Try again?", the username and passwd i typed waere exactly the same as those in the mysql....i was wondering do i have to recompile apache?

Reply With Quote
  #7  
Old August 22nd, 2000, 03:08 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>whenver i type the correct user name and passwd, it prompted "Authorization failed.

That means, IT WORKED!! At least you can now use mod_auth_mysql and it's responding. As I reminded you dozen times, don't challenge Calculus if you don't know Algebra well enough.

How do you encrypt your password??
Show me the code how you encrypt it. I believe it's what the current problem is. But I might guess wrong.

>>whenver i type the correct user name and passwd
Keep in mind,
"Auth_MySQL_Password_Field password", the default is "passwd", but you chose "password" instead, so make sure the password field name is "password", not "passwd".

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Can't use Auth_MySQL_Info of mod_auth_mysql!!

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap