SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Console Login strangely acting up in internet explorer

    When i logged into my Site at clans.bcscripting.info

    i sucessfully logged in and got this show back to me

    Warning: Unknown: open(/tmp/sess_2586155de3a60bfc492ee3a57add1c0f, O_RDWR) failed: Permission denied (13) in Unknown on line 0

    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0


    What does that mean this is what i have for console.php

    PHP Code:
    <?
    session_start
    ();
    //define $con
    include("dbconnect.php");
    //this is the file that connect to sql
    $s=$_SERVER["REMOTE_ADDR"];
    //draws IP address of visitor
    //error_reporting(E_ALL);
    $iQuery="SELECT * from banip where IP='$s'";
    //$result=mysqli_query($con,);
    $rs=mysqli_query($con,$iQuery);
    //$ipbancheck2=mysqli_query($con,$ipbancheck);
    if(!$rs)
    {
        echo 
    "Error:".mysqli_error($con);
    }
    else
    {
        while(
    $ipbancheck3=mysqli_fetch_array($rs))
        {
        
    $IPBANNED=$ipbancheck3[IP];
        }
            
    //above lines check to see if user Ip is in banned IPs
        
    if ($IPBANNED)
        {
            require(
    "clansettings.php");
            print 
    "<font color=".$fontcolor.">You have been banned</font>";
        }
        else
        {
                    
    $msg_pass="";
                    
    $msg_user="";
                    include(
    "dbconnect.php");
                    if(
    $_SESSION['user'])
                    {
                                    include(
    "header.inc.php");
                                    include(
    "dbconnect.php");
                                    
    $gQuery="SELECT username,rank,email,aim,msn,Recruitedby,joineddate,disable,logindays,web  FROM members WHERE username='".$_SESSION['user']."'";
                                    
    //excute the query
                                    
    $rs=mysqli_query($con,$gQuery);
                                    if(!
    $rs)
                                    {
                                        
    $dbError="Error:Failed to executing query".mysqli_error($con);
                                    }
                                    else
                                    {
                                        
    $count=$rs->num_rows;
                                        if(
    $count>0)
                                        {
                                            
    $data=$rs->fetch_assoc();
                                            
    $username=$data['username'];
                                            
    $rank=$data['rank'];
                                            
    $email=$data['email'];
                                            
    $aim=$data['aim'];
                                            
    $msn=$data['msn'];
                                            
    $recruitedby=$data['Recruitedby'];
                                            
    $joineddate=$data['joineddate'];
                                            
    $disable=$data['disable'];
                                            
    $logindays=$data['logindays'];
                                            
    $web=$data['web'];
                                        }
                                    }
                                    require(
    "clansettings.php");
                                    
    //echo "<font color=".$fontcolor.">Logged in as".$_SESSION['user']."";
                                    
    $dQuery="SELECT username,rank,email,aim,msn,Recruitedby,joineddate,disable,logindays,web FROM members WHERE username='".$_SESSION['user']."'";
                                    
    //excute the query
                                    
    $rs=mysqli_query($con,$dQuery);
                                    if(!
    $rs)
                                    {
                                        
    $dbError="Error:Failed to executing query".mysqli_error($con);
                                    }
                                    else
                                    {
                                        
    $count=$rs->num_rows;
                                        if(
    $count>0)
                                        {
                                            
    $data=$rs->fetch_assoc();
                                            
    $username=$data['username'];
                                            
    $rank=$data['rank'];
                                            
    $email=$data['email'];
                                            
    $aim=$data['aim'];
                                            
    $msn=$data['msn'];
                                            
    $recruitedby=$data['Recruitedby'];
                                            
    $joineddate=$data['joineddate'];
                                            
    $disable=$data['disable'];
                                            
    $logindays=$data['logindays'];
                                            
    $web=$data['web'];
                                        }
                                    }
                        if(
    $data['disable']==0)
                        {
                            require(
    "clansettings.php");
                            echo 
    "<font color=".$fontcolor.">Logged in as".$_SESSION['user']."";
                            echo 
    "<font color=".$fontcolor.">You have been disabled.<br/>
                            <a href=\"logout.php\">Logout</a></font>"
    ;
                        }
                        if(
    $data['disable']!==0)
                        { 
                                    
    $lQuery="SELECT username,rank,email,aim,msn,Recruitedby,joineddate,disable,logindays,web  FROM members WHERE username='".$_SESSION['user']."'";
                                    
    $rs=mysqli_query($con,$lQuery);
                                    if(!
    $rs)
                                    {
                                        
    $dbError="Error:Failed to executing query".mysqli_error($con);
                                    }
                                    else
                                    {
                                        
    $count=$rs->num_rows;
                                        if(
    $count>0)
                                        {
                                            
    $data=$rs->fetch_assoc();
                                            
    $username=$data['username'];
                                            
    $rank=$data['rank'];
                                            
    $email=$data['email'];
                                            
    $aim=$data['aim'];
                                            
    $msn=$data['msn'];
                                            
    $recruitedby=$data['Recruitedby'];
                                            
    $joineddate=$data['joineddate'];
                                            
    $disable=$data['disable'];
                                            
    $logindays=$data['logindays'];
                                            
    $web=$data['web'];
                                        }
                                    }
                                            
    $rmt $_SERVER["REMOTE_ADDR"];
                                                    if(
    $rmt)
                                                    {
                                                        
    $pQuery="update members SET ips = \"$rmt\" WHERE username='".$_SESSION['user']."'";
                                                        
    $result=mysqli_query($con,$pQuery);
                                                        if(!
    $result)
                                                        {
                                                            echo 
    "<font color=".$fontcolor.">Error:".mysqli_connect_errno();
                                                            echo 
    "<br/><font color=".$fontcolor.">Error2:".mysqli_error($con);
                                                        }
                                                        else
                                                        {
                                                                echo 
    "<font color=".$fontcolor.">Your Ip Address has been Logged!</font>";
                                                        }
                                                    } 
                                echo 
    "<br/><br/>";
                                switch(
    true){
                                case 
    date('G')<13
                                echo 
    "<font color=".$fontcolor." size=\"16px\">Good Morning $username</font>"; break;
                                case 
    date('G')<18: echo "<font color=".$fontcolor." size=\"16px\">Good Afternoon $username</font>"; break;
                                case 
    date('G')<25: echo "<font color=".$fontcolor." size=\"16px\">Good Night $username</font>"; break;
                                }
                                echo 
    "<br/><br/><font color=".$fontcolor.">The Time is:&nbsp;"
                                echo 
    date("g:i a");
                                echo 
    "</font>";
                                
    ?>
                                <table>
                                <tr><font size=\"16px\"></font><td><? echo "<font color=".$fontcolor.">Member";?></font></td>
                                <td><? echo "<font color=".$fontcolor.">".$_SESSION['user']."";?></font></td>
                                </tr>
                                <tr>
                                <td><? echo "<font color=".$fontcolor.">Rank";?></font></td>
                                <td><? echo "<font color=".$fontcolor.">";                            if($data['rank']==1)
                                {
                                    echo 
    "<font color=".$fontcolor.">Recruit</font>";
                                }
                                if(
    $data['rank']==2)
                                {
                                    echo 
    "<font color=".$fontcolor.">Private</font>";
                                }
                                if(
    $data['rank']==3)
                                {
                                    echo 
    "<font color=".$fontcolor.">Corporal</font>";    
                                }
                                if(
    $data['rank']==4)
                                {
                                    echo 
    "<font color=".$fontcolor.">Sergeant</font>";    
                                }
                                if(
    $data['rank']==5)
                                {
                                    echo 
    "<font color=".$fontcolor.">Sergeant First Class</font>";    
                                }
                                if(
    $data['rank']==6)
                                {
                                    echo 
    "<font color=".$fontcolor.">Master Sergeant</font>";    
                                }
                                if(
    $data['rank']==7)
                                {
                                    echo 
    "<font color=".$fontcolor.">First Sergeant</font>";    
                                }
                                if(
    $data['rank']==8)
                                {
                                    echo 
    "<font color=".$fontcolor.">Sergeant Major</font>";    
                                }
                                if(
    $data['rank']==9)
                                {
                                    echo 
    "<font color=".$fontcolor.">Warrant Officer WO1</font>";    
                                }
                                if(
    $data['rank']==10)
                                {
                                    echo 
    "<font color=".$fontcolor.">Chief Warrant Officer CWO2</font>";    
                                }
                                if(
    $data['rank']==11)
                                {
                                    echo 
    "<font color=".$fontcolor.">Chief Warrant Officer CWO3</font>";    
                                }
                                if(
    $data['rank']==12)
                                {
                                    echo 
    "<font color=".$fontcolor.">Chief Warrant Officer CWO4</font>";    
                                }
                                if(
    $data['rank']==13)
                                {
                                    echo 
    "<font color=".$fontcolor.">Master Warrant Officer CWO5</font>";    
                                }
                                if(
    $data['rank']==14)
                                {
                                    echo 
    "<font color=".$fontcolor.">Second Lieutenant</font>";    
                                }                            
                                if(
    $data['rank']==15)
                                {
                                    echo 
    "<font color=".$fontcolor.">First Lieutenant</font>";    
                                }
                                if(
    $data['rank']==16)
                                {
                                    echo 
    "<font color=".$fontcolor.">Captain</font>";    
                                }
                                if(
    $data['rank']==17)
                                {
                                    echo 
    "<font color=".$fontcolor.">Major</font>";    
                                }
                                if(
    $data['rank']==19)
                                {
                                    echo 
    "<font color=".$fontcolor.">Colonel</font>";    
                                }
                                if(
    $data['rank']==20)
                                {
                                    echo 
    "<font color=".$fontcolor.">Brigadier General</font>";    
                                }
                                if(
    $data['rank']==21)
                                {
                                    echo 
    "<font color=".$fontcolor.">Major General</font>";    
                                }
                                if(
    $data['rank']==22)
                                {
                                    echo 
    "<font color=".$fontcolor.">Lieutenant General</font>";    
                                }
                                if(
    $data['rank']==23)
                                {
                                    echo 
    "<font color=".$fontcolor.">General</font>";    
                                }
                                if(
    $data['rank']==24)
                                {
                                    echo 
    "<font color=".$fontcolor.">Commander</font>";    
                                }
                                if(
    $data['rank']==25)
                                {
                                    echo 
    "<font color=".$fontcolor.">Webmaster</font>";    
                                } 
    ?></font></td>
                                </tr>
                                <tr>
                                <td><? echo "<font color=".$fontcolor.">Email";?></font></td>
                                <td><? echo "<font color=".$fontcolor.">".$data['email']."";?></font></td>
                                </tr>
                                <tr>
                                <td><? echo "<font color=".$fontcolor.">Recruited By:";?></font></td>
                                <td><? echo "<font color=".$fontcolor.">".$data['Recruitedby']."";?></font></td>
                                </tr>
                                <tr>
                                <td><? echo "<font color=".$fontcolor.">Date Joined";?></font></td>
                                <td><? echo "<font color=".$fontcolor.">".$data['joineddate']."";?></font></td>
                                </tr>
                                </table>
                                <fieldset>
                        <?php
                                    
    include("dbconnect.php");
                                    if(
    $data['rank']>=1)
                                    {
                                        echo 
    "<table width=\"390\" border=\"1\" align=\"center\">
                                        <tr>
                                            <th scope=\"col\" colspan=\"2\"><font color="
    .$fontcolor.">Members Console</font></th>
                                          </tr>
                                          <tr>
                                            <th scope=\"col\"><a href=\"logout.php\">logout</a></th>
                                            <th scope=\"col\"><a href=\"consolefeatuture3.php\">Change Pasword</a></th>
                                          </tr>
                                          <tr>
                                            <th scope=\"row\"><a href=\"consolefeatuture16.php\">Clan Chatroom</a></th>
                                            <th><a href=\"consolefeatuture1.php\">Change info</a></th>
                                          </tr>
                                            <tr>
                                            <th scope=\"row\"><a href=\"viewlogs.php\">View Logs</a></th>
                                            <th scope=\"row\"><a href=\"consolefeatuture17.php\">Private Message(s)</a></th>
                                          </tr>
                                          <tr>
                                                <th scope=\"row\"><a href=\"consolefeatuture25.php\">Clan Enterainment Center</a></th>
                                          </tr>
                                        </table>"
    ;
                                    }
                                    if(
    $data['rank']>=9)
                                    {
                                        include(
    "includes/officers.inc.php"); 
                                    }
                                    
    $rQuery="SELECT * FROM members WHERE username='".$_SESSION['user']."'";
                                    
    $rs=mysqli_query($con,$rQuery);
                                    if(!
    $rs)
                                    {
                                        
    $dbError="Error:Failed to executing query".mysqli_error($con);
                                    }
                                    else
                                    {
                                        
    $count=$rs->num_rows;
                                        if(
    $count>0)
                                        {
                                            
    $data=$rs->fetch_assoc();
                                            
    $username=$data['username'];
                                            
    $rank=$data['rank'];
                                            
    $email=$data['email'];
                                            
    $aim=$data['aim'];
                                            
    $msn=$data['msn'];
                                            
    $recruitedby=$data['Recruitedby'];
                                            
    $joineddate=$data['joineddate'];
                                            
    $disable=$data['disable'];
                                            
    $logindays=$data['logindays'];
                                            
    $web=$data['web'];
                                        }
                                    }
                                    if(
    $data['rank']>=20)
                                    {
                                        include(
    "includes/generals.inc.php"); 
                                    }
                                    if(
    $data['rank']>=24)
                                    {
                                        include(
    "includes/commanders.inc.php");
                                    }
                                    
    $raQuery="SELECT * FROM members WHERE username='".$_SESSION['user']."'";
                                    
    $rs=mysqli_query($con,$raQuery);
                                    if(!
    $rs)
                                    {
                                        
    $dbError="Error:Failed to executing query".mysqli_error($con);
                                    }
                                    else
                                    {
                                        
    $count=$rs->num_rows;
                                        if(
    $count>0)
                                        {
                                            
    $data=$rs->fetch_assoc();
                                            
    $username=$data['username'];
                                            
    $rank=$data['rank'];
                                            
    $email=$data['email'];
                                            
    $aim=$data['aim'];
                                            
    $msn=$data['msn'];
                                            
    $recruitedby=$data['Recruitedby'];
                                            
    $joineddate=$data['joineddate'];
                                            
    $disable=$data['disable'];
                                            
    $logindays=$data['logindays'];
                                            
    $web=$data['web'];
                                        }
                                    }
                                    if(
    $data['rank']==25)
                                    {
                                        include(
    "includes/webmaster.inc.php");
                                    }
                                else if(
    $data['web']==1)
                                    {
                                        include(
    "includes/webmaster.inc.php");
                                    }
                                
    ?></table>
                                </fieldset>
                                <iframe src="membernews.php" name="main" width="478" height="450" frameborder=0></iframe>
                                </div><?php
                        
    }
                    }
                    else
                    {
                        include(
    "header.inc.php");
                        include(
    "login.php");
                        
    //include("includes/footer.inc.php");
                    
    }
                
    ?>
                <?php
        
    }
    }
    ?>
    And for Login i have this

    PHP Code:
    <?php
        session_start
    ();
        include(
    "dbconnect.php");
        
    $msg_pass="";
        
    $msg_user="";
        if(
    $_POST['username'] && $_POST['password'])
        {    
            
    $username mysqli_real_escape_string($con,stripslashes(trim($_POST['username'])));
            
    $password mysqli_real_escape_string($con,stripslashes(trim($_POST['password']))); 
            
    $cQuery="SELECT * FROM members WHERE username='".$username."' AND Password='".$password."'"
            
    $con;
            echo  
    $cQuery;
            
    $rs=mysqli_query($con,$cQuery);
            if(!
    $rs)
            {
                echo 
    "Unable to excute the query:".mysqli_error($con);
            }
            else
            {
                
    $count=mysqli_num_rows($rs);
                    if(
    $count>0)
                    {
                        
    $data=mysqli_fetch_assoc($rs);
                        if(
    $data['password']=$password)
                        {
                            
    $_SESSION['user']=$_POST['username'];
                            require(
    "clansettings.php");
                            echo 
    "<font color=".$fontcolor.">Logged in as".$_SESSION['user']."<br/>";
                            echo 
    "<font color=".$fontcolor.">Please Wait while we log you in</font>";
                            echo 
    "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=console.php\">";
                            }
                            else
                            {
                                
    $msg_pass="Wrong Password,Please Try again<br>\n";
                                include(
    "includes/attemptloginfailed.inc.php");
                            }
                        }
                        else
                        {
                            
    $msg_user="Wrong Username,Please Try again<br>\n";
                            include(
    "includes/attemptloginfailed.inc.php");
                        }
                    }
             if(!
    $_SESSION['user'])
             {
                require(
    "clansettings.php");
                include(
    "includes/header.inc.php");?>
                <fieldset>
                <legend><?php  echo "<font color=".$fontcolor.">Please Login</font></legend>";?>
                <form name="login" method="post" action="">
                <?
                    
    echo ($msg_user)?"<br/>".$msg_user."<br/>":"";
                
                echo 
    "<font color=".$fontcolor.">Username:</font>";?><input type="text" name="username" maxlength="14"/><br/>
                <?
                    
    echo($msg_pass)?"<br/>".$msg_pass."<br/>":"";
                
                echo 
    "<font color=".$fontcolor.">Password:</font>";?><input type="password" name="password" maxlength="12"/><br/>
                <input type="submit" name="login" value="login"/>
                </form></fieldset><?php
            
    }
        }
    ?>
    How can i fix that? why is internet explorer doing that when it works fine in firefox v2 should i be worried about this error?

  2. #2
    SitePoint Evangelist superuser2's Avatar
    Join Date
    Aug 2006
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesn't look like a code problem. Do you run your own server? It appears the session storage file has corrupted permissions. If that's a shared server, contact support and tell them that you are getting permissions errors on their session store. If this is your own server, a filesystem guru here should be able to help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •