php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21449 Caching problem running PHP 4.3.0 as an Apache2 module
Submitted: 2003-01-05 21:21 UTC Modified: 2003-01-07 09:29 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: rgingo at rytek dot info Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.0 OS: Windows 2000 Advanced Server SP3
Private report: No CVE-ID: None
 [2003-01-05 21:21 UTC] rgingo at rytek dot info
After running Apache2 with PHP 4.2.3 as a CGI binary (in a stable configuration) for quite some time, I decided to switch to PHP 4.3.0 and try running PHP as an Apache2 module.  Just to be sure that everything would run smoothly, I installed Apache 2.0.43 to a fresh directory, and configured PHP 4.3.0 to use the php4apache2.dll as per the instructions.  No extenstions were configured to load in the php.ini file.  After testing, I realized that browsers were not reloading the page.  Over 20 clients running different versions of Internet Explorer reported this, and said that changing the "Check for newer versions of stored pages" option did not alleviate the problem.  I tried a PHP script that, when added to a page, would force the content to not be cached to no avail.  The script was:

<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
                                                     // always modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                          // HTTP/1.0
?>


I also tried the PHP script

<?php
session_cache_limiter('nocache');
?>

to no avail.  I checked php.ini and found that nocache was already specified by this line:

session.cache_limiter = nocache

I also tried altering this line:

session.cache_expire = 180

to 0 minutes, but that did not solve the problem.  However, I did try running PHP as a CGI binary, and that eliminated the problem altogether.  I conclude that there is something in running PHP as an Apache2 module that is causing this problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-07 09:04 UTC] lionelenkaoua at chez dot com
I have the same bug with ApachE 2.0.43 and php 4.3.0 on Windows XP pro + SP1.
 [2003-01-07 09:29 UTC] edink@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 11:01:32 2024 UTC