Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with sessions

Status
Not open for further replies.

alfalf

Programmer
Mar 6, 2003
155
BA
Hello all.

Recently I changed server computer and set new web server for developement purposes.

My sessions are stored in an mySQL table.

Every page on this developement web starts with two following lines:
Code:
if(file_exists('C:/includes/phpSecureSessions.inc')) {include 'phpSecureSessions.inc';}
sess_init('localhost','sessions','root','pwd','1');

This means that session does have continuity.

And when I'm testing it (and working) locally (from same computer), everything works smooth (one session is opened per one surf thru site).

PROBLEM
But when I test it from another computer via internet, every page that opens -> opens another session with it's session data.

Session_id remains same while session_created and session_active changes.

This virtually means that whenever sess_init is invoked in code, it opens another session with same number.
Not to mention that sess_data variables are dropped (or fragmented to session rows) and therefore unusable.

Can anyone pinpoint me possible solution? Perhaps php.ini setting problem? Perhaps the fact that it's unnatural php environment -> IIS6.0 on winXP?

this is php.ini session setting:
Code:
[Session]
session.save_handler = user
;session.save_path = "/tmp"
session.use_cookies = 1
;session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
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 = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
:session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 1
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

Can anyone see where's problem? thanks!
 
do you think this might be the problem?

if(file_exists('C:/

I always thought when you pointed at a local hard drive, you gave yourself grief if you tried to see the same file remotely.


----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top