php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48237 Documentation needs clarification
Submitted: 2009-05-11 17:07 UTC Modified: 2009-06-21 20:20 UTC
From: dlo at rottentomatoes dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dlo at rottentomatoes dot com
New email:
PHP Version: OS:

 

 [2009-05-11 17:07 UTC] dlo at rottentomatoes dot com
Description:
------------
The session_start() documentation does not state that it sets the Cache-Control, Expires, and Pragma headers.

While this is probably proper behavior for 99% of the sites out there, the documentation should at least notify the programmer that these headers are being sent.

Source URL: http://us2.php.net/function.session-start


Reproduce code:
---------------
NA

Expected result:
----------------
session_start() will send the following http headers:

Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

These headers are set to insure that information generated for a unique user will not be cached by a proxy or the user's browser.

The usage of session_start() implies user customized data.

See: 

* http://us2.php.net/manual/en/function.session-cache-limiter.php 
* http://us2.php.net/manual/en/function.session-cache-expire.php

For further info on adjusting these headers.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-21 20:20 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 06:00:02 2026 UTC