Could setcookie in PHP lead to many Set-Cookie headers?

I am debugging a problem with the Magento system.

The problem is the duplicate Set-Cookie header, for example:

Set-Cookie: flimmit_session=search-0c30086b812519b006aa27ef4f37f15b-24; path=/; domain=.flimmit.com; httponly
Set-Cookie: flimmit_session=search-0c30086b812519b006aa27ef4f37f15b-24; path=/; domain=.flimmit.com; httponly

A cookie is set using the php setcookie command. My question is whether misuse of this function can lead to duplication of the Set-Cookie header, or should I look for an error elsewhere ...

+5
source share
1 answer

Yes, calling setcookie()twice with the same data will result in 2 identical headers Set-Cookie:. I just tried, and it is.

, cookie , setcookie()...

+6

All Articles