Tagged Questions

An HTTP cookie is a piece of data stored by the user's web browser. Unless otherwise specified, cookies can be created, read, modified and deleted and modified both by JavaScript and from server-side scripts by reading the headers.

learn more… | top users | synonyms (1)

2
votes
1answer
34 views

What is the best way to tell anonymous users apart?

My company wishes to split their website so that anonymous users are given slightly different sites based on a question when they first visit. I intend to use a cookie to store the answer to the ...
0
votes
0answers
16 views

Set Cookie in response header

I am actually having a strange problem with one of my drupal installations. While I was trying to setup nginx for one of my sites, I ran into an issue that only the frontpage wont get cached. After a ...
0
votes
0answers
29 views

X-Drupal-Cache is missing from HTTP headers

X-Drupal-Cache seems to be missing from HTTP headers. The funny thing is that, when I cleared my cookies, it reappears twice: once with a "MISS" and then with a "HIT". After that, X-Drupal-Cache ...
0
votes
0answers
36 views

Sessions / Cookies not working for user login, registration or shopping cart

The Problem One of our sites has recently broken. Users can't login or register, and the shopping cart isn't working either. Drupal does not display any errors. Upon clicking the submit button for ...
0
votes
0answers
15 views

Why would error / warning / success messages stack up when using a Service?

I have a mobile app that uses Drupal as an API. As you navigate the site everything works as normal with appropriate messages on errors, warnings, and successful form submissions. After doing that a ...
1
vote
2answers
85 views

Anonymous User gets cookie

I recently saw that when I open of my sites as a anonymous user, a session cookie is set. I checked the database sessions table, and there is a line for uid 0 as well. How can I prevent drupal from ...
1
vote
1answer
39 views

bypassing cookies in varnish [closed]

As explained in https://www.varnish-cache.org/docs/3.0/tutorial/cookies.html I am trying to " Cookies from the client For a lot of web application it makes sense to completely disregard the cookies ...
2
votes
1answer
125 views

How to implement cookieless (sub-) domain with Drupal?

Cookieless (sub-) domains are considered beneficial for a number of purposes: They save some network overhead [1], and they are required for certain types of caching [7] (e.g. reverse proxy like ...
1
vote
0answers
91 views

Access Denied when logging in using Safari

When I login to example.com via Safari web browser, I get a message that says "Access Denied. You are not authorized to access this page." I can login properly when using Chrome, Firefox, and ...
0
votes
0answers
29 views

Showing select fields from a webform based on previous submission using cookie or ip tracking

I want to implement the following: 1) I have a from of say 9 fields, which I want the users to fill to download some content. 2) Now I do not want to force the user to fill the complete from at ...
0
votes
0answers
33 views

How can I map FB data to custom account fields using Drupal for Facebook 4.x or 3.x & Drupal 7?

There are many similar sounding questions here, but all are years out of date. I am using "Drupal for Facebook" (https://drupal.org/project/fb) but am open to changes if someone can get the native ...
0
votes
1answer
31 views

uid = 0 for all kinds of users

I want to get the uid of a logged in user in an external php script. I am using: chdir("C:/xampp/htdocs/mywebsite"); require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); ...
0
votes
1answer
72 views

Can't get the authenticated user cookie session to be used when creating a new node via Services 3 endpoint

