@robocoder opened this Issue on December 19th 2010 Contributor

We need a quick fix until #1279 is addressed.

Reported in our German forum http://forum.piwik.org/read.php?5,63321 (and reproduceable locally), when using php-cgi, the script fails immediately:

exception 'Zend_Session_Exception' with message 'Session must be started before any output has been sent to the browser; 
output started in /0' in /kunden/.../webroots/ssl/piwik/libs/Zend/Session.php:454 
Stack trace: <a href='/0'>#0</a> /kunden/.../webroots/ssl/piwik/core/Session.php(81): Zend_Session::start() 
<a href='/1'>#1</a> /kunden/.../webroots/ssl/piwik/index.php(51): Piwik_Session::start()

Because Zend_Session throws an exception if session.auto_start = 1, we require session.auto_start = 0.

Calling simply session_start(), I get the following (but not when session.auto_start = 1):

Warning:  session_start() [function.session-start: Cannot send session cookie - headers already sent in - on line 1

Warning:  session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at -:1) in - on line 1
@robocoder commented on December 19th 2010 Contributor

(In [3468]) fixes #1901, refs #1592 - we can't use mock objects because of static method calls, so the wrappers around Zend_Session and Zend_Session_Namespace dummy initialize when executing from php-cli or headless php-cgi; this also addresses the hack by Parallels in their APS scripts

This Issue was closed on December 19th 2010
Powered by GitHub Issue Mirror