i fixed the problem.
I added a second extension to be parsed by PHP, so I could use one for images and one for text/html:
AddType application/x-httpd-php .php .gd
then I copied the recommended settings out of the apache manual and added gd to the list of extenions:
SetEnvIfNoCase Request_URI \
.(?:gif|jpe?g|png|gd)$ no-gzip dont-vary
i can't find any other way to do it, but this seems as good a way as any. It also allows me to distinguish between PHP generated images and text when I analyse my logfiles which is nice.
murphy
PS i tried the MIME type thing, but apache seems to treat all PHP as whatever the default MIME type in the php.ini is, anyone correct me here! and sending a content-type header didn't seem to change this.