[thelist] PHP sessions with cookies turned off
Nadeem Hosenbokus
nadeem at nadeemh.com
Mon Aug 27 12:02:50 CDT 2012
Doesn't !$_COOKIE contradict isset($_COOKIE)? How can isset($_COOKIE) ever
true if !$_COOKIE is also true (meaning that $_COOKIE is not available)?
Or am I reading this incorrectly?
Also, have to tried to do session_start() after the ini_set? And check for a
specific cookie?
if(isset($_COOKIE['test'])){
[...]
}
else{
ini_set ('session.use_trans_sid', 1);
session_start();
}
Nadeem Hosenbokus
(230) 766 9169
www.nadeemh.com
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Lycosa Sales
Sent: 22 August 2012 03:12
To: thelist at lists.evolt.org
Subject: [thelist] PHP sessions with cookies turned off
I'm struggling to get this working, any help would be appreciated. (Windows
server running Plesk and PHP).
I am testing a cookie script for compliance with cookies & javascript turned
off, so I'm using server side checking for cookie availability.
I need to use PHP's session.use_trans_sid when $_COOKIE is unavailable.
The following should work, but it fails to pass the session variable in the
URL, so the session fails. The cookie check does work, but the ini_set does
not.
if (!$_COOKIE || $isset($_COOKIE) || count($_COOKIE) < 1) ini_set (
'session.use_trans_sid', 1);
Thanks,
Phil Parker
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list