PHP 4.0 Bug #6205 Updated: "Parse error:" pages are cached
| From: | sniper@php.net | Date: | Mon, 18 Dec 2000 16:29:25 +0000 |
| Subject: | PHP 4.0 Bug #6205 Updated: "Parse error:" pages are cached | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41783@lists.php.net to get a copy of this message | ||
ID: 6205
Updated by: sniper
Reported By: ahmad@bitbuilder.com
Old-Status: Analyzed
Status: Closed
Bug Type: *General Issues
Assigned To:
Comments:
This can of course be avoided (and should be also done on production servers) by setting the
display_errors = off
in php.ini.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-12-07 12:08:43] sniper@php.net
Actually, this does happen always to me too.
--Jani
---------------------------------------------------------------------------
[2000-11-08 18:52:26] sniper@php.net
Is this still happening with PHP4.0.3pl1 ? I can not reproduce this..
--Jani
---------------------------------------------------------------------------
[2000-08-16 20:23:37] ahmad@bitbuilder.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
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6205