When I log out and then log back in I get the following:
Cookie functions seem to be disabled.
Please change your browsersettings!
My Browser settings are at the lowest for cookies..
Also when I try to delete Cookies I get this:
The folowing cookies have been deleted:
Current Cookie Information:
Cookie Name: Cookie Status:
phpbb2mysql_data deleted
admin deleted
user deleted
Warning: session_destroy(): Trying to destroy uninitialized session in /home/gunssqu/public_html/modules/Your_Account/includes/cookiecheck.php on line 208
But everything works ok once the page is refreshed?
I see the first event happening if I remove the test cookie then login without letting it refresh the page (set and read the test cookie).
I'll check with Richard he wrote the cookie check code. In the mean time try this and see if it makes any difference.
Find modules/Your_Account/includes/cookiecheck.php line 208
session_destroy();
and change it to
if(isset($_SESSION)){session_destroy();}
I'll look it over some more but this should get rid of the error your getting I think. That piece of code is noted as questionable in the file by Richard.
Yes everything works great once the page is refreshed..
OK I changed the line above and that cleared up the Warning: session_destroy.
After messing with it a bit I figured out that you need to use the User Info Block that is provided or go to YA to Login. That stops the page that comes up saying Cookie Fuctions seem to be disabled and brings you to YA. It seems to be calling something that others do not. What edits do we need to our theme and Site Info to make it work?
In:
modules/Your_Account/includes/cookiecheck.php
Find:
$cookiedebug = "0";
Change it to:
$cookiedebug = "1";
This will show the cookies set to the user when they login but puts a continue button there and displays the proper message of "Your browser passed our cookie test without any problems!"
Thats the best I can come up with tonight I think its just a simple tweak needed to get the tests to run silently.
Another thing I would change in the same file is the protection line at the begining from:
if ( (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) AND (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) ) {
header("Location: ../../../index.php");
die ();
}
to:
if ( (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) ) {
header("Location: ../../../index.php");
die ();
}
Yep here is a summary of the thread:
Find modules/Your_Account/includes/cookiecheck.php
Change:
if ( (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) AND (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) ) {
header("Location: ../../../index.php");
die ();
}
to:
if ( (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) ) {
header("Location: ../../../index.php");
die ();
}
Find modules/Your_Account/includes/cookiecheck.php line 208
session_destroy();
and change it to
if(isset($_SESSION)){session_destroy();}
And either edit your login block login function to use the same basic code as the one included OR use the one included OR:
In:
modules/Your_Account/includes/cookiecheck.php
Find:
$cookiedebug = "0";
Change it to:
$cookiedebug = "1";
Hi Tommyguns,
My name is Richard, I send Andre Escudero (http://dev.phpnuke.org.br) my cookiecheck routines and I am glad he included it in this beta release.
Since this is a very new feature for CNBYA it is obvious that there are still some glithes in it. It is actually a great thing however to work together to improve it and make it a fully featured replacment for the 'normal' login-routines.
I totally forgot to think about login-blocks, and since the testcookie is being set just before you go to the main login screen, it is not set when using the Login-block.
Can you pm me the Login-block that you are using?
Probably a solution is to insert in block-Login.php:
<?php
/************************************************************/
/* Added $gfx_chk code to allow disabling as per v6.9 code. */
/* 21 October 2003 Gaylen Fraley */
/* */
/* Added 3 new hyperlink things :). First off, if my block */
/* detects that you are using the Resend_Email module, it */
/* will hyperlink the 'Waiting' text to the Resend_Email */
/* block automatically. Then, there is a new module */
/* UserInfoAddons that the block will check for and if found*/
/* will hyperlink the New Today and New Yesterday text and */
/* will display the new users from today and yesterday! */
/* 30 Sept 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Corrected code that displays New Users Yesterday */
/* 11 Nov 2004 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Added Sam Spade lookup for registered users for Admins */
/* only - 24 Sept 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Added 4 user settings - 20 Sept 2003 Gaylen Fraley */
/* Added Hidden User Count - 20 Sept 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Added user_avatar - 18 July 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Update for PHP-Nuke 6.5 - 30 July 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Update for PHP-Nuke 6.5 - 05 March 2003 Gaylen Fraley */
/* website http://www.ravenphpscripts.com */
/* */
/* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
/* website http://www.nukescripts.com */
/* */
/* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
/* website http://newsportal.homip.net */
/* */
/* (C) 2002 */
/* All rights beyond the GPL are reserved */
/* */
/* Please give a link back to my site somewhere in your own */
/* */
/************************************************************/
/*********************************************************************************************************/
/* Setup - Use these settings to control how some of the user info block displays to users/admins. */
/*********************************************************************************************************/
$showGuests = FALSE; //Allow/notAllow displaying of guest ip's partial or otherwise.
$showGuestsAdmin = TRUE; //Allow/notAllow displaying of guest ip's partial or otherwise to Admins.
$showServerDateTime = FALSE; //Allow/notAllow displaying of Server Date/Time.
$showServerDateTimeAdmin = FALSE; //Allow/notAllow displaying of Server Date/Time to Admins.
/*********************************************************************************************************/
/* You should not need to modify anything below this line */
/*********************************************************************************************************/
if (eregi("block-Site_Info.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
}
function convertIP ($xip) {
global $admin;
if (is_admin($admin)) return $xip;
$xipx = explode('.',$xip);
for ($i=2;$i<count($xipx);$i++) {
$xipx[$i] = preg_replace ('/(0|1|2|3|4|5|6|7|8|9)/', "x", $xipx[$i]);
}
return implode('.',$xipx);
}
Fatal error: Cannot redeclare yacookiecheck() (previously declared in /home/gunssqu/public_html/modules/Your_Account/includes/cookiecheck.php:25) in /home/gunssqu/public_html/modules/Your_Account/includes/cookiecheck.php on line 24
When I change added the above line like:
Code:
$content = "";
mt_srand ((double)microtime()*1000000);
I also changed this back [code]$cookiedebug = "0"; From $cookiedebug = "1"; [/code]
blith -- everything is fine with the Module - just the cookie thing needs some tweaks - just turn your Cookies off until you feel comfortable that we have come to a resolution..
Hey guys,
I think I figured out a solution. It will take some more time to evaluate if this is the best solution but it solves the described problems with the Login-block.
Forget what I said about adding lines to your loginblock, instead: remove them.
open modules/Your_Account/index.php
FIND (AND REMOVE):
Code:
// cookiecheck by menelaos dot hetnet dot nl
yacookiecheck();
open modules/Your_Account/includes/mainfileend.php
FIND
The testcookies will now be set everytime a anonymous user visits
your website, and not only when they login through the main Your_Account login screen.
Please try this fix and let me know if it worked for you.
Cheers,
Richard
BTW. Are any of you guys use full-page caching for anonymous users?
Last edited by menelaos61 on Fri Nov 12, 2004 3:25 pm; edited 1 time in total