http://domena.pl
http://sklep.domena.pl
http://www.domena.pl
We wszystkich podserwisach chciałbym aby sesja była widoczna i gdy użytkownik zaloguje się w jednym z nich - jego konto będzie widoczne we wszystkich pozostałych.
W pliku bootstrap.php mam zapis:
<?php Zend_Loader::loadClass('Zend_Session'); Zend_Session::start(); $session = new Zend_Session_Namespace('Default'); ?>
A we wszystkich kontrolerach:
<?php try { $this->session = new Zend_Session_Namespace('Default'); } catch (Zend_Session_Exception $e) { error($e->getMessage()); } ?>
Ktoś miał podobną sytuację lub wie jak to rozwiązać?
EDIT:
configuration.xml
<?xml version="1.0"?> <configuration> <session> <cookie_domain>.domena.pl</cookie_domain> </session> </configuration>
bootstrap.php
<?php // Configuration Zend_Loader::loadClass('Zend_Config_Xml'); $config = new Zend_Config_Xml('configuration.xml'); // Session Zend_Loader::loadClass('Zend_Session'); Zend_Session::setOptions($config->session->toArray()); ?>
Brakuje przycisku "Pomógł" dla samego siebie.
