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
votes
0answers
16 views

how to check or uncheck checkbox on click using cookies

I am using a jquery code to check/uncheck checkbox when i am checked checkbox they work good but when i am uncheck checkbox and refresh page they cannot uncheck they show me checkbox is checked. here ...
2
votes
1answer
27 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
44 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
11 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
20 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
24 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
56 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
68 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
26 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
58 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
37 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
46 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
190 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
587 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
149 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
93 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
59 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
61 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
1answer
478 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
627 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
526 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
31 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
73 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 ...
0
votes
0answers
75 views

How to display block by cookies

I wish to create a Ads banner custom block and show it in lightbox, and have it displayed only 1 time in a day on the frontpage, when next day the user browse again, the banner will popup again 1 ...
3
votes
1answer
317 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
0answers
330 views

Passing URL query parameters to menu callback

I'm attempting to save a page's path as a cookie to be recalled later for redirection after being handed back by a third party payment processor. I'm doing this by linking to a custom function with a ...
0
votes
2answers
502 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
139 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
932 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 ...
2
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
355 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
149 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
112 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
53 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
514 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
342 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
128 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
644 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
623 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
439 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
132 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
132 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
370 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
769 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
111 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 ...
2
votes
3answers
502 views

Pressflow 6 forms creating session cookies

We have a Pressflow 6 website behind a Varnish cache but our cache hit-rate is awfully low. I've recently found that stripping the "Cookie" header from requests completely increases the hit-rate to ...
1
vote
1answer
135 views

Where should I add the unique identifier cookie code?

I want to add a unique identifier in a cookie when the user (anonymous or logged) visits the website. Where should I call this code. I tried calling the code in hook_init but that doesn't work on ...
6
votes
2answers
880 views

eu cookie compliance

With the new EU cookie compliance law coming into force Friday (26/05/12), does anyone have any suitable advice for those of us who not only develop in Drupal and other frameworks? I myself have a ...
0
votes
1answer
113 views

Access JavaScript cookie in module file

I am setting a cookie in an external JavaScript file with the current user time. I want this time to be available to the server, so I am retrieving this from a cookie. I am able to fetch the value, ...