Extension talk:Auth viaMySQL

In your login scripts for your web page add something like:
is wrong and did not work for my mediawiki v1.14.0;

This one worked (table/row names are different):

where exactly should the login script go? This would be a nice clarification. Thanks,

Instructions Are Very Confusing

 * Now that it's talking about "MediaWiki Authentication via MySQL", but where to tell the MySQL database info, such as, hostname, database name, dababase username, password, and table name, etc.?
 * Why the MySQLActiveUser.php file needs to be in the directory just BEFORE the MediaWiki installation directory? I want to have the authentication for the MediaWiki, not for the entire Apache website.
 * "in your login/logout scritps" are especially confusing. What and where are the scripts? Why don't we just modify the LocalSettings.php to give some basic settings (including require_once, database info, etc.)?

Hope someone could make it simpler and clearer. It would be nice that it is working as this:
 * Download the Auth_viaMySQL extension to ./extensions directory
 * Modify LocalSettings.php
 * Users just need to click "Log in / create accout" at the up-right of the MW page to log in, and
 * click the "Log out" to log out.

this is how i solved my problem
Of course the code needs a bit of cleaning-up but it works

require_once('../MySQLActiveUser.php'); global $MySQLActiveUserData ; global $DBConnection ;

$username = $_POST['username']; $password = $_POST['password']; $username = stripslashes($username); $password = stripslashes($password); $password = md5($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $command = "SELECT * FROM  WHERE username='".$username."' AND password='".$password."';"; $result = mysql_query($command) or die(mysql_error); $account = mysql_fetch_assoc($result); if ($account) { $current_mw_timecode = gmdate( 'YmdHis' ) ; $MySQLActiveUserData->set_cookie($account['username'],                                  $account['user_id'],	                           $account['password'],	                           $account['office_email'],	                           $current_mw_timecode) ; } else { echo " login fail"; }


 * What if the main web page does NOT use authentication?
 * The MySQL database for user accounts is on another machine for another website in the LAN.

Question about how you slove your problem
I'd like to know where you would put your "fix" to make it work ?

Does this fix makes it behave like you describe earlier (using the login/logout function of mediawiki) ?