PHP 4.0 Bug #6205: "Parse error:" pages are cached

From: Date: Thu, 17 Aug 2000 00:23:37 +0000
Subject: PHP 4.0 Bug #6205: "Parse error:" pages are cached
Groups: php.dev 
Request: Send a blank email to php-dev+get-29195@lists.php.net to get a copy of this message
From: ahmad@bitbuilder.com Operating system: NT4 PHP version: 4.0.1pl2 PHP Bug Type: Other Bug description: "Parse error:" pages are cached 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

« previous php.dev (#29195) next »