Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: "Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts"  (Read 10177 times)

0 Members and 1 Guest are viewing this topic.

demmel

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

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
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: "Achtung: Dein Browser akzeptiert nicht die Cookies dieses Skripts"
« Reply #1 on: November 16, 2016, 02:57:34 pm »

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:
Code: [Select]
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).
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.