Jump to content

Sessions Problems


creativkook

Recommended Posts

Ok, I'm having problems with my session starting and recognizing it.  This is from the login page, and it's not letting it send to the next page.

 

Here are the errors I'm getting:

 

Warning: session_start(): open(C:\PHP\sessiondata\sess_ef565a18d6c2e623e74300375c5613d8, O_RDWR) failed: Permission denied (13) in C:\Web\Plaid\index.php on line 20

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Web\Plaid\index.php:20) in C:\Web\Plaid\index.php on line 20

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Web\Plaid\index.php:20) in C:\Web\Plaid\index.php on line 20

 

Warning: Cannot modify header information - headers already sent by (output started at C:\Web\Plaid\index.php:20) in C:\Web\Plaid\index.php on line 24

 

Warning: Unknown(): open(C:\PHP\sessiondata\sess_ef565a18d6c2e623e74300375c5613d8, 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 (C:\PHP\sessiondata) in Unknown on line 0

 

 

Here's the session start code:

 

if(isset($_POST['login']))
{

$user = $_POST['user'];
$pass = $_POST['password'];

require("dbheader.php");

$person = mysql_query("SELECT userID FROM plaidusers WHERE username = '$user' AND password = MD5('$pass')");

if(mysql_num_rows($person) > 0)
{
	$persons = mysql_fetch_array($person);

	session_start();

	$_SESSION['userID'] = $persons['userID'];

	header("location: home.php?userid=$person[userID]");
	exit;	
}
else
{
	$error = true;
}

}

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.