Warning session_start, headers already sent error - Can't log in, losing my mind

I’m trying to use the Mysidia pet adoptables php script. However, since I installed it on my site, I haven’t been able to log in. It’s been giving me this exception at the top:

[code]Warning: session_start() [function.session-start]: open(/var/chroot/home/content/86/10005386/tmp/sess_tg5rbp86f8h67kq9g9u9796mp1, O_RDWR) failed: No such file or directory (2) in /home/content/86/10005386/html/classes/class_session.php on line 13

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/86/10005386/html/classes/class_session.php:13) in /home/content/86/10005386/html/classes/class_session.php on line 13[/code]

and this on the bottom:

[code]Warning: Unknown: open(/var/chroot/home/content/86/10005386/tmp/sess_tg5rbp86f8h67kq9g9u9796mp1, O_RDWR) failed: No such file or directory (2) 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[/code]

I’ve searched endlessly for a solution, and I can’t get any help on the Mysidia website (they don’t have a very active community). I’ve searched their forums, and seemingly NO ONE has had my problem with the scripts. Here is the culprit file that’s referenced:

class Session{
private $ssid;
private $started = FALSE;
private $initime;
private $useragent;
public $clientip;

public function __construct(){
// Start our session

 if(!isset($_SESSION)) session_start();
 $this->started = TRUE;
 // Initiate our session properties
 $this->ssid = session_id();
 $this->initime = time();
 $this->useragent = $_SERVER['HTTP_USER_AGENT'];
 $this->clientip = $_SERVER['REMOTE_ADDR'];


public function getid(){
if(empty($this->ssid)) $this->error(“Session already expired…”);
else return $this->ssid;

private function exist($name){
if(!empty($_SESSION[$name])) return TRUE;
else return FALSE;

public function fetch($name){
if($this->exist($name)) return $_SESSION[$name];
else return FALSE;

public function assign($name, $value, $override = TRUE, $encrypt = FALSE){
$value = ($encrypt == TRUE)?hash(‘sha512’, $value):$value;
if(!empty($_SESSION[$name]) and $override == FALSE) $this->error(“Cannot override session var {$name}.”);
else $_SESSION[$name] = $value;

public function terminate($name){
if(!isset($_SESSION[$name])) return FALSE;
else unset($_SESSION[$name]);

public function regen($name){
$this->ssid = session_regenerate_id();
$this->initime = time();

public function validate($name){
if($this->useragent != $_SERVER[‘HTTP_USER_AGENT’] or $this->clientip != $_SERVER[‘REMOTE_ADDR’]){
$this->error(“User IP has changed…”);
$this->error(“Session already expired…”);
else return TRUE;

public function destroy(){
$_SESSION = array();

private function error($message){
throw new Exception($message);

Can someone please help me solve this. I’ve been trying to fix it for days :’(

It looks like your sessions aren’t working. Have you tried with a simple test script to see if you get the same errors about sessions? Maybe you don’t have write access to that directory or it is simply missing. If you can’t change that then you might want to look into making a database session handler etc.

You were RIGHT!!! It was trying to write session data to a folder that either didn’t exist, or was denied.
It did the same thing when I ran a test script, so I was able to find a forum about it on the Go Daddy forums (who I’m hosted with). Someone came up with the solution of writing
[php]session_save_path(’/home/content/blah/blah/html/temp’); [/php]
right above session_start, then making that folder and making it writable. I had been thrown off by all the header stuff, but this looks like a GoDaddy specific problem.
Everything works now, thanks for your reply! :smiley:

Sponsor our Newsletter | Privacy Policy | Terms of Service