with the patch below, the 1.x configuration:
AddType application/x-httpd-php .php

will also work with 2.0, without the extra config that is currently
required:
    <IfModule sapi_apache2.c>
        <Files *.php>
            SetOutputFilter PHP
            SetInputFilter PHP
        </Files>
    </IfModule>

Index: sapi/apache2filter/sapi_apache2.c
===================================================================
RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v
retrieving revision 1.48
diff -u -r1.48 sapi_apache2.c
--- sapi/apache2filter/sapi_apache2.c   19 Aug 2001 21:07:50 -0000      1.48
+++ sapi/apache2filter/sapi_apache2.c   20 Aug 2001 04:40:19 -0000
@@ -417,9 +417,19 @@
        php_apache_register_module();
 }
 
+static void php_insert_filter(request_rec *r)
+{
+       if (r->content_type &&
+           strcmp(r->content_type, "application/x-httpd-php") == 0) {
+               ap_add_output_filter("PHP", NULL, r, r->connection);
+               ap_add_input_filter("PHP", NULL, r, r->connection);
+       }
+}
+
 static void php_register_hook(apr_pool_t *p)
 {
        ap_hook_child_init(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
+       ap_hook_insert_filter(php_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
        ap_register_output_filter("PHP", php_output_filter, AP_FTYPE_CONTENT);
        ap_register_input_filter("PHP", php_input_filter, AP_FTYPE_CONTENT);
 }


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to