symphonycms/symphony-2 — Issue #916: [fixed] Can't login in to admin panel.
Author: casr
Created: 2011-11-28 18:56:00+00:00
State: open

I set up vhosts domains with a general pattern like "www-example.example.com". It would seem (after much frustration on my behalf :) that that the regex pattern for setting the cookie is slightly wrong. The dot after the www hasn't been escaped.

Replace symphony/lib/core/class.session.php at line 109:

return preg_replace('/(^www.|:\d+$)/i', NULL, $_SERVER['HTTP_HOST']);

with:

return preg_replace('/(^www\.|:\d+$)/i', NULL, $_SERVER['HTTP_HOST']);

Now the cookie is set on the right domain (at least for me).