Undefined index: force_ssl_login

Hi,

Right now, when I login to my self hosted piwik installation I have a yellow background block of text like this :


There is an error. Please report the message (Piwik 2.1.0) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Notice: Undefined index: force_ssl_login in /data/www/piwik/plugins/LoginLdap/Controller.php on line 753 

Backtrace -->

#0 Piwik\Error::errorHandler(...) called at [/data/www/piwik/plugins/LoginLdap/Controller.php:753]
#1 Piwik\Plugins\LoginLdap\Controller->checkForceSslLogin(...) called at [/data/www/piwik/plugins/LoginLdap/Controller.php:344]
#2 Piwik\Plugins\LoginLdap\Controller->login(...) called at [/data/www/piwik/plugins/LoginLdap/LoginLdap.php:95]
#3 Piwik\Plugins\LoginLdap\LoginLdap->noAccess(...) called at [:]
#4 call_user_func_array(...) called at [/data/www/piwik/core/EventDispatcher.php:98]
#5 Piwik\EventDispatcher->postEvent(...) called at [/data/www/piwik/core/Piwik.php:778]
#6 Piwik\Piwik::postEvent(...) called at [/data/www/piwik/core/FrontController.php:96]
#7 Piwik\FrontController->dispatch(...) called at [/data/www/piwik/core/dispatch.php:30]
#8 require_once(...) called at [/data/www/piwik/index.php:47]

OS : RedHat 5.4 x86_64
Apache : 2.2.22
Php : 5.3.7
MySql : 5.5.25
Piwik : 2.1.0 installed in a apache’s vhost with LDAP plugin

Do you have any idea of the origin ?
Thanks

This setting has been replace by force_ssl = 1 - but be careful, look at the description before activating!

; If set to 1, Piwik will automatically redirect all http:// requests to https://
; If SSL / https is not correctly configured on the server, this will break Piwik
; If you set this to 1, and your SSL configuration breaks later on, you can always edit this back to 0
; it is recommended for security reasons to always use Piwik over https
force_ssl = 0

Ho, Thanks a lot but …
I haven’t activated (and I don’t want to activate) the ssl feature.

In my installation I want to use http (only) and authenticate user to a LDAP server working with ldap (not ldaps)

Thomas

Ok, then you probably didn’t update the globals.ini.php file in the config folder. Please replace it with the one from the Download-Archive.

EDIT
Oh, I probably only read the first charakters of the error message… :wink:
Seems like the LDAP-Plugin you’re using is not yet compatible with the newest version. Therefore you have to replace the string on line 753 of “/data/www/piwik/plugins/LoginLdap/Controller.php”: Before: “force_ssl_login”, after: “force_ssl”.

Cheers

Hi,
Seems to solve the problem

I take on me to do the same correction in Controller.php in line #384
as the same keyword appear
was : $view->forceSslLogin = Config::getInstance()->General[‘force_ssl_login’];
new : $view->forceSslLogin = Config::getInstance()->General[‘force_ssl’];

Now no error yellow block appear on my piwik main page

Thanks for your help
Thomas

I followed the instructions in the post above, and changed “force_ssl_login” to “force_ssl”, and I too no longer get the yellow error message box. At this point I am able to search for users in the LDAP directory, and clicking “Load User from LDAP” in the LDAP Users Settings seems to work ok. However, when I (or anyone else) attempts to login with our AD credentials, it throws the “Form security failed” message. Did you encounter this? If so, what did you do to resolve it?

Hi,
No more error message for me (as Administrator or as simple user) even if I clear all cache and history on Firefox …

But … for a new user (new = first time login) there is an error message just after identification form validation - refer to the attached screenshot (sorry it’s in French language).
Error message say that "form security have failed. Please reload form and check that cookies are enabled. If you use a proxy … bla blabla bla blabla …"
In my case cookies are enabled and there is no proxy between piwik server and web browser :-/

Error message is displayed but is no blocking - I mean user is able to access piwik functionnalities

Thomas

Thanks for the response, but I am still stuck at the same place. If I try to login with either

username & password
or
domain\username & password

It keeps throwing the Form Security Failed message. At this point, if I provide a URL that takes me directly to the dashboard or similar, I will get messages about how I don’t have access to that page. I am not sure how to get past this message when using an AD account.

Oh well, I can evaluate Piwik with the basic login, and it sounds like the LDAP developer will soon be releasing a version that works with 2.1.0, so I can wait to see if the next version of the plugin works any better. Thanks for the response.

You are welcome
Good luck in solving your problem

Cheers
Thomas