Function drupal_environment_initialize() from bootstrap.inc is setting this session variable:

ini_set('session.cache_limiter', 'none');

According to PHP documentation, valid options are:

  • public
  • private_no_expire
  • private
  • nocache

There's no such 'none' parameter. The appropriate setting seems to be:

ini_set('session.cache_limiter', 'nocache');
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Priority: Normal » Minor

This is by design: we want to disable the cache limiter here. That said, it would be better to use an empty string instead of the invalid 'none' string.

Damien Tournoud’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Novice

Needs to be fixed in Drupal 8 first. This is a novice patch.

barbi’s picture

Assigned: Unassigned » barbi
Status: Active » Needs review
FileSize
526 bytes
derjochenmeyer’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

Dries’s picture

Note sure this is better. At least 'none' was self-explanatory. DamZ, care to clarify?

chx’s picture

It doesnt matter. I tried to ask PHP internals http://news.php.net/php.internals/55781 as long as you send a string that does not have a predefined meaning it will send nothing.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Could we document this behaviour in the code comment a bit more?

Zgear’s picture

Ok I gave this a shot since it looks relatively easy.

chx’s picture

Thanks but it's not really the guidelines... the behaviour is , there are strings with predefined meaning and if we set it to anything else, nothing will be sent. "// Use a string without a predefined meaning to avoid PHP sending the session limited" in other words what php does is

if (isset($headers['cache_limiter'])) send_headers($headers['cache_limiter']);
xjm’s picture

Hi @barbi,

Thanks for taking this on. Are you still working on this issue? If not, we'll unassign it in a day or two so that someone else can give it a try. (Feel free to assign it back to yourself if you'd still like to work on it, as well.) Thanks!

xjm’s picture

Assigned: barbi » Unassigned

Putting it back in the queue.

crazyrohila’s picture

Status: Needs work » Needs review
FileSize
635 bytes

As Per chx said in #10, created a patch this .

xjm’s picture

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

Thanks @crazyrohila! A couple things I noticed with the new comment:

+++ b/core/includes/bootstrap.incundefined
@@ -572,7 +572,8 @@ function drupal_environment_initialize() {
+  // Use a string without a predefined meaning to avoid PHP sending the session limited

Inline comments should wrap at 80 characters or less, and end with a period. Also, this comment is a little confusing; can we re-word it to be more clear? (I realize this is what chx said originally.)

Also, I think this backports.

crazyrohila’s picture

Status: Needs work » Needs review
FileSize
612 bytes

Made Some Changes, as I think that is a 'empty string' or null, not 'string without predefined meaning' .

xjm’s picture

Status: Needs review » Needs work

Thanks @crazyrohila. I still don't know what "PHP sending the session limited" means, though (it sounds like poetry), and the comment still needs a period. Ideally we would explain a little more. Also, I guess it would be "an empty string". Thanks!

eiriksm’s picture

Status: Needs work » Needs review
FileSize
603 bytes

Hello. Hope I am not hijacking anyone's issue here, but since there was no activity I took a shot at this. Nice and easy issue to start with on core.

Simplified the inline comment a bit, hopefully it explains things correctly.

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Alright, I think that comment does the trick. Thanks @eiriksm.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

I believe I committed this yesterday but forget to update the 'Status' field.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pjcdawkins’s picture

Version: 8.x-dev » 7.x-dev
Status: Closed (fixed) » Needs review
FileSize
591 bytes

Patch attached for backport.

(minor issue, but it caused me some confusion when debugging something)

parthipanramesh’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Looks fine. The latest patch does solve the issue.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.