My application is sending this header to Service 3 endpoint when creating a new node: { 'Cookie': 'SESS255f42d9a87a0df5bf8959d25909fe8c=St8o29NI9Hx84kPo8NuZbpdHWuRgNSS9qy9cQ-QM4rA; expires=Sun, ...
0
votes
1answer
95 views

Show custom query page based on user logged in

I want to make a customized query page based on the user who is logged in. The query page is a node made in custom made content type "query"(this content type has no additional fields than which are ...
0
votes
0answers
41 views

after saving new account change anonymous nodes author with rules or a custom module

My site generates a cookie for anonymous users who create content. I added a rule that copies their cookie value to a text field in the nodes they create I need to do the following with rules or a ...
2
votes
1answer
73 views

Are there any acceptable uses for $_COOKIE['has_js'] outside of core?

Drupal 7 has a cookie called has_js. drupal.js sets this cookie, and it is used by the Batch API and the authorize.php script. There is a rather old issue about this cookie, backport ...
1
vote
0answers
38 views

What is the scope of the drupal session cookie?

I am bootstrapping drupal 7 (using DRUPAL_BOOTSTRAP_FULL) so that I can use drupal's authentication/security features in the rapid development of a web app I'm doing a proof of concept for. (And yes I ...
1
vote
1answer
67 views

google analytics are killed after “cookie control” instalation

I'm new in drupal so I will write as simple as possible. I have installed the "google analytics" (GA) module. I have configured it and it worked. I was able to see live statistics on the GA web-page. ...
1
vote
1answer
318 views

Drupal 7 Webform Cookies

I have a Drupal 7 website that has many downloads, each utilizing the same webform. I would like it when an anonymous user downloads once, then goes to another download (same webform, different ...
0
votes
1answer
1k views

How do I access Session variables in Drupal that were set on non-drupal pages?

If I go print_r($_SESSION) on a drupal page (say mysite.com/ )I only get Session variables set from drupal pages (which are none atm). I can set new ones and they'll show up. Array ( ) However If ...
0
votes
1answer
261 views

Where does Drupal 7 clear my custom set cookies and how do I stop this?

I have parts of my website that are not controlled by drupal that set cookies. When I access a drupal-run page, my cookies get cleared. I tried to investigate which script does this by placing ...
0
votes
1answer
110 views

Caching pages with boost based on a cookie value

I have a Drupal website where a part of each page varies depending on the value of a certain cookie. In order to use Boost in this situation, I was thinking of rewriting the cookie value into a query ...
1
vote
0answers
73 views

How to remain logged in when switching languages via domain Drupal 7

I've got a site which will run in different languages. The language is determined based on the language domain, and the site will thus exists as example.com, example.de, example.fr, example.co.uk and ...
0
votes
0answers
78 views

jQuery Injector, jQuery, and cookies - only working for Admin

I have a function that I am using using the js injector module to set cookies so that I can access them at a later stage (function($) { $(window).on('load', function(){ ...
0
votes
2answers
714 views

Android to Drupal Submission : [CSRF Validation Failed] while using a cookie

The Drupal Version is 7 and the Services version is 3.4. So, My login into Drupal goes like this: Fetch a token. (POST) Fetch a Cookie using the token. (POST) Make GET Requests using ...
0
votes
1answer
826 views

Access denied for admin user after new drupal 6 install

I just installed Drupal 6 (Don't ask why) from a fresh install (Version 6.29). I followed the install steps, created an admin user, set the correct time zone, etc. But when I login and attempt to ...
0
votes
0answers
11 views

Cross domain cookie for same Drupal installation [duplicate]

The English translation of my Drupal installation runs on MYSITE.com and my German translation runs on MYSITE.de. Of course, I want my users to be able to switch languages without having to log in ...
2
votes
1answer
720 views

jquery.cookie.js is loaded only for authenticated users, by jQuery update module

jquery.cookie.js is loaded only for authenticated users and i cannot really figure out why. The page caching is disabled. Any thoughts?
-2
votes
1answer
32 views

cookie is being stored as different value [closed]

I have the following code: if(isset($ret["token"])) { drupal_set_message("TOKEN: " . $ret["token"]); user_cookie_save(array("my_token"=>$ret["token"])); drupal_set_message("KEY: " . ...
1
vote
1answer
79 views

Session cookie prevents pages to load

There is a problem with Drupal 6 site. It seems seesion cookie is preventing some pages to load. Site has approximately 5 to 10 pages (out of 30 000) of difference content types which can't be ...
4
votes
1answer
375 views

Additional Configuration to disable anonymous session cookies?

I am running a clean install of Pressflow 6.28. I have set the following configurations: Cache Mode: Normal; Min Cache Lifetime: 5 minutes; Page Cache Max Age: 1 day; I have installed no contributed ...
0
votes
2answers
619 views

Persistent session cookies: remember session even after closing the browser

I would like to store anonymous users $_SESSION in a cookie so that their cart and other custom information is still available even after closing the browser. I found this interesting post which ...
0
votes
0answers
177 views

Check cookies are enabled in hook_boot: cookies disabled issue

In my hook_boot I am checking cookies are enabled via the following code: function my_module_boot() { if(!isset($_COOKIE['my_cookie'])) { // set a test cookie setcookie('my_cookie', ...
3
votes
1answer
978 views

Services - Creating a node with php curl client returns 401 error - X-CSRF token always empty

A recent update to Services and Drupal requires a csrf token, and it broke the php curl client samples. I am trying the sample code for Services to create a node here ...
3
votes
1answer
1k views

Setting $cookie_domain variable for specific folder structure

During configuration of Ckeditor I have to setup the cookie domain variable. I have added my site in subfolder like www.example.com/mynewsitefolder, where www.example.com is my current and running ...
0
votes
2answers
416 views

Cookies change when I navigate to another page (Using jquery cookie)

For example, the user can change the font size, and it is remembered in the cookies. Say I am on the product page and change the font size there and add the cookie. Everything looks fine, but when I ...
0
votes
2answers
196 views

Easy way to add EU cookie notification to multiple Drupal websites?

I have 20+ Drupal sites that I have to add Cookie notifs to. Is there an easy/batch/automated way to do it?
0
votes
1answer
120 views

Store anonymous user selection temporarily until registration

I want to let my first time visitors to first select a city, which will control what they see in my site, so it should be stored where I can see it everywhere (views, search and when posting content) ...
0
votes
1answer
56 views

how to use cookie to protect other node pages in Drupal

some bots are grabbing my site's content everyday,I confirm if I set cookie protection the bots will not work again. My question is how to use cookie to protect my content? if someone has no cookie ...
0
votes
1answer
571 views

COOKIE['session_api_session'] not working in drupal 7

I have a simple module to use the flag module base on the session api. This was working in drupal 6 (and another section working for logged in users), i changed the syntax for drupal 7 (remove ...
0
votes
0answers
358 views

My $_SESSION array in drupal 7 is empty after login

I tried to view the $_SESSION and $_COOKIE details by print_r ing those two arrays But my session array is empty before and after login. I wrote the code in template.php file. But the user is ...
1
vote
1answer
137 views

hook_boot and Varnish

I have a module that implements a hook_boot(), and it checks if user is going to access home page and if user does not have a specific cookie. If both verifications are true, it redirects user to a ...
2
votes
1answer
704 views

Session variables and page cache

My drupal site uses normal cache system, as you'll probably know, the cache_page table is updated using as primary key the REQUEST_URI. This is great because when an anonymous user requests a page, ...
2
votes
1answer
675 views

How to save the URL of anonymous user on a webform?

Using Webform 7.x-3.18, I'd like to save the referring URL of an anonymous visitor on a webform. I added some code to MYTHEME__preprocess_page() in template.php to save the info as a cookie: ...
3
votes
1answer
500 views

is there a way to find out which quicktab tab is active?

I would like to know which tab is active so I can set it to default until another tab is active then that will be set to default my problem is that I cant seem to find a way to see which tab is ...
0
votes
1answer
149 views

how do you add a cookie policy to the site so it appears when a user arrives? [duplicate]

Possible Duplicate: eu cookie compliance I think this is now a legal requirement in the uk so I want to add one but I have not been able to find a module to do it. Has anyone found one or ...
0
votes
1answer
138 views

Single Sign On using PURL domain modifier and different TLDs

I have an organic groups implementation using purl and spaces to set the active space when you visit a domain modifier such as example1.org vs example2.org. The cookie domains are different, so I'm ...
1
vote
2answers
398 views

How to access cookies in Views PHP Code filter?

I have a view that will display nearby locations. The center coordinates would come from a cookie (lat,lng). I am trying to get the cookie with $_COOKIE, but I get an error saying that it is not ...
1
vote
1answer
890 views

User session and https

I've got a few pages on my site that need to be accessed via https. I need to pull some information about the current logged user on those pages. The problem is, users log using http mode and the ...
0
votes
2answers
119 views

Equivalent of OnSessionStart for drupal

I am looking for the equivalent or at least a way to run a snippet of code only when the session starts and at now other time do i want this code run. Can anyone help me with this? Ive looked around ...