Fatal error: setPrefixedCookie: Can't set cookie(loginsession
I get this message on any website page after I've logged into CMS Builder 3.11. All pages work fine when not logged in.
After trying for hours to get rid of this error by checking for extra spaces, etc., I finally pasted the "clean" page code from the code generator into my page, but the error persisted.
I'm in the process of downloading 3.12 to see if this helps, or do you know of an issue here?
Does that error show up in the CMS or on the website pages (or both)? And are you using website membership? And did anything change just before those error starting showing up?
Let me know and I'll try and help you get that resolved.
This usually happens when some whitespace or other content has been added to the CMSB files or plugins. This can happen if you upload the files in ASCII mode (and it converts the line-end chars from windows/mac/linux and back and everything gets double spaced). Or if you've got content or whitespace in any of your plugins.
Does the error say "Output started in [file] on [line]"? That would be where it thinks the extra content or whitespace was added.
I'd try re-uploading the CMSB files and ensuring your FTP client is using "Binary Mode" for uploads and/or checking the file/line mentioned in the error.
Hope that helps! Let me know what happens.
There was no white space anywhere in my files and they continued to cause the error, even after updating to the newest CMSB. Finally, after I created a new php page file and copied all of the data from the old page to it it worked. Apparently there was something unseen on my originals. I had to do this with every php page. They are working now - thanks for your help.
By the way, it said the whitespace was on line 1 of my index.php file, even though there was no space visible.
If it's in the viewer page you need check for spaces or returns before the starting PHP tag:
<?php header('Content-type: text/html; charset=utf-8'); ?>
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('','../','../../','../../../');
But if recreating the files worked that's good too.
Glad it's working now!