Forum Moderators: coopster
If session.use_trans_sid is on then PHP [php.net] will add the sessionid to the URL when cookies are disabled. In any case the session data are stored on the server side and the session id is needed to identify HTTP requests, since HTTP in itself is a stateless protocol. The session id will either be contained in a cookie, i.e. in the HTTP message header, or in the URL itself.
Andreas
If you want to take a look at my configs, here they are. Any help would totally be a BIG help.
<snip>
[edited by: jatar_k at 8:25 pm (utc) on Feb. 24, 2003]
[edit reason] no urls please [/edit]
Also note the following:
Please note when working with sessions that a record of a session is not created until a variable has been registered using the session_register() [php.net] function or by adding a new key to the $_SESSION superglobal array. This holds true regardless of if a session has been started using the session_start() [php.net] function.[php.net...]
Perhaps you could post the code that is not working?
In any way the session will be stored on the server side, never in a browser window.
Andreas
It's like this. I need to track users to my website using php. I can't use cookies because most people have those disabled. I can't put them in the url because if someone bookmarks the site, it will also store the old cookie. A while ago I found a way to store variables using session cookies. In IE, if you goto tools->internet options->privacy tab->"advanced..." button you will notice a checkbox that says "always allow session cookies". with that checked I was able to pass variables back and forth with the server but only using the current browser window. The above code incriments fine but when you open a new window and run the php file from the diffrent window, it starts over from 0. If you go back between the windows and refresh, both values change but not with the same numbers.
You might want to unset session.cookie_lifetime and session.cookie_domain.
Here is my PHP [php.net] configuration:
session.auto_start
Off Off
session.cache_expire
180 180
session.cache_limiter
nocache nocache
session.cookie_domain
no value no value
session.cookie_lifetime
0 0
session.cookie_path
/ /
session.cookie_secure
Off Off
session.entropy_file
no value no value
session.entropy_length
0 0
session.gc_maxlifetime
1440 1440
session.gc_probability
1 1
session.name
PHPSESSID PHPSESSID
session.referer_check
no value no value
session.save_handler
files files
session.save_path
/tmp /tmp
session.serialize_handler
PHP [php.net] php
session.use_cookies
On On
Using this config your code works just fine when I open a new window using Ctrl-N.
Andreas