WebsiteMembership Issue

By Perchpole - August 22, 2016

Hello, All -

I recently updated one of my sites to CMSB 3.05. At the same time i also updated WSM. However, I've noticed a few glitches which aren't working with my old code set-up.

When a user changes there password on the Profile page, the data is saved but the profile page refuses to reload. Additonally, an error message is logged in the backend:

E_USER_ERROR: setPrefixedCookie: Can't set cookie(lastUrl, http://www.website.org/profile?num=11), headers already sent!

Clearly there is some kind of conflict going on but I'm not sure where.

:0/

Perch

By Daryl - August 23, 2016

Hi Perch,

Functions that send or modify the headers, ie: setcookie() which is called by setPrefixedCookie(), should be executed first before displaying any output.

So I'd check if the setPrefixedCookie() code is called before anything that displays an output.

PS: Check out this StackOverflow thread that discusses the same error for more details: http://stackoverflow.com/a/8028987

Hope this helps!

Thanks,

Daryl Maximo
PHP Programmer - interactivetools.com

By Perchpole - August 24, 2016

Thanks Daryl -

I think I've pinned down the issue. It's sometimes easy to forget just what qualifies as "output" before the header is called.

The link to Stackoverflow is really useful.

:0)

Perch