The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Apache Development
|
Can't use Auth_MySQL_Info of mod_auth_mysql!!
Discuss Can't use Auth_MySQL_Info of mod_auth_mysql!! in the Apache Development forum on Dev Shed. Can't use Auth_MySQL_Info of mod_auth_mysql!! Apache Development forum discussing HTTP Server general topics, configuration, and modules. Apache is an open source web server that runs on multiple platforms.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 21st, 2000, 04:18 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Canada
Posts: 16
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
|

August 21st, 2000, 04:40 AM
|
|
Guest
|
|
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"
|

August 21st, 2000, 05:19 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Canada
Posts: 16
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!
|

August 21st, 2000, 05:25 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Canada
Posts: 16
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
|

August 21st, 2000, 06:36 AM
|
|
Guest
|
|
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).]
|

August 22nd, 2000, 02:52 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Canada
Posts: 16
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?
|

August 22nd, 2000, 03:08 AM
|
|
Guest
|
|
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".
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|