if i am setting a session in http://example.com/path/file1.php
then can't getting it in http://www.example.com/path/file2.php but getting the value in http://example.com/path/file2.php
- the "www." is creating the issue.
Is that a bug?
if i am setting a session in http://example.com/path/file1.php
then can't getting it in http://www.example.com/path/file2.php but getting the value in http://example.com/path/file2.php
Is that a bug?
no, thats intended behaviour.
"" is treated as another subdomain than "www" (or other ones, if you have more subdomains), and so it's saved in a different cookie (per default, a cookies validity is per domain).
to avoid this, you could simply redirect users that enter from http://example.com/path/file1.php (or anything else with "example.com") to http://www.example.com/path/file1.php (or anything else with "www.example.com")