Apache的一个错误:[error] an unknown filter was not added: PHP

在apache的日志里经常看到这个错误: [Fri Oct 08 14:49:18 2004] [error] an unknown filter was not added: php [Fri Oct 08 14:49:18 2004] [error] an unknown filter was not added: php [Fri Oct 08 14:49:20 2004] [error] an unknown filter was not added: php [Fri Oct 08 14:49:20 2004] [error] an unknown filter was not added: php [Fri Oct 08 14:49:40 2004] [error] an unknown filter was not added: php 自己的apache的版本是: [root@eygle logs]# apachectl -v Server version: Apache/2.0.49 Server built:   Jun 15 2004 16:55:22 还是自己的经验不够,刚才查了一下,找到了答案:

[25 Mar 2003 1:56pm CET] bugs at pointb dot co dot uk

Hi,

I have re-installed PHP as a DSO module on Apache 2.0.44 and I am unable
to use the new filter options. In v4.3.1 I could use the following:

<Files *.php>
       SetOutputFilter PHP
       SetInputFilter PHP
</Files>

<Files *.phps>
       SetOutputFilter PHP
       SetInputFilter PHP
</Files>

When I use this I am prompted to download the script and I get the
following in my error log:

[error] an unknown filter was not added: PHP

However if I use the older formatting with 4.3.2RC1 all works well:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Is this a bug, or have I missed some documentation that tells me this is
no longer included?

Thanks.

[25 Mar 2003 2:54pm CET] iliaa@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
 and the instructions on how to report
a bug at 

Since 4.3.2RC the default Apache 2 sapi is the apache2handler and is no
longer filter based. Therefor you should use
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and not

<Files *.php>
       SetOutputFilter PHP
       SetInputFilter PHP
</Files>

If you do want to use the old filter sapi, you need to use
--with-apxs2filter option.

[25 Mar 2003 2:55pm CET] iliaa@php.net

read above comment.

原文链接:

http://bugs.php.net/bug.php?id=22881

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏芋道源码1024

注册中心 Eureka 源码解析 —— Eureka-Server 启动(二)之 EurekaBootStrap

本文主要基于 Eureka 1.8.X 版本 1. 概述 2. EurekaBootStrap 2.1 初始化 Eureka-Server 配置环境 2.2 初...

7664
来自专栏容器云生态

使用Dockerfile构建自己的etcd镜像

本篇文章手把手教你如何使用Dockerfile构建自己etcd镜像,并且已经提供基于etcd3.0.10 的image供读者使用,用户可以快速使用docker...

2976
来自专栏杨建荣的学习笔记

rac节点无法启动ORA-29702的问题及分析(70天)

今天在虚拟机上启动rac,发现有一个节点怎么都起不了。另外一个节点没问题。 SQL> startup nomount ORA-29702: error occ...

5746
来自专栏Hongten

How to create a project with Oracle Policy Modeling

This blog is about how to create a project with Oracle Policy Modeling.

752
来自专栏耕耘实录

找回win7桌面IE图标我有绝招

现在很多同学都用了微软的新一代操作系统Windows7,都为Windows7的华丽界面及更人性化得操作所深深吸引,但是由于我们大多数同学都习惯了原来的Windo...

2935
来自专栏Kubernetes

Controlling Access to the Kubernetes API

? API Server Ports and IPs By default the Kubernetes API server serves HTTP o...

2858
来自专栏听雨堂

网页链接打开程序

就像电驴那样: 网页链接地址是 : ed2k:// ¦file ¦Dracula.1992.CE.2AUDIO.DVDRip.DTS.X264.GUEVA...

20810
来自专栏JavaWeb

Spring源码-父子容器

3545
来自专栏10km的专栏

cmake:vs2015/MinGW静态编译leveldb

leveldb是google的开源项目(https://github.com/google/leveldb), 在linux下编译很方便,然而官方版本却没有提供...

5616
来自专栏张善友的专栏

How to Select an Object-Relational Mapping Tool for .NET

The single, most important trap to watch out for when choosing an object-relatio...

1748

扫码关注云+社区

领取腾讯云代金券