Forum Moderators: phranque
AddType application/x-httpd-php .htmOptions +Includes +ExecCGI
XBitHack on
<IfModule mod_php4.c>
php_value auto_prepend_file "/usr/home/dmh/WWW/mri/php/pausebots/pausebots.php"
</IfModule>
Embedded PHP in my html files was executed and all was well. I then tried to make use of the zlib php module so that all my .htm pages were compressed if the client could handle it by adding these line:
AddHandler compress .htm
Action compress /php/compress.php
It worked! Most of my .htm pages are about one-third of their original size when they are served.
BUT...here is the problem: php within the .htm file is no longer executed. Can anyone shed any light?
Thanks
Dave Higgins
So I assume the compression (via that handler) is occurring before the server parses the htm files for php.
Is there any way of making the server parse the files first before the handler takes effect?
Thanks
Dave Higgins
PS
What if the "parse .htm as php" instruction to the server could be made within my compress.php file, before compression is started? Is this possible?
Should I take that question to a PHP forum? :)
php_value auto_prepend_file "/usr/home/dmh/WWW/mri/php/compress.php"
ob_start("ob_gzhandler");. The AddHandler removed the effect of the first AddType line, so it was no use. By getting the server to add the php to any files it parses as php (I think it only does this to parsed files), it then (of course) parses them, and all my php is executed.
Dave Higgins