session_set_cookie_params() for one level domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Something that has taken me some time to debug and wanted to share:
session_set_cookie_params() does not work when the domain param is
just a one level domain, like it was a TLD.

I have a site in an intranet and our internal domain is .local, so
trying to set the cookie session to the .local domain does not work:

session_set_cookie_params(0, '/', '.local'); // Does not work

In all test I've done, setting the domain only works for SLDs and above: 

session_set_cookie_params(0 , '/', '.sld.local'); Does work

I think this is nothing to do with PHP but the http protocol, witch
does not permit setting cookies for TLDs for obvious security reasons.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux