Permission denied (13) / Failed to write session data

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
joerg82

Permission denied (13) / Failed to write session data

Post by joerg82 »

Hi!
I keep getting the following warnings
Warning: Unknown(): open(...../tmp/cache/sess_ad35b4e2e6e46b4225325d9954f02a33, 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 (...../tmp/cache) in Unknown on line 0
both on the end of front and backend pages. It doesn't look nice and even worse, I can't login to the backend (just loads the login page again) until I remove the file. When I delete the file in /tmp/cache, the warning is gone, but comes back sooner (few minutes) or later (some hours).

I have upgraded the cms to the latest version (1.5.2), but the warnings keep coming back. I also tried the workaround described in the forum (
http://forum.cmsmadesimple.org/index.php/topic,5949.msg32654.html), but it didn't help.
Any suggestions? The website itself (except backend) seems to work fine, what is the problem with the warnings? The system check shows green checks for everything (in particular session_save_path) except a yellow warning for php (4.3.10) / mysql (4.0.18) versions and apparently ""allow url fopen" is disabled (in check for test_remote_url).

Thanks!
Joerg
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: Permission denied (13) / Failed to write session data

Post by spcherub »

If you are on a shared hosting server, it is possible there is something not right with the /tmp directory into which you write your session files. Sometimes there are background processes that are setup to clean out the /tmp directory and this may be interfering with your use of it.

One option is to change the location of the session data if you have access to (or can customize your own) php.ini files. See http://us3.php.net/manual/en/session.co ... .save-path for information on syntax for the php.ini directives.

[NOTE - This solution is only a possibility - I have not tried it myself] If you don't have access to write your own php.ini file you can also modify this at runtime but editing the index.php file (see http://us3.php.net/manual/en/function.s ... e-path.php for syntax), but this will cause problems down the road when you upgrade.

In either case you can point the session data to another location that is under your control (make sure you set it with write permissions for the web server).

Hope thisi helps.

S
User avatar
Owens
Forum Members
Forum Members
Posts: 97
Joined: Thu Dec 27, 2007 11:29 pm

Re: Permission denied (13) / Failed to write session data

Post by Owens »

joerg82 wrote: Hi!
I keep getting the following warnings
Warning: Unknown(): open(...../tmp/cache/sess_ad35b4e2e6e46b4225325d9954f02a33, 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 (...../tmp/cache) in Unknown on line 0

You will want to checkout this thread:
http://forum.cmsmadesimple.org/index.php/topic,5949.msg32654.html#msg32654
Locked

Return to “CMSMS Core”