"Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts" "Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts"
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

"Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts"

Started by demmel, November 16, 2016, 10:47:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

demmel

Hi,

I've installed CM v1.5.20 to demmel.com/cm
As the normally to be used www.demmel.com is our company's website running Contao CMS, I have a little problem when entering demmel.com/cm only, as Contao tries to interprete a sub-folder with 2 digits as a language information (although demmel.com/cm does not contain anything regarding Contao), so I need to enter demmel.com/cm/index.php instead.

To avoid this I've created a subdomain pics.demmel.com pointing to demmel.com/cm to bypass the problem with needing to add the index.php file.
This works fine, but I'm unable to log in now, as I get the message "Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts" (Caution: your browser does not support cookies of this script) and log in is not possible. Logging in under demmel.com/cm/index.php is still possible.

Any idea how to fix this issue ??

Best regards
Herbert Demmel

gmc

By default when cookies are set - they are limited to the subdomain that set them - and won't be passed to other subdomains.
Because you are 'crossing' subdomains - the cookie by default isn't going to be shared.

CPG has a config setting that should allow you to override this behavior.
Login using the real URL (adding the index.php).
In config - expand the 'Cookie Settings' and set the 'Cookie path'.
In your case I would expect it should be 'demmel.com' (without quotes) - which will allow the cookie to be sent to www and pics subdomains (and any others).

I haven't tested this value - incorrect values will prevent you from logging in. 
You can reset the value directly in the database with SQL like:
UPDATE `cpg_config` SET `value` = '/' WHERE `name` = 'cookie_path';
(change 'cpg_' to your cpg table prefix.)

A reference to how php sets cookies:
http://php.net/manual/en/function.setcookie.php
The value of 'cookie_path' is sent as the domain name.

As an alternative - you could actually move the gallery to the 'pics' subdomain - rather than pointing across to www.
This would confine the use of the cookie to the pics subdomain - and the default CPG value of '/' for cookie_path will work.
(The same subdomain would be setting and using the cookie).
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money