Jump to content


Photo

Error with Session()


  • Please log in to reply
No replies to this topic

#1 creativkook

creativkook
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 15 September 2006 - 08:18 PM

Ok, so I didn't design this code.  I'm just trying to fix an error on it, and the guy that worked here before me used this open source code.  Here are the errors I get if I click on any of the pages to edit through the database.

Warning: session_start(): open(C:\PHP\sessiondata\sess_7cb495eef5c712685f50cbe5087669cb, O_RDWR) failed: Permission denied (13) in c:\web\cc\groups\scripts\sb_login.php on line 30

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\web\cc\groups\scripts\sb_login.php:30) in c:\web\cc\groups\scripts\sb_login.php on line 30

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\web\cc\groups\scripts\sb_login.php:30) in c:\web\cc\groups\scripts\sb_login.php on line 30


The area of code it's referring to:

function logged_in ( $redirect_to_login, $redirect_to_setup ) {
		// Check if the user is logged in and has a session.
		//
		// Session data is stored in a client-side cookie.
		// Login flag is stored in the session cookie.

		// Support for PHP >= 4.1.0
		// Check if the user has a client-side cookie.
		if ( isset( $_COOKIE['my_id'] ) ) {
			$my_id = $_COOKIE['my_id'];
			
			// Turn off URL SIDs.
			// ini_set( 'session.use_trans_sid', '0' );
			
			// Init the session.
			session_set_cookie_params(time()+60*60*24*5);
			session_id($my_id);
			session_start ();
			
			// Check if they're logged in.
			if ( isset( $_SESSION['logged_in'] ) && $_SESSION['logged_in'] == 'yes' ) {
				if ( $_SESSION['site_path'] === dirname($_SERVER['PHP_SELF']) ) {
					return ( true );
				}
			}
		}

These errors also came up at the bottom of the window.


Warning: Unknown(): open(C:\PHP\sessiondata\sess_7cb495eef5c712685f50cbe5087669cb, 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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users