Jump to content

Error with Session()


creativkook

Recommended Posts

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:

[code]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 );
}
}
}[/code]

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