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
https://forums.phpfreaks.com/topic/38347-sessions-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.