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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 11:01:32 2025 UTC