Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Chrome/Safari encoding problem

Started by Muut Archive 11 years ago · 4 replies · 747 views
11 years ago

I'm trying to set up a website using grav and are seeing some strange things.

After setting it up, the webpage in Chrome and Safari is just looks like wrongly encoded mess. However, using firefox or CURL can get current result. I have tried it both locally (a Mac) and remotely (a linux) same result.

Encoding setting (UTF-8) seems right from what I get from CURL. both in the HTTP header and in HTML. Can anyone shed some light on this?

It is a Nginx/HHVM stack if thats matter.

the address is here:

http:// wp.testlifeinuk.com

11 years ago

After some investigation, it seems to do with the content-encoding header.

If I save the page directly from chrome, and then zcat it, I can see the result. Seems that Chrome doesn't unzip it when displaying.

Further investigation shows that the in Chrome, the response header contains both:
Content-Encoding: none
Content-Encoding: gzip

I guess it is the first one that puzzled Chrome.

I'm not quite sure why this happens though. The setting seems working OK with other PHP pages and Wordpress.

Has anyone have a success installation with Nginx/HHVM, without any specific configuration?

11 years ago

I tested a frew more things in the mean time.

  1. still HHVM but change the gzip configuration to true
    -> 500
    E_WARNING - Invalid argument: function: method 'ob_gzhandler' not found

  2. switch to php5-fpm and with the gzip configuration set to true:
    -> 500 didn't show a error message.

  3. still using php5-fpm, and with gzip set to false
    SUCCESS.

So the gzip setting seems problematic with Nginx.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1351 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4063 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago