[geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.15,1.16
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Thu May 8 13:23:12 EDT 2003
Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory internal.geeklog.net:/tmp/cvs-serv23339/system
Modified Files:
lib-sessions.php
Log Message:
Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems.
Index: lib-sessions.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** lib-sessions.php 20 Feb 2003 18:48:42 -0000 1.15
--- lib-sessions.php 8 May 2003 17:23:10 -0000 1.16
***************
*** 42,45 ****
--- 42,54 ----
$_SESS_VERBOSE = false;
+ if (empty ($_CONF['cookiedomain'])) {
+ preg_match ("/\/\/([^\/]*)/", $_CONF['site_url'], $server);
+ if (substr ($server[1], 0, 4) == 'www.') {
+ $_CONF['cookiedomain'] = substr ($server[1], 3);
+ } else {
+ $_CONF['cookiedomain'] = '.' . $server[1];
+ }
+ }
+
// LOAD USER DATA. NOTE: I'm not sure why I have to set $_USER like this because
// it's suppose to be a global variable. I tried setting $_USER from within
***************
*** 271,275 ****
// This sets a cookie that will persist until the user closes their browser window.
// since session expiry is handled on the server-side, cookie expiry time isn't a big deal.
! setcookie($cookiename,$sessid,0,$cookiepath);
}
--- 280,284 ----
// This sets a cookie that will persist until the user closes their browser window.
// since session expiry is handled on the server-side, cookie expiry time isn't a big deal.
! setcookie($cookiename,$sessid,0,$cookiepath,$cookiedomain,$cookiesecure);
}
More information about the geeklog-cvs
mailing list