Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 输出筛选器在Linux/apache2下不工作_Php_Apache_Filter - Fatal编程技术网

Php 输出筛选器在Linux/apache2下不工作

Php 输出筛选器在Linux/apache2下不工作,php,apache,filter,Php,Apache,Filter,我想在linux、apache2和php上使用mod_ext_filter/ExtFilterDefine/SetOutputFilter 我已启用mod_ext_过滤器模块,并将以下行添加到apache2.conf: ExtFilterDefine my_filter_name mode=output intype=text/html cmd="/var/www/html/test/my_filter.php" SetOutputFilter my_filter_name 我在my_fil

我想在linux、apache2和php上使用mod_ext_filter/ExtFilterDefine/SetOutputFilter

我已启用mod_ext_过滤器模块,并将以下行添加到apache2.conf:

ExtFilterDefine my_filter_name mode=output intype=text/html cmd="/var/www/html/test/my_filter.php"

SetOutputFilter my_filter_name
我在my_filter.php中尝试了以下简单内容:

1) xyz
2) <?php echo“xyz”?>
3) <?php读取文件(“php://stdin"); ? >

它们都不起作用,当我调用一个简单的html或php文件时,浏览器中会出现空的html页面

error.log不显示任何内容

所有这些都是在Windows下工作的

系统为:
Ubuntu 14.04.1
Apache/2.4.7
PHP 5.5.9

如果我删除这一行:

SetOutputFilter my_filter_name
然后页面就可以正常工作了

这里有什么问题?为什么它在Windows下工作而不是在Linux下工作


我认为有一些配置错误,但我找不到。

我在回答我自己的问题: 如果我改变这一点:

ExtFilterDefine my_filter_name mode=output intype=text/html cmd="/var/www/html/test/my_filter.php"
致:


然后它就起作用了。

我在回答我自己的问题: 如果我改变这一点:

ExtFilterDefine my_filter_name mode=output intype=text/html cmd="/var/www/html/test/my_filter.php"
致:

然后它就起作用了