Question

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. 

In the error logs:

[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 part that declaring 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,

Was it helpful?

Solution

The filter provider directive has changed from httpd 2.2:

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top