add pre-login error checking (for 5dev-37)
Brought to you by:
tuxmonkey
This patch adds some debugging for new users (i.e.,
those who've heard of MySQL but never used it). It can
probably be done more cleanly but I've only done php
for a day or two so I can't do that. But, it did help
me sort out my problems! (Mysql error 1251).
pre-login checking patches
Logged In: YES
user_id=37894
This patch does two things, overall. First, it captures any
errors from mysql and shows them to the user using a new
template called fatal.tpl. Second, it adds 'probing' tests
along the way to verify that the dbase connection is viable
before returning from init(). This means it checks that
there is a database that was named and that it also contains
the "users" tables and it contains a certain field. That's
familar to unix folks - akin to checking the "magic" of the
file. Anyways, if that can be done, the user is pretty sure
to get somewhere. Informative error screens are given at
each test along the way. I tried to test them by creating
"problems" for the script :-)
I'm hoping this makes it into the release so as to encourage
other folks to try it. From reading sf.net forums, I'm not
the only one who has been baffled by a login screen that
doesn't take the specified "demo:demo" account. This patch
gives folks a prayer to track down such errors.
Cheers,
Fil