Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1327995
Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic.
Closed 10 years ago.
Improve this questionApparently a lot of people complain that they only see random letters and characters:
My biggest problem is that I can't reproduce the problem on ANY of my devices! Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn't matter which browser I'm using. The only time I see the problem myself is when I try to share one of my blog posts on Google+, because the blog description then appears in strange characters.
So, first of all I need to find a way to reproduce the problem somehow. Otherwise I won't be able to see if what I did fixed the problem or not.
I did everything that @toscho recommended, but nothing helped.
Did anybody ever run into a similar problem or would you know where I could start to look for the problem?
Edit: I contacted my webhost. They couldn't reproduce the problem, just like me. They said that they have enabled gzip compression on their servers. They suggested turning off one plugin after another to see what happens, but as I can't reproduce the problem, I can't do that. Please help!
More and more readers are complaining about this problem. Most of them just need to refresh the page or wait a few minutes and then the site loads normally, but I'm still using a lot of traffic because of that.
EDIT 2: The W3 Total Cache Plugin FAQ says: I see garbage characters instead of the normal web site, what's going on here?
If a theme or it's files use the call php_flush() or function flush() that will interfere with the plugins normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.
I am pretty sure that none of my code has this call anywhere, but I'm not 100% sure. Is there any way to find out other than searching through millions of characters in all of my files?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic.
Closed 10 years ago.
Improve this questionApparently a lot of people complain that they only see random letters and characters:
My biggest problem is that I can't reproduce the problem on ANY of my devices! Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn't matter which browser I'm using. The only time I see the problem myself is when I try to share one of my blog posts on Google+, because the blog description then appears in strange characters.
So, first of all I need to find a way to reproduce the problem somehow. Otherwise I won't be able to see if what I did fixed the problem or not.
I did everything that @toscho recommended, but nothing helped.
Did anybody ever run into a similar problem or would you know where I could start to look for the problem?
Edit: I contacted my webhost. They couldn't reproduce the problem, just like me. They said that they have enabled gzip compression on their servers. They suggested turning off one plugin after another to see what happens, but as I can't reproduce the problem, I can't do that. Please help!
More and more readers are complaining about this problem. Most of them just need to refresh the page or wait a few minutes and then the site loads normally, but I'm still using a lot of traffic because of that.
EDIT 2: The W3 Total Cache Plugin FAQ says: I see garbage characters instead of the normal web site, what's going on here?
If a theme or it's files use the call php_flush() or function flush() that will interfere with the plugins normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.
I am pretty sure that none of my code has this call anywhere, but I'm not 100% sure. Is there any way to find out other than searching through millions of characters in all of my files?
Share Improve this question edited Jul 20, 2020 at 18:19 Peyman Zakhire 33 bronze badges asked Jul 23, 2012 at 2:03 japanwormjapanworm 5873 gold badges19 silver badges40 bronze badges 5- Ignore the markup, that’s only relevant when the page is saved to the local file system or when the server doesn’t send the correct HTTP header. An URL to a page where this happens could help. – fuxia ♦ Commented Jul 23, 2012 at 5:36
- You send the content gzip encoded but the gzip file is invalid. Turn off gzip compression and add the details to your question about how you turned it on. – fuxia ♦ Commented Jul 23, 2012 at 6:14
- 1 Hm, looks like it is gzip encoded twice. See this discussion for something similar. – fuxia ♦ Commented Jul 23, 2012 at 6:20
- I use a plugin called "W3 Total Cache". Within this plugin I turned off the following option: "Enable HTTP (gzip) compression ". Could you see if the problem you mentioned still persists? Thank you. – japanworm Commented Jul 23, 2012 at 6:34
- It works now as expected. I’ll write an answer with more details … – fuxia ♦ Commented Jul 23, 2012 at 6:38
3 Answers
Reset to default 8Let’s start with the output we got before the fix:
What happened here? My guess: a collision between the plugin W3 Total Cache and your web server LiteSpeed. I found a thread in a Drupal forum about a very similar (or the same) issue.
LiteSpeed seems not to send the appropriate HTTP headers for the compressed cache files W3TC stores. In its changelog for version 0.9.2.4 W3TC says:
Fixed LiteSpeed web server support
So the issue seems to be known, and an upgrade should fix it.
If the upgrade did not help …
- Ask your web hoster. You pay for support, and nobody knows the internals better.
Or add …
AddType application/x-gzip .gz .tgz AddEncoding x-gzip .gz .tgz
… to your .htaccess to see if it helps.
- Or turn gzip compression off in W3TC. That is the last option if all the other approaches fail.
To test the results, do not rely on browser output. All browsers use different workarounds for broken compression, you cannot work with that. Use a tool like GIDZipTest to see if everything is okay.
This happened to me because I had two plugins trying to GZip compress the output. Disabling the second plugin fixed the problem.
Always specify the encoding used for an HTML or XML page. If you don't, characters in your content may be incorrectly interpreted. Look inside your header file to specify English and UTF-8 settings. Here's whats in my header:
<html xmlns="http://www.w3/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
本文标签: errorsstrange characters in wordpress website displayed for visitors
版权声明:本文标题:errors - strange characters in wordpress website displayed for visitors 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742246733a2439991.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论