SkyRanger Posted April 26, 2009 Share Posted April 26, 2009 I am having a strange problem with a script. I only have the problem with FF but not with IE. Here is the error I am getting: Warning: session_start() [function.session-start]: open(/tmp/sess_91c647c5925ebb4eed7fa0b0bd89f66e, O_RDWR) failed: Permission denied (13) in /home/freedemo/public_html/admin/index.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/freedemo/public_html/admin/index.php:2) in /home/freedemo/public_html/admin/index.php on line 2 Sign in form Warning: Unknown: open(/tmp/sess_91c647c5925ebb4eed7fa0b0bd89f66e, 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 Here is the code: <?php session_start(); include "db_connect.php"; if(!$_POST['submit']) { ?> <html> <head><link rel="stylesheet" href="style.css"></head> <div class="divider"> <strong>Login</strong> <form method="post" action="index.php"> <div class="formElm"> <label for="username">Username</label> <input id="username" type="text" name="username" maxlength="16"> </div> <div class="formElm"> <label for="password">Password</label> <input type="password" name="password" maxlength="16"> </div> <input type="submit" name="submit" value="Login"> </form> <a href="register.php">Register Here</a> </div> </html> <?php } else { $user = protect($_POST['username']); $pass = protect($_POST['password']); if($user && $pass) { $pass = md5($pass); //compare the encrypted password $sql="SELECT id,username FROM `users` WHERE `username`='$user' AND `password`='$pass'"; $query=mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($query) > 0) { $row = mysql_fetch_assoc($query); $_SESSION['id'] = $row['id']; $_SESSION['username'] = $row['username']; echo "<script type=\"text/javascript\">window.location=\"home.php\"</script>"; } else { echo "<script type=\"text/javascript\"> alert(\"Username and password combination is incorrect!\"); window.location=\"index.php\"</script>"; } } else { echo "<script type=\"text/javascript\"> alert(\"You need to gimme a username AND password!\"); window.location=\"index.php\"</script>"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/155667-solved-first-time-having-this-problem/ Share on other sites More sharing options...
SkyRanger Posted April 26, 2009 Author Share Posted April 26, 2009 Ooops, Sorry, forgot to ask if anybody can see why Firefox is having a problem with this script. Quote Link to comment https://forums.phpfreaks.com/topic/155667-solved-first-time-having-this-problem/#findComment-819345 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.