Home > Talk > help! cookie error prevents new pages
I just installed wiky blog and I can't post anything or login because I keep getting this error: "Warning Cookies are required to continue. Refresh if you have cookies enabled."
I have cookies enabled and I refresh and it won't let me do anything!
- Thank you for reporting this, I had a little trouble figuring out the problem at first but I believe I've found the problem... is the url for your site something like http://something versus http://something.com (note the .com on the second example). Cookies, as you were experiencing, weren't being set correctly for urls similar to the first example. The problem has been fixed and will be included in the next release. You can make an immediate fix by replacing the file /include/tool/session.php with this updated file.
- Thanks again for reporting this problem and sorry for the trouble, --Josh
Hi there
I have the same problem with WikyBlog 1.6.1.2
When I will login with my admin-account I become only the message
- You are logged in as [admin].
- Your session has expired.
Is it still a bug or did I something wrong?
I also tried to install the session.php from above post. but there is no change.
THX, dk
- Sorry for the slow respnse dk, but while I was able to reproduce the first issue (and resolve it), I haven't been able to reproduce yours. Is your site accessible via the internet where I would be able to test it myself? --Josh
- I found the "logged in ... session has expired" bug. It's been fixed for the next release of WikyBlog. Sorry for the delay. --Josh
Hi, I am experiencing the same but with another cause. Since my provider blocks port 80, I am running my webserver on port :81 [1]. Whenever I try to login I get a Warning: Cookies are required to continue. Refresh this page if you have cookies enabled. Can Wiky be run on another port?
- The :81 does create a bit of a problem for the current set of code. Try replacing the generateDomain() function in /include/tool/session.php with the following.
-
function generateDomain(){
$pos = strpos($_SERVER['HTTP_HOST'],':');
if( $pos !== false){
$dom = substr($_SERVER['HTTP_HOST'],0,$pos);
}else{
$dom = $_SERVER['HTTP_HOST'];
}
$parts = explode('.',$dom);
if( count($parts) > 2 ){
array_shift($parts); //just take off the first one
}elseif( count($parts) < 2){ //not enough parts, just use defaults
return '';
}
return '.'.implode('.',$parts);
}
- --Josh
I am having the same issue. I am running on a localhost and the URL is 192.168.0.6/IT. I get the same "Warning: Cookies are required to continue. Refresh this page if you have cookies enabled." Thanks
- Ok, yeah, I was able to recreate that issue which help me see quite clearly why that doesn't work.. I'll have a fix for it in the next release, but you can easily get it working correctly in your installation by modifying you /wiki.php file. For your case, add the following line:
-
$wbCookieDomain = '192.168.0.6';
- Thanks for reporting this! --Josh
For the record: I had the same problem (running on nickedwards.me.uk/logbook). I added the line
$wbCookieDomain = 'nickedwards.me.uk';
to my wiki.php, and all is fine now :-)