Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[User Warning] Cookie 'bypassStaticCache' can't be set. When using DEBUG URL Varibles

Go to End

6 Posts   2335 Views


Community Member, 40 Posts

18 May 2010 at 2:11pm

On any of our 2.4 installations we get the following errors when we try and use ?Showqueries=1 or ?debug=1 it is getting a little frustrating anybody got a solution?

[User Warning] Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 159 in /home/XXXX/public_html/sapphire/dev/Debug.php

GET /products/subcategory/?showqueries=1

Line 33 in /home/XXXX/public_html/sapphire/core/Cookie.php


Community Member, 90 Posts

24 May 2010 at 11:38am

Hey, i have met the same problem with bypassStaticCache on upgrading silverstripe 2.4.
Everything works fine on my local dev model(Wamp server) but met this problem when upload to the live server.

The error message:

[User Warning] Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 33 in /home/clicknz/public_html/ssnew/mysite/code/ToursBrandHolder.php
GET /ssnew/tours/

24 $path = ($path) ? $path : Director::baseURL();
26 // Versions of PHP prior to 5.2 do not support the $httpOnly value
27 if(version_compare(phpversion(), 5.2, '<')) {
28 setcookie($name, $value, $expiry, $path, $domain, $secure);
29 } else {
30 setcookie($name, $value, $expiry, $path, $domain, $secure, $httpOnly);
31 }
32 } else {
33 if(self::$report_errors) user_error("Cookie '$name' can't be set. The site started outputting was content at line $line in $file", E_USER_WARNING);
34 }
35 }
37 /**
38 * Get a cookie variable
39 */

Anyone got any ideas?!



Community Member, 19 Posts

25 May 2010 at 4:19pm

Edited: 25/05/2010 4:20pm

Dont post unwanted, this is not a sponser forums. try to avoid these type of activities



Community Member, 38 Posts

12 June 2010 at 1:30pm

I found similar when moving between two servers - my UniformServer WAMP dev platform and some ISP of unknown settings. It was not version specific - affected both 2.3.7 & 2.4... but only for two modules I had written.

Turns out to be possibly bad php formatting that was possibly ignored by the WAMP but was noticed in many other core modules: the _config.php seems to require no trailing php closer ("?>"). Removing that from my _config.php and all was well. Very odd! Will check any other faulting modules for same in future.


Community Member, 40 Posts

12 June 2010 at 8:04pm

Your on the right path, removing the trailing '?>' avoids accidental output of anything after it such as a space. However I can not find the file causing the file as i suspect his may be the issue.