错误,当移动Yii的样板项目从Windows到Linux的 [英] Error When Moving Yii Boilerplate Project From Windows to Linux

查看:229
本文介绍了错误,当移动Yii的样板项目从Windows到Linux的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出的Yii 项目的Linux版本(CentOS)也改变了文件夹和文件的权限,但访问时,发生错误:

I have Moved Yii project from Windows to Linux(Centos) also changed folder and file permission to read and write, But when accessed, an error occured:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster. 

在错误日志:

[Sat Apr 27 14:54:50.753643 2013] [core:alert] [pid 2153] [client ::1:40135] /opt/lampp/htdocs/ehilal/backend/www/.htaccess: FilterProvider takes three arguments, filter-name provider-name match-expression

的.htaccess 部分的声明 FilterProvider

<IfModule filter_module>
  FilterDeclare   COMPRESS
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  FilterChain     COMPRESS
  FilterProtocol  COMPRESS  change=yes;byteranges=no
</IfModule>

如何解决? 谢谢你,

How to fix it? Thanks,

推荐答案

该过滤器提供指令从httpd的2.2改为:

The filter provider directive has changed from httpd 2.2:

Github的问题提出以下修补程序包括在的.htaccess:

This Github issue suggests the following fix to include in the .htaccess:

<IfModule mod_filter.c>                                                   
    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE application/atom+xml \
                                      application/javascript \
                                      application/json \
                                      application/rss+xml \
                                      application/vnd.ms-fontobject \
                                      application/x-font-ttf \
                                      application/xhtml+xml \
                                      application/xml \
                                      font/opentype \
                                      image/svg+xml \
                                      image/x-icon \
                                      text/css \
                                      text/html \
                                      text/plain \
                                      text/x-component \
                                      text/xml
    </IfModule>
</IfModule>

这篇关于错误,当移动Yii的样板项目从Windows到Linux的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