Posted by Erlend Klakegg Bergheim on 10/12/56 11:38
Mike skrev:
> I have read the manual and posts but I'm still confused with sessions.
>
> My php.ini has the following session settings...
>
> session.auto_start Off Off
> session.bug_compat_42 On On
> session.bug_compat_warn On On
> 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_divisor 100 100
> session.gc_maxlifetime 1440 1440
> session.gc_probability 1 1
> session.hash_bits_per_character 4 4
> session.hash_function 0 0
> session.name PHPSESSID PHPSESSID
> session.referer_check no value no value
> session.save_handler files files
> session.save_path c:/wamp/tmp c:/wamp/tmp
> session.serialize_handler php php
> session.use_cookies On On
> session.use_only_cookies Off Off
> session.use_trans_sid 0 0
>
> I have the following 2 test scrips...
>
> Page1.php
>
> <?php
> session_start();
> $_SESSION[auth] = "Test message";
> ?>
> <a href="page2.php?<?php echo SID; ?>">Page2</a>
>
> Page2.php
>
> <?php
> session_start();
> $message = $_SESSION[auth];
> echo $message;
> ?>
>
> Now this works fine but it doesn't display the SID in the URL. I want
> to force the SID in case any users don't have cookies enabled.
>
> I blocked all my cookies and re-ran the scripts. It still worked but
> again, it didn't display the SID in the URL.
>
> Why isn't an SID displayed??
Try this. Not tested.
echo $_COOKIE[ini_get("session.name")];
--
Vennlig hilsen
Erlend Klakegg Bergheim
[Back to original message]
|