Edit report at https://bugs.php.net/bug.php?id=64357&edit=1

 ID:                 64357
 Updated by:         yohg...@php.net
 Reported by:        abxccd at msn dot com
 Summary:            PHP mangles expires header when
                     session.cache_limiter is used
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Output Control
 Operating System:   Ubuntu 12.10
 PHP Version:        5.4.12
 Block user comment: N
 Private report:     N

 New Comment:

It seems works for PHP 5.5/5.4 cgi SAPI. What SAPI are you using? You can check 
it by using phpinfo() on your server.

$ ./sapi/cgi/php-cgi 
<?php
session_cache_limiter('private');
header('Expires: Wed, 05 Mar 2014 21:25:41');

X-Powered-By: PHP/5.5.1-dev
Expires: Wed, 05 Mar 2014 21:25:41
Content-type: text/html

$ ./sapi/cgi/php-cgi 
<?php
session_cache_limiter('private');
header('Expires: Wed, 05 Mar 2014 21:25:41');

X-Powered-By: PHP/5.4.18-dev
Expires: Wed, 05 Mar 2014 21:25:41
Content-type: text/html


Previous Comments:
------------------------------------------------------------------------
[2013-03-05 10:34:27] abxccd at msn dot com

Description:
------------
If session.cache_limiter in php.ini has any of these values: public, private,  
or nocache, the expires header will be mangled if we try to set one at a later 
stage.

To replication, first, set your session.cache_limiter to private or any of the 
above values, or do it using session_cache_limiter. Then, run the test script. 
Then, inspect the response headers with a tool like FireBug.

Test script:
---------------
<?php
header('Expires: Wed, 05 Mar 2014 21:25:41');

Expected result:
----------------
Content-Type    text/html
Date    Tue, 05 Mar 2013 10:25:42 GMT
Expires Wed, 05 Mar 2014 21:25:41 GMT

Actual result:
--------------
Content-Type    text/html
Date    Tue, 05 Mar 2013 10:30:17 GMT
Expires Thu, 19 Nov 1981 08:52:00 GMT, Wed, 05 Mar 2014 21:25:41 GMT <---- 
Mangled


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64357&edit=1

Reply via email to