php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6205 "Parse error:" pages are cached
Submitted: 2000-08-16 20:23 UTC Modified: 2000-12-18 11:29 UTC
From: ahmad at bitbuilder dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.0 OS: NT4
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: ahmad at bitbuilder dot com
New email:
PHP Version: OS:

 

 [2000-08-16 20:23 UTC] ahmad at bitbuilder dot com
Problem:
Working on a non-cachable (using header("Expires: 0"); et. al. ) php file, when you make a mistake (forgot the ; for example) the "Parse error: ..." response is sent back. This response does not have the HTTP headers that mark it as non-cachable.

IE, will keep that page in cache and it associates this page with the url. So every time I hit that page it get the cached "Parse error:..." page even though I fixed the error. The user is forced to hit the refresh button to see the real page.

Solution:
PHP errors that do not give a chance for any HTTP headers to be sent back ( i.e. "Parse error:.. ") should send back the response with HTTP cache headers set to expire the page right away. In other words, they should always send header("Expires: 0"); 

Take care :)
Ahmad

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-08 18:52 UTC] sniper@php.net
Is this still happening with PHP4.0.3pl1 ? I can not reproduce this..

--Jani
 [2000-12-07 12:08 UTC] sniper@php.net
Actually, this does happen always to me too.

--Jani

 [2000-12-18 11:29 UTC] sniper@php.net
This can of course be avoided (and should be also done on production servers) by setting the display_errors = off
in php.ini. 

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC