WebsiteMembership Issue

By Perchpole - August 22, 2016

Additionally, if I try to change some of the other user details on the profile page, the backend generates the following:

E_USER_ERROR: setPrefixedCookie: Can't set cookie(loginsession, 9lTOzkTO4EzN0EjOiM3clN2YBR3chxmIsISM5cjM5Y2NjRDOyYjZ3ImYxI2M0MzMkVmY4YWNiJzN4QGNmJDZkFWOkETYoNHJiojIoNXYIRmcvd3czFGciwiIt92YuEWakVWblx2bwh2YyVGcA9mZulmI6ISZtFmbyV2c1Jye), headers already sent! Output started in /homepages/34/path line 527.

Again, the data is being saved, but the profile page refuses to reload.

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