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

PHP session.cookie_secure causes error when set to true #4384

Closed
DaAwesomeP opened this issue Dec 17, 2013 · 4 comments
Closed

PHP session.cookie_secure causes error when set to true #4384

DaAwesomeP opened this issue Dec 17, 2013 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@DaAwesomeP
Copy link

When I try to setup Piwik, if I have this in my php.ini:

; http://php.net/session.cookie-secure
session.cookie_secure = 1

It causes an error:

Error: it seems you tried to skip a step of the Installation process, or your cookies are disabled, or the Piwik configuration file was already created. 
Make sure your cookies are enabled and go back to the first page of the installation .

Note that the default is set to '0' in the production php.ini example.

Thanks!

Keywords: session,cookie,secure,php,php.ini,setup,config

@anonymous-matomo-user
Copy link

Are you connecting to Piwik over SSL? Your URL should start with "HTTPS://" if you are.

According to the PHP docs:
session.cookie_secure specifies whether cookies should only be sent over secure connections. Defaults to off.

That means that PHP will refuse to send cookies to the browser unless your connection is encrypted.

If by chance you're using a load balancer or other proxy setup where the browser connection is SSL-encrypted to the proxy, but the traffic between the proxy and the Piwik server is not, I can help you with that as well, just let me know. My Skype ID is the same as my username here.

@mattab
Copy link
Member

mattab commented Dec 25, 2013

If you were not using over SSL as @lyndsysimon suggest please reopen the ticket

@DaAwesomeP
Copy link
Author

I am sorry for my inactivity. This must have gotten marked as read in my inbox.

No, I am *not always* using HTTPS and never any tunneling. However, I am able to send cookies from PHP perfectly fine with both HTTP and HTTPS whether the setting is on or off. By "not always", I mean that I currently have both HTTP and HTTPS set up on my Apache server. Some pages on my site need the HTTPS and others do not. I usually use Piwik with HTTP since it is an internal website and I'm not worried about any interceptions.

@mattab
Copy link
Member

mattab commented Mar 16, 2014

If you use PHP configuration with cookie_secure on and Piwik, please also enable force_ssl setting: http://piwik.org/faq/how-to/faq_91/

Otherwise, Piwik by default does not support cookie_secure setting.

@DaAwesomeP DaAwesomeP added this to the 2.2.0 - Piwik 2.2.0 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants