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)

1
vote
1answer
91 views

Unable to login to services due to session cookies not being passed in

This has been driving me nuts for days. I have an html5 app which logs the user into drupal via services 3.11 but I am unable to connect. Using the Chrome Postman plugin I can connect as expected. ...
0
votes
0answers
24 views

Cannot login possibly due to drupal cookies

Today I got a very strange problem which is that I cannot login even if with correct username and password, It always notifies that 'you are not authorized ...' even if I logged in as admin. I did a ...
0
votes
1answer
64 views

How can I modify the 'has_js' cookie?

I am trying to modify the 'has_js' cookie that is set by Drupal. I need to modify this cookie so it becomes both Http-only and secure in response to a site security review. I attempted to add the ...
0
votes
1answer
112 views

How to configure EU cookie compliance module for only Google Analytics

I have installed and configured the EU cookie compliance module, but it only displays the message when I log into admin section. I use Google Analytics and I must show the message for all the site. ...
1
vote
1answer
64 views

How can I use cookies on Webform?

I'm using Drupal 7 and Webform and I want, remember input texts on next submissions for registered users. How can I do it?
0
votes
1answer
84 views

Drupal refuses to read/check cookie for anonymous users

I currently have a module which creates a welcome overlay upon a user's first visit, This should work by utilizing a jquery created cookie and showing the overlay based on its existence. The jquery ...
1
vote
0answers
59 views

How can i have a SimpleNews signup form as modal/lightbox

Is it possible to have the Simplenews sign up form block as a modal - I'd like to present people to the signup a bit more visible than a static block. Would i be possible to present the modal when ...
0
votes
1answer
156 views

Services 3 Session authentication CSRF Validation with Persistent Log in

I am trying to use Services 7.x-3.11, the latest stable available to authenticate and access Drupal 7.34. Accessing from mobile devices with Native coding. I want to keep the user authenticated ...
0
votes
2answers
56 views

How to use cookies in Drupal? [duplicate]

I am writing a module that allows users to put comment on each paragraph. So in my module I have added a new field to comment table called "paragraph_id" and I have also added a new field to comment ...
2
votes
1answer
80 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
506 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
65 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
304 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
128 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
771 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
75 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 ...
3
votes
1answer
336 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
234 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
72 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
65 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
40 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
108 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
170 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
90 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
121 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
45 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
107 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
580 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
473 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
202 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
93 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 ...
1
vote
2answers
1k 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 ...
1
vote
3answers
1k views

Access denied for admin user after new drupal 6 install [closed]

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
12 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
1k 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
40 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
86 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
489 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
976 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
244 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
1k 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 ...
1
vote
2answers
735 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
370 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
141 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
61 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
730 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
437 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
164 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 ...