My friend and I have both used sessions before, but have recently undertaken a web development project and are using his machine as a temporary development server. The only problem is that cookies just arn't getting set. Needless to say this castrates our plan for a login system. (we really dont want get vars)
We're relatively certain the problem is in the configuration of PHP (4.3.2) or Apache (we're running 2), because the same code works on another server. We've tried just about everything we can think of when it comes to the php.ini, but to no avail. Here's the session excerpt from our php.ini:
session.save_handler = files
session.save_path = C:\PHP\sessiondata
session.use_cookies = 1
; session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_secure = 0
session.cookie_domain = xxx.xxx.xxx.xxx
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
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
note: session.cookie_domain is replaced by my friend's IP.
I've tried explicity setting cookies with setcookie(), and the function returned true. Unfortunatly the cookie got eaten (sorry -- I had to say it) somewhere en route.
Anyone?