Jump to content
xisto Community

joe.k

Members
  • Content Count

    67
  • Joined

  • Last visited

About joe.k

  • Rank
    Member [Level 1]

Profile Information

  • Gender
    Male
  • Location
    Jordan
  1. wow ... i didnt see it that way ... but now "my code" looks kinda 'silly' ,thatnks for clearing that. well ... the code i posted was updated ... after i remover the original session code and start trying some tests on it ... to see if it work. i added dbcode after 3 hours of trying . i faced it the couple first entires and made the id >>ip unique in mysql_db , i ever thought about ip though. hmmm .... iam completely out of words ..sry well i know the MD5 seems useless and i know it is ... anyway you cant learn without making mistakes. ;)but i was kinda hopeless about how to make the dbsession end. hmm ... well now i guess i dont really get what really session 'thing' is and how powerful it is...but i guess dbsession thing would still be 'more secure' ... ?? i would try this out sometime later... thanks again . Joe.k
  2. i have "tried" to switch to suse Linux a couple 2days ago for the first time ever i do switch from microssoft ... it's bad ... way too badi have a dell dimension 4100 with 730Mhz CPU , 128 RAM.i downloaded it by the book and reached the final "page" ...(congratulation ... install done .. brr) it ejected the cd and pressd finished the os start to load but in the middle of the prosess the screen went black i thought it was ....what so ever it was doing ...but i waited for 35mins and nothing.what wrong have i done ??/ or might i have downloaded the wrong CD (i mean X86-32bit or X86-64bit .. i downloaded X86-32) ???thanks in advance for any help .
  3. users.php >>> userlogin script page ps: i edited yesterday and added ,a dbsession idid the script ... abit newbie <?php session_start(); ?><?php defined ('my_access_code')or die('<a class="warn">Direct access denied</a>'); ?><?php $_session['id']='test';// if anything is updated make sure the ck files and user files is updated as well $w=date('W'); $d=date('d'); $m=date('m'); $y=date('Y'); $h=date('H'); $tim=$w.$y.$m.$d.$h; $timd=md5($tim); $ip=$_SERVER['REMOTE_ADDR']; if ($_POST['username'] == '' || $_POST['password'] == '') { $error ='Username or password is wrong'; } $username=$_POST['username']; $password=$_POST['password']; $con = mysql_connect('localhost','root','password); if (!$con) { print ('datebase connection failure'); } mysql_select_db('cs',$con); //check input username and password against the database $query = mysql_query('SELECT ID, Username FROM users WHERE Username ="'.mysql_real_escape_string($_POST['username']).'" AND Password = "'.mysql_real_escape_string($_POST['password']).'"'); if(mysql_num_rows($query) == 1) { //if sucsess do this $ac='login successful'; $userN=$username; mysql_select_db('cs',$con); $query= "SELECT id,session_details,time_stamp,time FROM session WHERE id = '$ip' "; $result= mysql_query($query); $row = mysql_fetch_row($result); $id = $ip; $session_details = $row[1]; $time_stamp = $row[2]; $time=$row[3]; // this code for db_session check for exsistance // code for action if session exsist or not if ($session_details =='' || $time_stamp == '') { //code if session does NOT sesist mysql_select_db('cs',$con); mysql_query("INSERT INTO session (id, session_details, time_stamp, time)VALUES ('$ip', '$userN', '$timd', '$tim')"); //code again for storing session $query= "SELECT id,session_details,time_stamp,time FROM session WHERE id = '$ip' "; $result= mysql_query($query); $row = mysql_fetch_row($result); $id = $ip; $session_details = $row[1]; $time_stamp = $row[2]; $time=$row[3]; $session=$time-$tim; } else { // if session exsist if ( ($session) > '5') { mysql_select_db('cs',$con); mysql_query(" Update session SET time_stamp = '$timd' where id = '$ip' "); } else { //do nothing use session items and time } } header ("location: /"); } else { //add login failure rediert page >> file/ $error = 'Login failed !'; } if (isset($error)) { $userN='Guest'; $ac= 'access denied. <a href="http://localhost/welcome.php">login</a>'; } else { } mysql_close($con);?> ck.php >> check session_db >> but still need borwser session <?php defined ('my_access_code')or die('<a class="warn">Direct access denied</a>'); ?><?php $w=date('W'); $d=date('d'); $m=date('m'); $y=date('Y'); $h=date('H'); $tim=$w.$y.$m.$d.$h; $timd=md5($tim); $ip=$_SERVER['REMOTE_ADDR']; $con = mysql_connect('localhost','root','password'); if (!$con) { print ('datebase connection failure'); } mysql_select_db('cs',$con); $query= "SELECT id,session_details,time_stamp,time FROM session WHERE id = '$ip' "; $result= mysql_query($query); $row = mysql_fetch_row($result); $id = $ip; $session_details = $row[1]; $time_stamp = $row[2]; $time=$row[3]; $session=$time-$tim; // this code for db_session check for exsistance // code for action if session exsist or not if ($session_details =='' || $time_stamp == '') { //code if session does NOT sesist header ("location: /welcome.php"); } else { // if session exsist if ($session > '5') { header ("location: /welcome.php"); } else { //do nothing use session items and time } } mysql_close($con);?> this is what i came out with after 5 hours of trying to make session work ... i even tried the samples at http://www.w3schools.com/ but it didnt work although i think it does still a weak code , what do you think .. ??
  4. thanks for replying . i tried out what you posted 'make session in database' but even i put session at the begging of every page 'line 1' , i found out the my seesion id is always 15 in login page , but when redirect to homepage ... the session disappear (the seesion file too .? 'in tmp') the home page contain session_start() at the first line but it doesn't start a new session as it was suppose to ..... iam confused ...
  5. i have downloaded easyphp on my PC and i am a bit noob with php mysql commands.i have a problem making session work the problem that the session file in my server get deleted after leaving the page where the session was start for the first time.the problem that the session can only be used within the creation page unless you leave it.why?? i have no idea ... i have been looking around for three days now ..thank in advance for any help. if you need more details let me know .Joe.k
  6. AVG ... i heared about it , but is it realy good ,i mean for enterprise Co.you had that virus ?? ... and it didnt Write your reg (registry) .... becaus my antivirus deleted the trojan but it had written the registry and aday later it got a complete control over my pc leading me to format all my drivers .now iam looking for blocking reg writing.so i think iam gona give it a try .Joe
  7. I have been infected with atrojan but i can detect it. and i have detected Hoon trojan and deleted it ,but the symptoms of the trojan is still on my pcs network " all driver have an autoplay (right click by mouse) and it gives my this message by d-click on any driver ************** SYS.EXE the virus was detected and deleted from all drivers: C:\sys.exe D:\sys.exe E:\sys.exe F:\sys.exe G:\sys.exe ???????? iam using Mcafee Virusscan enterprose and is up-to-dated. if any1 have any idea , please post thanks in avance. Joe
  8. @yordani totally agree with you... that what i thought a week agoand sent it for technical check for all hardware parts and after all the problem was My cooling system(fans and supply power)was extremely damaged so i replaces them among 1 hard-disk which was ok before i sent it ,???. ;)but after all it just keep on bugging meHelp me!!!! [edit]but althought i do suspect My CPU because when i run Vista it seems to be buys all the time CPU 15%-100% even though iam only on IE (internet exploer without the sidebar)
  9. ok ... ok @ .:Brian:. i dont think the problems is the installation because i have formated my Pc and reinstalled windows 3times... till now @wutske I am not using Norton iam using Mcafee Enterprise 8(that's the only 1 i trust ... till now)And yes i have made a full scan for my system 3 times but nothin' and For i dont know how to do that coz i never tired that before . but here's the facts: first i had Xp and had no problem ,it was working just fine and after a while i downloaded Vista Business then the troubles became which was a big annoy for me and ended up Formatting My Pc. and downloading Vista Ultimate (1 windows) but the problem was the same so finally i ended up with win Xp and Vista.. i know it seems abit rediculious but i had no idea what to do but "Formating" . and 1 more thing i have otice this morning on my XP that some files icons has been change into Vista style ... ????? -joe
  10. ok here is it.... after a week of downloading Vista Ultimate i now have some serious problems, before i begin, here's my Pc Information (Compatipal with Vista): -along with vista there's Windows XP SP2 -system type :X86-based Pc -prcessor :x86 Family 15 model 4 stepping Genuinelntel ~3000 MHz -RAM : 2 GB -Display card : MSI NX7600 GS-T2D512EH -512MB Problems: 1-Windows Vista Freeze after 50min of logging in and i have no idea why (Freezing = stop responding and every thing just stop(like a screenshot) because the Cpu reache 100% even all applications is closed) 2.This problem has infected my other OS (XP SP2) and now it freeze randomly. 3.XP SP2 is making a strange behaviors like this: (image down) that's all for now ... i hope If you have any idea about that or any thing that might help ... post it here if you got any Question to get sure about what you got .... iam still here thanks in advance
  11. yeah i like it without ads ... ads was anoyying especially the ones between posts.this is much more comfortable and "readable" post without ads -Joe
  12. Hi Niru,thank for your help ....that was helpful now the virus is a history -Joe
  13. ok..a good reviw about vista but let's take the reality facts ... it has been published since jan/2007 (the final release) but be serious i hace tried it and for me i think it needs alot of work to make it take the "perfect path"..the only thing that considered me when i downloaded Vista was compatiblity ... alot of softwares do not work on Vista and some companies still didnt relase Vista compatible or even a Vista drivers for thier Pc parts.And another thing that you should consider .... like when i tested the "Final" release it got me an Unexpected erorrs like (blue window) or even worse i had a "unexpect graphic card crash" even i it's new(Geforece 6200Gs)...-Joe
  14. @bakr_2k5 sorry but that didnt help. i followed the steps but nothing i only found the text in the autorun in the Root C:\ no Registry key ,startup "hacked by Godzilla" or even arunning application within the name "wscript.exe" Thanx for your try -Joe
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.