August 21st, 2000, 05:18 AM
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?
August 21st, 2000, 05:40 AM
August 21st, 2000, 06:19 AM
My .htaccess file contains:
*note: i didn't includen Auth_MySQL_Username_Field since the username field is "username",
the appropriate section in httpd.conf:
*note: test is the directory that I want to protect.
Thanks for your help!
August 21st, 2000, 06:25 AM
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, 07:36 AM
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
okay. But you should use a general db to begin with to ensure apache understands "Auth_MySQL_General_DB"
I assume it's "mysql_auth", it's default.
Hey, ya mispelled MySQL!!
Such line should be:
This should be:
As I mentioned, if it's "Membership Only", then do this:
AuthName "Membership Only"
This should be:
require user romanka
You should set it to "require valid-user" to begin with.
In addition, you should specify the following:
To summaries things up:
As for your httpd.conf, specify this line at the bottom:
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, 03:52 AM
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, 04:08 AM
>>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".