Session Invalidated - several logouts and errors on environment with changing ips
Permalink
Hello everyone
We have a cutomer where the ip changes very often because of a proxy. So we see these errors in the logs:
This causes in unexpected logouts and sometimes problems on saving things. I did some research and found out that we could write some configuration for this in /application/config/concrete.php - but am unsure how exactly I should do this. Because it doesn't seem to work. I have done this:
Reference:
https://www.concrete5.org/community/forums/installation/concrete5-on...
Can anyone help me out how to indicate the two known ips correctly?
best regards, Roland
We have a cutomer where the ip changes very often because of a proxy. So we see these errors in the logs:
Session Invalidated. Session IP "123.45.6.789" did not match provided IP "123.45.6.788".
This causes in unexpected logouts and sometimes problems on saving things. I did some research and found out that we could write some configuration for this in /application/config/concrete.php - but am unsure how exactly I should do this. Because it doesn't seem to work. I have done this:
Reference:
https://www.concrete5.org/community/forums/installation/concrete5-on...
Can anyone help me out how to indicate the two known ips correctly?
best regards, Roland
By the way, the [] array syntax only works with PHP 5.4+ (corrected by @A3020)
If your version is less than 5.4 you would need to change
to this
Let us know how it goes -John
If your version is less than 5.4 you would need to change
'ips' => ['123.45.6.788', '123.45.6.789']
to this
'ips' => array('123.45.6.788', '123.45.6.789')
Let us know how it goes -John
PS. Short array syntax has been added in PHP 5.4 (http://php.net/manual/en/migration54.new-features.php)
Oops, you are correct. I quickly added that reply thinking it could be a PHP versions issue. Post modified...
Thanks for the correction! -John
Thanks for the correction! -John
Thanks a lot for your information! We did the settings today and only added the trusted ip's. So we will check if the logout behaviour stops now.
best regards, Roland
best regards, Roland
You should probably disable all caching, make the change, then restore your cache settings after that.
It would be really nice if some netmask or range syntax was available, like 123.45.6.*