Because the validator is broken, it should check if the input is completely valid (such as an email, or a username).
You can simply delete the regular expression if you want to get it working.
wow i have no idea how to use this please help meh! im not nerd enough!!!!
Thanks a lot Dombo! Seemed like that would be the issue, but I had no idea how to fix it.
EDIT: Unfortunately, I have no clue what/where that expression is. >.< I tried commenting out
In register.php, which removed the error, but the query is still not executed...Code:else if(!preg_match('/^[A-Za-z0-9]$/',$_POST['username'], $matches)) $error = setError("attention","Invalid username");
Last edited by riizu; 07-23-2010 at 01:21 AM.
Modify this linetoCode:if(!preg_match('/^[A-Za-z0-9]$/',$_POST['username'], $matches))Code:if(preg_match('/^[A-Za-z0-9]$/',$_POST['username'], $matches))
good job +rep but when i create account its not created in DB and i cant login with this username-password so strange but it says Bad username/password combination! please help....
Thanks Zedzoli, but still doesn't seem to be any entry being created in the database which is strange, considering the config.php file is pointing to the correct database.
I havent got idea, for me working fine the registration, and i can login with fresh registred accounts, but i have other problem, i already have tons of accounts on my server but only the fresh registred members can login to web the old members not.
yes its problem u cant log in ur website with old account so only members who register here can log on website....
---------- Post added at 02:54 PM ---------- Previous post was at 02:37 PM ----------
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\includes\func_lib.php on line 101
I think becouse this i cant login zedzoli u dont have this warning?
Lots and Lots of php errors on my end. Ill show you what some are.
Code:Notice: Undefined index: do in C:\wamp\www\includes\news.php on line 13 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\includes\news.php on line 119 Notice: Undefined index: do in C:\wamp\www\includes\news.php on line 30 Notice: Undefined index: do in C:\wamp\www\includes\news.php on line 35 Notice: Constant SERVER_NAME already defined in C:\wamp\www\includes\config.php on line 4 Notice: Constant REALMNAME already defined in C:\wamp\www\includes\config.php on line 7 Notice: Constant REALMPORT already defined in C:\wamp\www\includes\config.php on line 8 Notice: Constant MAX_NEWSITEMS already defined in C:\wamp\www\includes\config.php on line 9 Notice: Constant LEVELCAP already defined in C:\wamp\www\includes\config.php on line 12 Notice: Constant REALM1 already defined in C:\wamp\www\includes\config.php on line 14 Notice: Constant SQLHOST already defined in C:\wamp\www\includes\config.php on line 17 Notice: Constant SQLUSER already defined in C:\wamp\www\includes\config.php on line 18 Notice: Constant SQLPASS already defined in C:\wamp\www\includes\config.php on line 19 Notice: Constant SQLPORT already defined in C:\wamp\www\includes\config.php on line 20 Notice: Constant LOGONDB already defined in C:\wamp\www\includes\config.php on line 23 Notice: Constant CHARDB already defined in C:\wamp\www\includes\config.php on line 24 Notice: Constant VOTEDB already defined in C:\wamp\www\includes\config.php on line 25
Or if you enoug skillfull Install the apache & php, and configurate by your hands
and guys i found the problem with login part and i have fixes for this.
We need edit 2 place, in the class_lib.php and func_lib.php
So open first the class_lib.php and go to LINE 89 and change this:
TOCode:$password = cleanuserinput(sha1($password));go to LINE 91 and change this:Code:$password = cleanuserinput($password);
TOCode:$result = mysql_query("SELECT acct FROM accounts WHERE login='".$login."' and encrypted_password='".$password."'");Okay save this, and open the func_lib.php and go to LINE 98 and change this:Code:$result = mysql_query("SELECT acct FROM accounts WHERE login='".$login."' and password='".$password."'");
TOCode:$password = cleanuserinput(sha1($password));and go to LINE 100 and change this:Code:$password = cleanuserinput($password);
TOCode:$result = mysql_query("SELECT * FROM accounts WHERE login='".$login."' and encrypted_password='".$password."'");Save...Code:$result = mysql_query("SELECT * FROM accounts WHERE login='".$login."' and password='".$password."'");
Patch File:Attachment 3744
And now you can login with your old/fresh maked accounts. Works me perfect, on Apache 2.2.16 with PHP 5.3.3 and IIS7 with PHP 5.2.14 too.
Last edited by zedzoli; 07-29-2010 at 09:21 AM.
looks great! +Rep (your 500th xD)
i have question about lines how i can find that line where is Error on line 101 any1 know?