MyBB Community Forums

Full Version: The page is blank using the PHP default function 'gzencode'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I have recently got an strange issue in my forum. The thread page has stopped showing any content and displayed blank screen instead. The issue occurred in Chrome and Safari only, Firefox was loading the page as normal.

I have checked the Chrome console for errors and come to know that there is an error 'net::SPDY_PROTOCOL_ERROR'. 

I have done a lot of research but could not find any solution regarding this error with mybb.

Then I have investigated the issue by reviewing the code and come to know that after disabling the GZIP Compression page started to load as normal and error gone.

However this issue did not affect all the pages of the site, just thread page and one more page was affected.

Now the issue is resolved but I could not get the root cause of this issue, 

I have further investigated the code and come to know that PHP default function is used gzencode() and it is really causing the issue.

So does anybody has any idea why this function failing the page to load??

Please share your thought regarding this, your help in this matter will be highly appreciated.

Thank you
The reason:
Quote:SPDY needs SSL/TLS (Secure Sockets Layer)/(Transport Layer Security) communication security to work. That’s the reason a lot of users encounter this error when visiting secure websites. Some common examples of secure websites with HTTPS pages are YouTube, Google, Gmail etc. But you can also encounter the SPDY error when visiting non-HTTPs websites. These websites use TCP (Transmission Control Protocol). SPDY also supports this protocol and throws the error when a user visits these websites.

When you visit a webpage, your browser sends a request using SPDY protocol. An outdated browser will trigger an old version of SPDY. If the vendor only supports the latest version, your request will result in an error.

Your browser will report an ERR_SPDY_PROTOCOL_ERROR.

Fix For Chrome (and Opera as well):

Open a new tab in Chrome.
Paste "chrome://net-internals/#sockets" into the address bar.
When the page loads find and click on the appeared button labeled "Flush socket pools".
Reload the page that was giving you the error and see if the problem persists.
(2018-07-18, 11:52 AM)effone Wrote: [ -> ]The reason:
Quote:SPDY needs SSL/TLS (Secure Sockets Layer)/(Transport Layer Security) communication security to work. That’s the reason a lot of users encounter this error when visiting secure websites. Some common examples of secure websites with HTTPS pages are YouTube, Google, Gmail etc. But you can also encounter the SPDY error when visiting non-HTTPs websites. These websites use TCP (Transmission Control Protocol). SPDY also supports this protocol and throws the error when a user visits these websites.

When you visit a webpage, your browser sends a request using SPDY protocol. An outdated browser will trigger an old version of SPDY. If the vendor only supports the latest version, your request will result in an error.

Your browser will report an ERR_SPDY_PROTOCOL_ERROR.

Fix For Chrome (and Opera as well):

Open a new tab in Chrome.
Paste "chrome://net-internals/#sockets" into the address bar.
When the page loads find and click on the appeared button labeled "Flush socket pools".
Reload the page that was giving you the error and see if the problem persists.

Many Thanks effone for you detail reply regarding this issue.

However I have tried the fix the issue in chrome that you have suggested above but it did not work for me.

One more thing I need to be cleared is that when I disabled the GZIP Compression in mybb so the page started to work as normal, Can you please explain why it has started to work fine after doing this.

Thank you
I highly doubt there is anything related to gzencode() other than single similarly of their common goal to speed up page load leading to some conflict. SPDY is completely browser protocol related which is designed to load the page faster ensuring web security. Have you checked your header response code for the problematic page? Sometimes that might be the root of your problem as well.

Another interesting thing is SPDY is for webkit and was developed by Google itself. But for repeated vulnerability reports they have now stopped supporting this protocol.

I told you the solution what I have experienced with however there may be any reason among many and the solutions are different accordingly. Such as

Simply restart Chrome
Upgrade Chrome to latest
Clear Cookies and Cache
Enable HTTPS support in your firewall or turn off
Turn off VPN if you are using
Fix corrupted codes throwing wrong header response
Flush Socket Pools
Flush DNS and Renewing IP
Try Incognito mode

... and so on.
I'd probably just leave GZIP Compression off if I was you.
(2018-07-18, 02:41 PM)effone Wrote: [ -> ]I highly doubt there is anything related to gzencode() other than single similarly of their common goal to speed up page load leading to some conflict. SPDY is completely browser protocol related which is designed to load the page faster ensuring web security. Have you checked your header response code for the problematic page? Sometimes that might be the root of your problem as well.

Another interesting thing is SPDY is for webkit and was developed by Google itself. But for repeated vulnerability reports they have now stopped supporting this protocol.

I told you the solution what I have experienced with however there may be any reason among many and the solutions are different accordingly. Such as

Simply restart Chrome
Upgrade Chrome to latest
Clear Cookies and Cache
Enable HTTPS support in your firewall or turn off
Turn off VPN if you are using
Fix corrupted codes throwing wrong header response
Flush Socket Pools
Flush DNS and Renewing IP
Try Incognito mode

... and so on.

Thank you effone for your response.

The issue is that it has affected all users suddenly whom are using Chrome and Safari.

Therefore it seems like something had happened wrong in our server, however we did not deploy anything recently which may cause this issue. The PHP defualt function 'gzencode()' is causing the issue, but why there was sudden change?

Can you please guide me how can I detect 'codes throwing wrong header response'.

@Wires though leaving GZIP Compression off solved the issue but it's not a root cause since things were fine at the point when GZIP was enabled.  

Thank you