Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Failed to write session data

     

tomhumf

8:48 pm on May 11, 2009 (gmt 0)

5+ Year Member



Hi,

I'm getting the error below for a couple of my sites when adding items to the cart.

The problem seems to be related between the two sites. If I load one site it works, then load another site it gives the erro. If I clear the cookies using the browser the second site works, but the first one gives error unless I clear cookies again.

It's all very confusing. I thought it must be the configuration of php.ini at first, but as the error doesnt occur all the time this seems unlikely.

Any ideas what might be going on?

Thanks


Warning: session_start() [function.session-start]: open(/tmp/sess_ca4bb68ad69507adc6c02c89bff93333, O_RDWR) failed: Permission denied (13) in /home/panther/public_html/basket/cart-process.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/panther/public_html/basket/cart-process.php:1) in /home/panther/public_html/basket/cart-process.php on line 1

Warning: Cannot modify header information - headers already sent by (output started at /home/panther/public_html/basket/cart-process.php:1) in /home/panther/public_html/basket/cart-process.php on line 44

Warning: Unknown: open(/tmp/sess_ca4bb68ad69507adc6c02c89bff93333, 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) in Unknown on line 0

tomhumf

10:08 pm on May 11, 2009 (gmt 0)

5+ Year Member



I've just realised this is probably happening because the session id the same for each site? If I exit a site but don't close the browser, the second site gives the error. But if I exit the site and close the browser, then open the second site I don't get the error.

I'm not destroying the session if someone leaves the page, but from what i've just read that isn't simple. I'm also not naming sessions which I guess would make using two sites after each other work better. I think I need to do some more reading on using sessions...

enigma1

1:09 pm on May 12, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



the warning means you need to setup a directory where sessions can be written to (/tmp/ should been a directory at the root of the space your host assigned to you).

Search your files for a function called session_save_path. You should be able to specify where the sessions should be stored (outside the web space). However you should store sessions in the database as it is much easier to manage.

tomhumf

2:01 pm on May 12, 2009 (gmt 0)

5+ Year Member



Hi, Thanks. I think the sessions are being stored in the tmp folder above my web folder though. That is the path set in php_info.

As I said, it works fine if I clear the browser's cookies so I think its a problem with not naming sessions whilst using two sites without closing the browser.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month