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.

General Questions

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

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

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


Reply

6 Posts   1695 Views

Avatar
hive.net.au

18 May 2010 at 2:11pm Community Member, 40 Posts

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

Avatar
ram

18 May 2010 at 9:09pm Community Member, 19 Posts

Please look into this

http://www.silverstripe.org/upgrading-silverstripe/show/283703

Regards,
Ram
http://www.agriya.com,http://www.rayzz.net, http://www.anova.tv, http://www.isocial.in, http://www.markit.me

Avatar
SSadmin

24 May 2010 at 11:38am Community Member, 90 Posts

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();
25
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    }
36    
37    /**
38     * Get a cookie variable
39     */

Anyone got any ideas?!
Thanks

Alex

Avatar
ram

25 May 2010 at 4:19pm (Last edited: 25 May 2010 4:20pm), Community Member, 19 Posts

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

Ram

Avatar
pter

12 June 2010 at 1:30pm Community Member, 38 Posts

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.

Avatar
hive.net.au

12 June 2010 at 8:04pm Community Member, 40 Posts

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.