Help Not Login or Session expire

Started on the old forum in March 2012 · view the original in the archive · old links redirect here

16 replies · 940 views · started 14 years ago · 1 min read

6 participants
stratosphere Junior · 42 posts #1

after i hide the sessi0ns of my lava script , i cant login anym0re it says Not Login or Session expire how can i fixed that please help me. Thank you

ozziemale31 Lead · 861 posts #2

re

stratosphere wrote: after i hide the sessi0ns of my lava script , i cant login anym0re it says Not Login or Session expire how can i fixed that please help me. Thank you

becus u hide session it doesnt know how to call up the function look at riders script for idea how to do

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

shushant Developer · 207 posts #3

stratosphere wrote: after i hide the sessi0ns of my lava script , i cant login anym0re it says Not Login or Session expire how can i fixed that please help me. Thank you

Add

session_start();

at the top

something else Fellow · 2,296 posts #5

at a guess im thinking that you havent removed all $sid = $_GET['sid']; /replaced them with $sid = $_SESSION['sid']; or you might not even be setting the session?? but without a script in front of us everyone here is just guessing

stratosphere Junior · 42 posts #6

something else wrote: at a guess im thinking that you havent removed all $sid = $_GET['sid']; /replaced them with $sid = $_SESSION['sid']; or you might not even be setting the session?? but without a script in front of us everyone here is just guessing

i already replaced all $sid = GET["sid"] to $sid = SESSION['sid'] wait ill post the script

Added after 15 minutes:

i think theres a problem here in my in.php

<?php
/*
mod by me 
(dont removed this copyrights) 
*/
session_name("PHPSESSID");
session_start();

