Web Hosting Talk







View Full Version : htaccess to mysql problems


andyk
07-05-2007, 07:38 AM
hey webhostingtalk.

i love the idea of a htaccess file connecting to another mysql database (still on the same server) on a different domain. though i am having a few problems.

here is my current script:


AuthType Basic
AuthName "Members Only"

Auth_MYSQLhost [mydomain]
Auth_MYSQLusername [myusername]
Auth_MYSQLpassword [mypassword]
Auth_MYSQLdatabase vb
Auth_MYSQLpwd_table user
Auth_MYSQLuid_field username
Auth_MYSQLpwd_field password
Auth_MYSQL_EncryptedPasswords on
require valid-user


firstly, i am using the latest cpanel and i have known from previous experience you need to add the username then the database ( format: username_database ), does this still apply in this situation?

of course when I upload this file I get a 500 Internal Server Error, so I am doing something wrong. I am simply connecting to a vbulletin forum that uses mysql and I am wanting to use those usernames and passwords for this operation.

could someone give me a tip what i may be doing wrong and if the formatting for username and the database remains the same?

thank you!
andyk

juangake
07-05-2007, 08:11 AM
Hello,

Try this:
http://www.widexl.com/scripts/documentation/htaccess.html#auth_mysql

And make sure that you got mod_auth_mysql module *enabled* in Apache.

andyk
07-05-2007, 08:42 AM
Ahh thanks juan, thats the tut I used. Alrighty, I will check.

Ta