Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik should use Zend's session handling #828

Closed
anonymous-matomo-user opened this issue Jun 25, 2009 · 13 comments
Closed

Piwik should use Zend's session handling #828

anonymous-matomo-user opened this issue Jun 25, 2009 · 13 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

I just tried to use Zend's session namespaces in a plugin, and failed. As it seems, the usage of session_start and of $_SESSION in Piwik prevents plugins from using this.
The attached patch should apply cleanly against 0.4.1, I replaced every occurance of $_SESSION with a new Zend session namespace named after the core component/plugin.
I tested the Installer plugin, should work fine.
Keywords: session handling zend

@robocoder
Copy link
Contributor

Yet you skipped core/Config.php and plugins/Dashboard?

@anonymous-matomo-user
Copy link
Author

my bad, forgot to add plugins/Dashboard to the patch. The comment in core/Config.php has been updated too.

@anonymous-matomo-user
Copy link
Author

Attachment:
session-handling.2.patch

@anonymous-matomo-user
Copy link
Author

Attachment:
session-handling.patch

@robocoder
Copy link
Contributor

Instead of removing session_start(), shouldn't it be replaced with Zend_Session::start()?

@anonymous-matomo-user
Copy link
Author

Look at libs/Zend/Session/Namespace.php, line 116 - it's called by the constructor anyway.

@robocoder
Copy link
Contributor

Right. And Zend_Session is indirectly used by Zend_Auth...

@robocoder
Copy link
Contributor

Ok, committing with some minor changes.

@robocoder
Copy link
Contributor

(In [1276]) Fixes #828 - use Zend_Session / Zend_Session_Namespace

@robocoder
Copy link
Contributor

(In [1286]) refs #828 - fix 'Trying to get property of non-object' error

@robocoder
Copy link
Contributor

PHP 5.2.0 bug causes:

Indirect modification of overloaded property Zend_Session_Namespace::$skipThisStep has no effect
in '/home/hostnser/sd/phpmv/plugins/Installation/Controller.php' at the line 212

Reference: http://framework.zend.com/issues/browse/ZF-1743

@robocoder
Copy link
Contributor

(In [1339]) fixes #885, refs #828 - dispatcher starts/resumes session unless PIWIK_ENABLE_SESSION_START=0

@robocoder
Copy link
Contributor

(In [1348]) fixes #828 - workaround ZF1743 and refactor session handling code

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.4.3 milestone Jul 8, 2014
This was referenced Jul 27, 2009
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants