ID:               19022
 Comment by:       wieri420 at planet dot nl
 Reported By:      phpbugs at mx4k dot com
 Status:           No Feedback
 Bug Type:         Session related
 Operating System: linux (rh7.3), apache 1.3.26
 PHP Version:      4.2.2
 New Comment:

For the people not experiencing the "failed to write session data"
error but those of you that do experience the 'random lose of session
data' here a possible solution:

Check if your script uses cookies AND sessions in one script.
Comment all the 'setcookie' lines and all other cookie functions in
your script and check if your problem still exists...

It solved the problem ("dissapearing sessions causing users to log
out") for me.


Previous Comments:
------------------------------------------------------------------------

[2003-05-05 03:09:15] e dot aderhold at pro-seco dot de

(/tmp/sess_7538b7739bdd44e2fb0e747f65af858d, O_RDWR) is this a problem
???  NO

create a tmp folder in your SERVER ROOT like /var/www/tmp

and it will work fine 

php.ini means not the / php means the WebServer Root

------------------------------------------------------------------------

[2003-04-22 09:02:12] php at rjs3 dot com

Scratch my last post.  The problem is back again.  I'm having this
issue with PHP 4.2.3 and apache 1.3.27 with SSL.  I do have luck when
restarting apache sometimes.  I'm not 100% positive, but it often fixes
itself after I restart my normal apache NOT my apache-ssl which is
running my webmail site (horde) that breaks due to this bug.

For the record, I also have 2 CPUs since that seems to be a common
trend.  The load is very low.

------------------------------------------------------------------------

[2003-04-21 19:25:04] skye at f4 dot ca

I am also having this problem, FreeBSD 4.6.2 with
Apache/1.3.27 (Unix) mod_throttle/3.1.2 mod_gzip/1.3.19.1a PHP/4.2.3

Using SquirrelMail 1.4.0 I get the usual:

Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0

My box has multiple CPUs.

------------------------------------------------------------------------

[2003-04-18 09:01:34] php at rjs3 dot com

I have had this problem for a long time.

Thanks to the individual that mentioned the /var/www/tmp directory.  I
did not change the permissions of the directory, I simply got rid of it
and the problem went away.

I used to have a /var/www/tmp from testing in the past.  So I just
deleted it and the problem is solved.

PHP developers:  Any reason why this would mess up PHP sessions?

------------------------------------------------------------------------

[2003-03-21 06:35:25] jsarac at fi dot uba dot ar

I was having similar problems. It seems to be related to the require()
statement. 
I solved this putting the seesion_start() statement outside the
included script (e.g. if I have require("auth.php") I put
session_start() issue outside auth.php.
At least It works in my particular case. You can test it and see if it
works for you too.
Please post your results. I

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19022

-- 
Edit this bug report at http://bugs.php.net/?id=19022&edit=1

Reply via email to