latheesan
10-03-2007, 12:05 AM
Hello,
I used ionCube online encoder to encode my project files. It seems, the script is not functionning propely after encoding it.
I have a login form which checks; if entered username/pass is correct (matching it against db records), if so set session variables like this:
$_SESSION[session_id()."_user"] = $_POST["user"];
$_SESSION[session_id()."_pass"] = $_POST["pass"];
Note, the above session variables only get set if it was a successfull login. Then later in my php file, where user have to be logged in, i did a check like this:
$query = sprintf("SELECT * FROM `login_table` WHERE `user` = '%s' AND `pass` = '%s' LIMIT 1",
mysql_real_escape_string($_SESSION[session_id()."_user"]),
mysql_real_escape_string(md5($_SESSION[session_id()."_pass"])));
$results = mysql_query($query);
if(mysql_num_rows($results) == 0) {
// login error here
} else {
// show the contents of the protected page
}
You see, the above setup worked fine on the locahost (my laptop with XAMPP suite installed) when i was developing the script. After encoding the script, i uploaded it to my linux server and i logged into the script and clicked on the admin page for example, it gave me the login error, which is wrong.
Why is the script acting up like this? Did the script screw up somehow because i encoded it with ionCube? Please help...
I used ionCube online encoder to encode my project files. It seems, the script is not functionning propely after encoding it.
I have a login form which checks; if entered username/pass is correct (matching it against db records), if so set session variables like this:
$_SESSION[session_id()."_user"] = $_POST["user"];
$_SESSION[session_id()."_pass"] = $_POST["pass"];
Note, the above session variables only get set if it was a successfull login. Then later in my php file, where user have to be logged in, i did a check like this:
$query = sprintf("SELECT * FROM `login_table` WHERE `user` = '%s' AND `pass` = '%s' LIMIT 1",
mysql_real_escape_string($_SESSION[session_id()."_user"]),
mysql_real_escape_string(md5($_SESSION[session_id()."_pass"])));
$results = mysql_query($query);
if(mysql_num_rows($results) == 0) {
// login error here
} else {
// show the contents of the protected page
}
You see, the above setup worked fine on the locahost (my laptop with XAMPP suite installed) when i was developing the script. After encoding the script, i uploaded it to my linux server and i logged into the script and clicked on the admin page for example, it gave me the login error, which is wrong.
Why is the script acting up like this? Did the script screw up somehow because i encoded it with ionCube? Please help...
