Session file not written, session variables messed up.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a weird problem with sessions on PHP 4.3.9 + Apache 1.3.33 in
Slackware, maybe someone could help me or have had the same problem. I'm
getting these messages in my logs:

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

/var/tmp/php is owned by the user/group Apache is running as, and it has
0700 permissions. This message appears sporadically. I googled but I only
got answers related to permissions.

This happens with an application which consists in two frames loading
distinct scripts. I print the content of one session variable in both
frames, let's say:

<?php
// do many stuff... then:
echo $_SESSION['fullname'];
?>

The weirdness comes when in one frame the script will print "Agent Smith"
while in the other frame of the same frameset the script which loads on it
will print "Thomas Anderson"... and the actual full name in the database
is "Trinity" (both "Agent Smith" and "Thomas Anderson" are also in the
database, related to different logins each one).  The session variables
get their values from a database, in one point of the login script only,
by simple assignment:

// query the database to get the full name for $_POST['login'], where
// login is unique... then:
$_SESSION['fullname'] = $rs['fullname'];

I have not been able to determine if the warning message is related to
this weird behavior. This behavior shows up sporadically.

I'm using this session config in php.ini:

session.save_handler = files
session.save_path = /var/tmp/php
session.use_cookies = 1
session.use_only_cookies = 1
session.name = SID
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 1000
session.gc_maxlifetime = 7200
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 16
session.entropy_file = /dev/urandom
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

The client browser has been MSIE 6.0 in all cases.

Any help is appreciated.

Thanks in advance.
Rodolfo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux