*shudders...*
I wasn't aware mysql maniuplation in perl was so.... painful..
Anyway, it looks to me as if you simply need to chmod /var/lib/mysql/mysql.sock to 755 or 777.... as it would only make sense for it to be permissions in this case. The other alternative is that you might not have mysql/dbi set up for this other user. I mean, I'm not a king of li/unix but I am aware that some software has to be configured/installed for every user. Whether I'm right or wrong, it's a permissions/configuration issue on SOME file.
As far as the broader topic of this goes, I've made two programs YaBBSE-aware, (one I wrote in PHP, the other is
'aspGumChat' in ASP) and I think the easiest way to do authentication would be to bail (return, exit, whatever) if they aren't regged. At least to me, it seems more failsafe, as you can't accidently let them in later.
Also, I think it's worth saying that...
if ($user != "") {
$user_sql = "SELECT memberName AS name, passwd, memberGroup AS group FROM yabbse_members WHERE memberName = '$user'";
$sql_result = mysql_query($user_sql,$connection) or die ("Couldn't execute user query.");
$row = mysql_fetch_array($sql_result);
if ($row["passwd"] != crypt($password, substr($password, 0, 2)))
exit("Wrong password.");
if($row['group']!="Administrator" && $row['group']!="Global Moderator")
exit("Sorry, you're not authorized to be here.");
doYourCrap();
... is a nice way to do your admin stuff, as long as you are certain no one can hack into your mysql/install.php.
-[Unknown]