include("iconfig.php");
include("icore.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

     echo "<link rel=\"shortcut icon\" href=\"pgsm.ico\" type=\"image/x-icon\" />";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"gsmstyle.css\" />";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"PinoyGsm\"/> 
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"/></head>";
echo "<body>";

connectdb();
$bcon = connectdb();
if (!$bcon)
{
 
    echo "<div align=\"center\"><div class=\"t2\">Error.!</div><br/>";
    echo "Cant connect to database<br/>";
    echo "This error happens usually when backing up the database, please be patient, The site will be up any minute<br/>";
    echo "Thank You Very Much<br/><a href=\"index.php\">Home</a><br/><div class=\"foot\">$mysite</div></div>";
echo "<br/>Page Took ";
$load = microtime();
print (number_format($load,2));
echo " Seconds";
 echo "</div>";
    echo "</body>";
    echo "</html>";
    exit();
}
$nick = safe(cleanInput($_GET["u"]));
$pwd = safe(cleanInput($_GET["p"]));
$myid = getuid_name($nick);
$gsmstyle = mysql_fetch_array(mysql_query("SELECT mystyle FROM iwapgsm_jlc_users WHERE id='".$myid."'"));
$user = mysql_fetch_array(mysql_query("SELECT name FROM iwapgsm_jlc_users WHERE id='".$myid."'"));
$ubrowser = safe($_SERVER['HTTP_USER_AGENT']);
$uipadd = getip();

$tolog = false;
  echo "<title>*$user[0]-$toptitle*</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$gsmstyle[0]\"/>";
  echo "</head>";
 echo "<div align=\"center\">";
  $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iwapgsm_jlc_users WHERE myname='".$nick."'"));
  if($uinf[0]==0)
  {
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$ip = $_SERVER['REMOTE_ADDR'];
    //Check for user ID
    echo "<div class=\"t2\">Error.!!</div><br/>User Does Not Exist Or Not Yet Registered<br/><a href=\"terms.php\">Register It Now</a><br/>";
  }else{
    //check for pwd
    $epwd = md5($pwd);
    $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iwapgsm_jlc_users WHERE myname='".$nick."' AND pass='".$epwd."'"));
    if($uinf[0]==0)
    {
    echo "<div class=\"t2\">Error.!!</div><br/>Are You Trying To Guess Your Password Or What?<br/>If you forgot your own password<br/>just retrieve it <a href=\"forgotpw.php\">HERE</a><br/>";
    }else{
    $logedin = mysql_fetch_array(mysql_query("SELECT uid FROM iwapgsm_jlc_ses WHERE uid='".$myid."'"));
    if($logedin[0]>0)
    {
    mysql_query("DELETE FROM iwapgsm_jlc_ses WHERE uid='".$myid."'");
    header("Location: ../in.php?u=$nick&p=$pwd");
    }else{
   $rndsid = rand(111111111,999999999);
   $tm = time();
   $xtm = $tm + (getsxtm()*100);
   $did = $rndsid;
   $res = mysql_query("INSERT INTO iwapgsm_jlc_ses SET id='".safe(cleanInput(base64_encode($did)))."', uid='".$myid."', expiretm='".$xtm."'");
    if($res)
    {
    $tolog=true;
    echo "<div class=\"head\">Welcome $user[0]!</div><br/>";
    $sid = safe(cleanInput(base64_encode($did)));
    header("Refresh: 1; url=index.php?do=main");
    echo "[<a href=\"index.php?do=main\">";
    echo "PROCEED</a>]<br/>";
    $lact = mysql_fetch_array(mysql_query("SELECT lastact FROM iwapgsm_jlc_users WHERE id='".$myid."'"));
    $lst = $lact[0];
    mysql_query("UPDATE iwapgsm_jlc_users SET lastvst='".$lst."', lastact='".time()."', browserm='".$ubrowser."', ipadd='".$uipadd."' WHERE id='".$myid."'");
    }
   }
  }
 }

    if($tolog)
    {
    echo "Bookmark This Page!<br/>
For Auto-Login References.";
    echo "<hr/>";
    $xfile = @file("randomlogin.txt");
    $random_num = rand (0,count($xfile)-1);
    $udata = explode("::",$xfile[$random_num]);
    echo "$udata[1]<br/>";
    include("ads.php");
    echo "<br/><div class=\"foot\">$mysite</div>";
    }else{
    echo "<br/>";
    include("ads.php");
    echo "<br/><div class=\"foot\">$mysite</div>";
    }
    echo "<br/>Page Took ";
    $load = microtime();
    print (number_format($load,2));
    echo " Seconds";
    echo "</div>";
    echo "</body>";
    exit();
?>
</html>
analyzer Developer · 104 posts #7

Did you put session_start(); in all of your php file?. .

It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

something else Fellow · 2,296 posts #9

you need to set the session:

$_SESSION['sid'] = $sid;

m4ster_v4 Developer · 125 posts #14

set on your login.php

$_SESSION['sid'] = $sid; // $sid = You generated session when login.

remove all session_start(); if (u put in all script) don't need to remove elseif (not yet) just put session_start(); on config.php or core // Since core and config basically include in all script of lavalair.

at other php chage $sid = $_GET['sid']; to -> $sid = $_SESSION['sid'];

Good luck.

*This is if you using lavascript, if not just follow above and match with your script.

Visit my WEBSITE Project: http://www.aspirewap.net

something else Fellow · 2,296 posts #15
<?php 
/* 
mod by me  
(dont removed this copyrights)  
*/ 
session_name("PHPSESSID"); 
session_start(); 

include("iconfig.php"); 
include("icore.php"); 
header("Content-type: text/html; charset=ISO-8859-1"); 
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"; 
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; 
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; 

     echo "<link rel=\"shortcut icon\" href=\"pgsm.ico\" type=\"image/x-icon\" />"; 
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"gsmstyle.css\" />"; 
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" /> 
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/> 
<meta name=\"description\" content=\"PinoyGsm\"/>  
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"/></head>"; 
echo "<body>"; 

connectdb(); 
$bcon = connectdb(); 
if (!$bcon) 
{ 
  
    echo "<div align=\"center\"><div class=\"t2\">Error.!</div><br/>"; 
    echo "Cant connect to database<br/>"; 
    echo "This error happens usually when backing up the database, please be patient, The site will be up any minute<br/>"; 
    echo "Thank You Very Much<br/><a href=\"index.php\">Home</a><br/><div class=\"foot\">$mysite</div></div>"; 
echo "<br/>Page Took "; 
$load = microtime(); 
print (number_format($load,2)); 
echo " Seconds"; 
 echo "</div>"; 
    echo "</body>"; 
    echo "</html>"; 
    exit(); 
} 
$nick = safe(cleanInput($_GET["u"])); 
$pwd = safe(cleanInput($_GET["p"])); 
$myid = getuid_name($nick); 
$gsmstyle = mysql_fetch_array(mysql_query("SELECT mystyle FROM iwapgsm_jlc_users WHERE id='".$myid."'")); 
$user = mysql_fetch_array(mysql_query("SELECT name FROM iwapgsm_jlc_users WHERE id='".$myid."'")); 
$ubrowser = safe($_SERVER['HTTP_USER_AGENT']); 
$uipadd = getip(); 

$tolog = false; 
  echo "<title>*$user[0]-$toptitle*</title>"; 
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$gsmstyle[0]\"/>"; 
  echo "</head>"; 
 echo "<div align=\"center\">"; 
  $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iwapgsm_jlc_users WHERE myname='".$nick."'")); 
  if($uinf[0]==0) 
  { 
$brws = explode(" ",$HTTP_USER_AGENT); 
$ubr = $brws[0]; 
$ip = $_SERVER['REMOTE_ADDR']; 
    //Check for user ID 
    echo "<div class=\"t2\">Error.!!</div><br/>User Does Not Exist Or Not Yet Registered<br/><a href=\"terms.php\">Register It Now</a><br/>"; 
  }else{ 
    //check for pwd 
    $epwd = md5($pwd); 
    $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iwapgsm_jlc_users WHERE myname='".$nick."' AND pass='".$epwd."'")); 
    if($uinf[0]==0) 
    { 
    echo "<div class=\"t2\">Error.!!</div><br/>Are You Trying To Guess Your Password Or What?<br/>If you forgot your own password<br/>just retrieve it <a href=\"forgotpw.php\">HERE</a><br/>"; 
    }else{ 
    $logedin = mysql_fetch_array(mysql_query("SELECT uid FROM iwapgsm_jlc_ses WHERE uid='".$myid."'")); 
    if($logedin[0]>0) 
    { 
    mysql_query("DELETE FROM iwapgsm_jlc_ses WHERE uid='".$myid."'"); 
    header("Location: ../in.php?u=$nick&p=$pwd"); 
    }else{ 
   $rndsid = rand(111111111,999999999); 
   $tm = time(); 
   $xtm = $tm + (getsxtm()*100); 
   $did = $rndsid; 
   $_SESSION['sid'] = safe(cleanInput(base64_encode($did)));
   $res = mysql_query("INSERT INTO iwapgsm_jlc_ses SET id='".safe(cleanInput(base64_encode($did)))."', uid='".$myid."', expiretm='".$xtm."'"); 
    if($res) 
    { 
    $tolog=true; 
    echo "<div class=\"head\">Welcome $user[0]!</div><br/>"; 
    $sid = safe(cleanInput(base64_encode($did))); 
    header("Refresh: 1; url=index.php?do=main"); 
    echo "[<a href=\"index.php?do=main\">"; 
    echo "PROCEED</a>]<br/>"; 
    $lact = mysql_fetch_array(mysql_query("SELECT lastact FROM iwapgsm_jlc_users WHERE id='".$myid."'")); 
    $lst = $lact[0]; 
    mysql_query("UPDATE iwapgsm_jlc_users SET lastvst='".$lst."', lastact='".time()."', browserm='".$ubrowser."', ipadd='".$uipadd."' WHERE id='".$myid."'"); 
    } 
   } 
  } 
 } 

    if($tolog) 
    { 
    echo "Bookmark This Page!<br/> 
For Auto-Login References."; 
    echo "<hr/>"; 
    $xfile = @file("randomlogin.txt"); 
    $random_num = rand (0,count($xfile)-1); 
    $udata = explode("::",$xfile[$random_num]); 
    echo "$udata[1]<br/>"; 
    include("ads.php"); 
    echo "<br/><div class=\"foot\">$mysite</div>"; 
    }else{ 
    echo "<br/>"; 
    include("ads.php"); 
    echo "<br/><div class=\"foot\">$mysite</div>"; 
    } 
    echo "<br/>Page Took "; 
    $load = microtime(); 
    print (number_format($load,2)); 
    echo " Seconds"; 
    echo "</div>"; 
    echo "</body>"; 
    exit(); 
?> 
</html>
stratosphere Junior · 42 posts #16

thank you something else. Problem Solved 🙂

m4ster_v4 Developer · 125 posts #17

stratosphere wrote: thank you something else. Problem Solved :)

Learn how something else solve this problem. Don't just copy and paste then say Problem Solved but HOW = 0; return 0; All 0.. Learn and understand.

Visit my WEBSITE Project: http://www.aspirewap.net

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close