Page 1 of 1

Warning: session_start(): open() failed: Permission denied

Posted: Wed Jun 21, 2006 5:28 pm
by Luke
I was editing an application... didn't even really do anything to it, and I'm pretty sure I undid all the changes I made, but for some reason this is all I get now... wTF??
error wrote: Warning: session_start(): open(/sess_68056dae694c4429d94d1b66bb952b80, O_RDWR) failed: Permission denied (13) in /vservers/silversteep/htdocs/mc2fm/incl/classes.inc.php on line 366

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /vservers/silversteep/htdocs/mc2fm/incl/classes.inc.php:366) in /vservers/silversteep/htdocs/mc2fm/incl/classes.inc.php on line 366

Warning: Cannot modify header information - headers already sent by (output started at /vservers/silversteep/htdocs/mc2fm/incl/classes.inc.php:366) in /vservers/silversteep/htdocs/mc2fm/admin.php on line 267
MC2 FileManager v2.0
Warning: Unknown(): open(/sess_68056dae694c4429d94d1b66bb952b80, 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 () in Unknown on line 0

Posted: Wed Jun 21, 2006 5:31 pm
by Benjamin
What operating system is that on? Looks like it's not able to write sessions. Could be an SELinux problem if it's Fedora or Redhat and you made any path changes.

Posted: Wed Jun 21, 2006 5:34 pm
by Luke
it's linux... I was messing with the base_url attached to links (PHPSESSID=blabla) but it's back the way it was and it won't work anymore.

Posted: Wed Jun 21, 2006 5:38 pm
by Benjamin
Try restarting apache if you changed everything back.

Posted: Wed Jun 21, 2006 5:38 pm
by Luke
I can't restart apache... it's on a hosted server... I guess I can put in a support ticket, but what the hell happened? This makes no sense!

Posted: Wed Jun 21, 2006 5:40 pm
by Benjamin
What exactly did you change, was it in php.ini or in a php file? Can you post the bit you changed?

Posted: Wed Jun 21, 2006 5:45 pm
by Luke
All I changed was a line in my functions script:

I changed this from

Code: Select all

function get_linked_path($path,$base_url)	## Get path with links to each folder
{
 $string = "<a href='$base_url'>Data Site</a> / ";
 $array = explode("/",htmlentities($path));
 unset($array[count($array)-1]);
 foreach ($array as $entry)
 {
  @$temppath .= $entry."/";
  $string .= "<a href='$base_url&path=".htmlentities(rawurlencode($temppath))."'>$entry</a> / ";
 }

 return $string;
}
to this:

Code: Select all

function get_linked_path($path, $base_url, $user_dir="/")	## Get path with links to each folder
{
 $string = "<a href='$base_url'>" . $user_dir . "</a> /";
 $array = explode("/",htmlentities($path));
 unset($array[count($array)-1]);
 foreach ($array as $entry)
 {
  @$temppath .= $entry."/";
  $string .= "<a href='$base_url&path=".htmlentities(rawurlencode($temppath))."'>$entry</a> / ";
 }

 return $string;
}
I looked at the page and BLAMO! Error central... so I changed it back and it's still broken!!

Posted: Wed Jun 21, 2006 5:48 pm
by Benjamin
That makes no sense. Maybe your host was messing with something at the same time. The only other thing I could think of is that you changed the permissions of the functions file, but I don't see how that would cause the error your getting either.

Posted: Wed Jun 21, 2006 5:50 pm
by Luke
It's completely wild! I am so confused. I send a support ticket to my host... I hope its their fault because I have ABSOLUTELY no idea what's causing this.

Posted: Wed Jun 21, 2006 7:47 pm
by Weirdan
well, the problem is obvious:
Warning: session_start(): open(/sess_68056dae694c4429d94d1b66bb952b80, O_RDWR) failed
PHP tries to save session data to the root folder (which isn't writeable on any sane Unix system).

You may try to use session_save_path() to point session storage engine to the correct directory (usually '/tmp/')

Posted: Thu Jun 22, 2006 10:21 am
by Luke
The weird thing is that it WORKED before. What could have made it change?

Posted: Thu Jun 22, 2006 10:37 am
by Benjamin
I'm not sure that is something you changed. Unless your setting the session_save_path before session_start() is called, someone modified php.ini. If you didn't change it, your host did. Just a coincidence I believe.