Title: Scriptrunner (Doug Sparling)'s Replies - page 5 | WordPress.org

---

# Scriptrunner (Doug Sparling)

  [  ](https://wordpress.org/support/users/scriptrunner/)

 *   [Profile](https://wordpress.org/support/users/scriptrunner/)
 *   [Topics Started](https://wordpress.org/support/users/scriptrunner/topics/)
 *   [Replies Created](https://wordpress.org/support/users/scriptrunner/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/scriptrunner/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/scriptrunner/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/scriptrunner/engagements/)
 *   [Favorites](https://wordpress.org/support/users/scriptrunner/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 61 through 75 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/scriptrunner/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/scriptrunner/replies/page/6/?output_format=md)…
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/6/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [PHP 5.4 Update Breaks My Website](https://wordpress.org/support/topic/php-54-update-breaks-my-website/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/php-54-update-breaks-my-website/#post-4336508)
 * I’ve moved a few sites to PHP 5.4 on BlueHost, and the only issue I ran into 
   was plugins using PHP [call-time pass-by-reference](http://www.php.net/manual/en/language.references.pass.php),
   which was deprecated in PHP 5.3 and removed in PHP 5.4.
 * The easiest way to track this down is testing your site in PHP 5.4 locally or
   a test machine and setting WP_DEBUG to true. PHP 5.4 will not effect WordPress
   itself in anyway, but any plugins/themes using call time pass by reference will
   cause a fatal error.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to make my feeds update in RSS reders?](https://wordpress.org/support/topic/how-to-make-my-feeds-update-in-rss-reders/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/how-to-make-my-feeds-update-in-rss-reders/#post-4337852)
 * Have you checked `Settings->Reading`?
 * Specifically, the option to show number of posts in your feed:
 * >  Syndication feeds show the most recent
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/7/#post-4307435)
 * [@adamelmer](https://wordpress.org/support/users/adamelmer/) – this is starting
   to venture into needing to start a new thread, but I’ll go ahead and give you
   a couple of suggestions none the less.
 * It sounds like you have a plugin that’s not compatible with WordPress 3.7.1. 
   So, try:
 * 1) Turn on WP_DEBUG and/or look in your server error logs. Besides the “Cookies
   are blocked or not supported” that’s displayed on the login page, do you see 
   any errors with debugging turned on? (and most likely, they’ll be “headers already
   sent”)
 * 2) Rename your plugin folder like you were doing, but add a single plugin back
   at a time to your new empty plugin folder and go through the logout/login process
   until you find the plugin that’s causing the issue. Or alternatively, do what
   you’re doing now, except deactivate all your plugins before logging out.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307422)
 * [@esmi](https://wordpress.org/support/users/esmi/) – you’re welcome!
 * Also, one more bit of information. If someone says they get the
 * >  ERROR: Cookies are blocked or not supported by your browser. You must enable
   > cookies to use WordPress.
 * message the first time they try to login, and then they can login successfully
   the second time, that’s a sure sign that a proxy is deleting cookies on `GET`
   requests. WordPress (`wp-login.php`) will also run the same code to set the test
   cookie on a `POST` but it can’t read the cookie until the next request. (in this
   case, a second login form post)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307417)
 * OK, thanks to [@jgjh151](https://wordpress.org/support/users/jgjh151/) sharing
   his Varnish config file, I think I’ve got this mystery solved.
 * So…it is definitely an issue with Varnish configuration, but, something also 
   did change in WordPress 3.7, but it was a bug fix. So due to a bug in `wp-login.
   php` in pre-WordPress 3.7, an incorrect configuration in Varnish did not cause
   any issues with WordPress because the bug in WordPress caused `wp-login.php` 
   to not actually check the test cookie.
 * Here’s the line in Varnish config that’s causing the issue:
 *     ```
       if ( (!(req.url ~ "(wp-(login|admin)|login)")) || (req.request == "GET") ) {
       ```
   
 * It needs to be:
 *     ```
       if ( (!(req.url ~ "(wp-(login|admin)|login)")) ) {
       ```
   
 * Now for the quick explanation. In WordPress 3.6.1 (and earlier I assume), the`
   req.request == "GET"` part of Varnish config was preventing `wp-login.php` from
   writing the test cookie when the form was loaded (called with a `GET`), but the
   code that checked if the test cookie was actually set (when `wp-login.php` called
   via a `POST`) never ran if the user’s credentials were good. That is, on the 
   form post, if the user authenticated properly, then the user was redirected to
   wp-admin without this code being run:
 *     ```
       if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
       ```
   
 * In WordPress 3.7, this bug in `wp-login.php` was fixed, moving the redirect to
   wp-admin on successful login *after* the cookie check code above. So now the 
   cookie check is actually run. So if Varnish is deleting the test cookie on `GET`
   request to the `wp-login.php`, this won’t prevent a login with WordPress 3.6.1
   or older, but now that WordPress is actually checking for the test cookie, it
   will fails the cookie check as it should.
 * So even though something did change in WordPress, it’s due to misconfiguration
   of Varnish. (and any other proxy/caching server I imagine)
 * To use Varnish with WordPress, at least Varnish 3, it’s best to follow the sample
   template here:
 * [Varnish 3.0 templates](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates)–
   WordPress, Drupal, Joomla and Fork CMS VCL templates
 * And specifically for WordPress:
 * [fetch/wordpress.vcl](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/fetch/wordpress.vcl)
   
   [receive/wordpress.vcl](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/receive/wordpress.vcl)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307413)
 * [@jgjh151](https://wordpress.org/support/users/jgjh151/) – would you mind either
   posting your Varnish config file(s) or sending them to me (dougsparling at gmail
   dot com). I’m still baffled how Varnish would cause 3.7.1 to fail, yet pre-3.7.1
   would work.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307410)
 * [@esmi](https://wordpress.org/support/users/esmi/) – in the case of [@willem](https://wordpress.org/support/users/willem/).
   deboer it looks like he’s coming through a proxy server as well, but no sure 
   it’s Varnish:
 * >  Via: 1.1 W0211, 1.1 W020
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307409)
 * [@esmi](https://wordpress.org/support/users/esmi/)
 * Default Varnish config is OK. (everything is basically commented out) I am going
   to experiment by uncommenting more of what’s in the default config file.
 * I added the WordPress specific config from these templates to my Varnish config,
   and everything worked ok:
 * [https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/fetch/wordpress.vcl](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/fetch/wordpress.vcl)
 * [https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/receive/wordpress.vcl](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/receive/wordpress.vcl)
 * If I change
 *     ```
       if (!(req.url ~ "wp-(login|admin)")) {
           unset beresp.http.set-cookie;
       }
       ```
   
 * to
 *     ```
       if (!(req.url ~ "wp-admin")) {
           unset beresp.http.set-cookie;
       }
       ```
   
 * Then I get the cookies not supported error message on WordPress 3.7.1 because
   now Varnish is unsetting the test cookie from wp-login.php. But…by doing this
   I can’t login to WordPress 3.6.1 either, I just don’t get the message, (in both
   cases the testcookie is not set) though I stay on wp-login.php, just no error
   message.
 * I’m not seeing an obvious way to configure Varnish in a way that it would break
   WordPress 3.7.1 but not effect previous versions of WordPress.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/6/#post-4307406)
 * I doubt it’s PHP. (and I’ve tested on PHP 5.2.x, 5.3.x, 5.4.x, and 5.5.x – all
   good) Since JavaScript runs client side, no surprise that cookies can be set 
   that way. It all points to server configuration/environment, with proxy server
   definitely a possibility.
 * In all the testing I’ve done, the only way I’ve gotten the cookie to not set 
   properly is by modifying my Varnish config.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307393)
 * Here’s what I get as far as varnish goes (on the response):
 *     ```
       X-Varnish: 827414583 827414582
       Age: 83
       Via: 1.1 varnish
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307392)
 * I’m still able to login by after removing:
 *     ```
       <input type="hidden" name="testcookie" value="1" />
       ```
   
 * but then again, I’m not having any trouble with it either. I would be very curious
   what’s in the server error log if you can get access to it or the engineer can
   get you a copy.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307391)
 * [@willem](https://wordpress.org/support/users/willem/).deboer – When I get a 
   chance, I’ll double check that testcookie hidden variable. I saw a post on BuddyPress
   where that was removed so it would work with WordPress. As far as I can tell,
   all it does is remove the check if test cookie exists, and things should work
   as normal. Does WP_DEBUG show anything? Otherwise, it would be nice to know what’s
   showing up in the server error log.
 * As far as the headers, “Via” is used in both http request and response headers
   to show which proxy servers request/response went through. Whether it’s Varnish,
   I don’t know. I could see what I get back on my local test install, but it’ll
   have to be a bit later today.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307387)
 * I downloaded fresh archive versions of 3.5, 3.6, 3.6.1, 3.7, and 3.7.1. What 
   I did notice is that wp-login.php did not change between 3.7 and 3.7.1. 3.5-3.6.1,
   wp-login.php sets the test cookies in the same way as it does in 3.7+, but the
   code dealing with logic for a missing test cookie is somewhat different between
   pre-3.7 and 3.7+.
 * I’ve been guessing too much, but it seems that nothing in 3.7/3.7.1 has changed
   in regard to setting of the test cookie when first hitting wp-login.php. You 
   might try removing:
 *     ```
       <input type="hidden" name="testcookie" value="1" />
       ```
   
 * as that should disable the test cookie check on form submission.
 * As I said, for now I’m going to bow out of any more troubleshooting suggestions,
   at least until I discover something substantial. It seems to be an environment
   issue of some sort. I run a dozen or so sites using three different hosting companies
   and have yet to have any problem, which is the opposite of your situation.
 * I’m back in work mode, so I’ll have lest time to devote this issue. If I discovering
   something tangible, I’ll let you know.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307380)
 * It would be this:
 *     ```
       sub vcl_fetch {
           # Drop any cookies WordPress (except for wp-login/wp-admin) tries to send back to the client.
           if (!(req.url ~ "wp-(login|admin)")) {
               unset beresp.http.set-cookie;
           }
       }
       ```
   
 * But that configuration works, and deleting out the if will make it fail for all
   recent versions of WordPress, not just 3.7.1.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: ["Cookies are blocked or not supported" since update to 3.7.1](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cookies-are-blocked-or-not-supported-since-update-to-371/page/5/#post-4307379)
 * OK, curiosity got the best of me and I installed Varnish.
 * Actually, it’s [conf.d/fetch/wordpress.vcl](https://github.com/mattiasgeniar/varnish-3.0-configuration-templates/blob/master/conf.d/fetch/wordpress.vcl)
 * By doing this:
 *     ```
       #if (!(req.url ~ "wp-(login|admin)")) {
           unset beresp.http.set-cookie;
       #}
       ```
   
 * I can stop the testcookie from being set and I get the “Cookies are blocked or
   not supported” error. However, that gives me the error on WordPress, at least
   back to 3.6.1, and if I uncomment the if statement, it works on 3.7.1. So yes,
   Varnish can cause the issue, but it doesn’t seem to be 3.7.1 specific. (but once
   again, it could depends
    on configuration)
 * So I’m bowing out this thread…I can duplicate it, but I’m not sure my results
   mean much.

Viewing 15 replies - 61 through 75 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/scriptrunner/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/scriptrunner/replies/page/6/?output_format=md)…
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/6/?output_format=md)