Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading… - doesn't work with php-cgi #1901

robocoder opened this Issue · 1 comment

1 participant

Anthon Pang
Anthon Pang

We need a quick fix until #1279 is addressed.

Reported in our German forum,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: #0 /kunden/.../webroots/ssl/piwik/core/Session.php(81): Zend_Session::start() 
#1 /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
Anthon Pang

(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

Anthon Pang robocoder added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.