php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19831 Apache caches PHP scripts with changed contents
Submitted: 2002-10-09 05:35 UTC Modified: 2002-10-09 08:50 UTC
From: wolf at blazingangles dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.2.3 OS: RedHat Linux 8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wolf at blazingangles dot com
New email:
PHP Version: OS:

 

 [2002-10-09 05:35 UTC] wolf at blazingangles dot com
A "clean" installation of Apache 2.0.40, PHP 4.2.3, and MySQL 3.23.52 (all of them installed as RPMs, with the necessary mod_* RPMs in place, too) produced the following error in the following situation:

A PHP script reads data from the MySQL database. This data changes quite often, meaning that the PHP script's HTML output is going to differ on virtually every execution of the PHP script. Nonetheless, Apache 2.0.40 appears to cache the PHP script, sometimes presenting the user with very old data. I'd imagine that the Apache server should somehow be instructed that the PHP script's output has changed since the last call of the PHP script.

Degrading to the only RPMs I had of Apache and PHP (Apache 1.3.23 and PHP 4.1.2) solved the problem, but this is obviously not an ideal solution.

Others have experienced this error, too, and some have suggested workarounds such as described at http://makeashorterlink.com/?J2F112D02 . This workaround is not always possible, however.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-09 08:50 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The caching of output data is generally done by the browser. Unless the webserver is specifically instructed to send headers that data is unchaged and should be cached. You can test this by manually connecting (via telnet) to the webserver and requesting the page. If all the times you've connected you get a HTTP/1.0 200 or HTTP/1.1 200 header, then caching is entirely the fault of your browser.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 09:01:27 2024 UTC