RE: [PHP] Re: Session_id(); are changing between the pages.
| From: | hadi | Date: | Sat, 07 Jun 2014 22:01:37 +0000 |
| Subject: | RE: [PHP] Re: Session_id(); are changing between the pages. | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323403@lists.php.net to get a copy of this message | ||
Stuart,
> Are you using localhost as your hostname? If so that’s why; cookies will not
> be stored against localhost. You need to either start using a hostname with at
> least on dot, or pass an empty string, null or false as the hostname when
> setting the cookie.
Do you mean system name ? or hostname in php.ini ?
Here is my php.ini, please check it.
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path /tmp /tmp
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
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
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0
> >
> > I checked the browser (Set-Cookie) Cookie transferred to the browser
> > but not sending back to the server.
>
> Are you using localhost as your hostname? If so that’s why; cookies will not
> be stored against localhost. You need to either start using a hostname with at
> least on dot, or pass an empty string, null or false as the hostname when
> setting the cookie.
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s