phpbb 2.0.3 shows blank page unless UA string contains "compatible"



Tech Evangelism Graveyard
English US
16 years ago
3 years ago


(Reporter: James Graham, Assigned: Susie Wyshak)




(Whiteboard: [fixed in phpBB 2.0.4], URL)



16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021204
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021204

(See also where this was
first reported)

The site displays a blank page with source
<html><body></body></html>. Spoofing the user agent to anything containing the
word 'compatible' (as found in the MSIE UA string) causes the site to display as
expected, with the full source seen.

Reproducible: Always

Steps to Reproduce:
1.Load URL with standard User Agent - page and source are blank
2.Add word "compatible" to UA string - page works as expected

Actual Results:  
Page display depends in an unexpected way on the conent of the UA string.

Expected Results:  
The exact content of the UA string should not matter.

Page appears to work in lynx / links which AFAIK do not contain the word
"compatible" in the UA string.

The mozillazine thread show one person able to access the site without
apparently having the magic string - but I have found the problem here to be
100% reproducable.

Javascript / cookies settings do not make any obvious difference.

Comment 1

16 years ago
-> TE.
Component: Browser-General → US General
Ever confirmed: true
Product: Browser → Tech Evangelism
Version: Trunk → unspecified

Comment 2

16 years ago
I'm not sure this is a TE issue. Using Web Sniffer
shows the same page source when using any UA string - suggesting that the page
is not just parsing the header and feeding nothing back to mozilla. (see the
forum thread linked above for more information) I would guess this should be
either Networking, some subcateogry of networking, or Parser. However, I don't
know enough about the problem to guess which (or if indeed, it isn't some other

Moving bug to networking for now (I should have done this initially), since it
should be more visible to people who have better ideas than I of the issues
involved. Apologies if this does turn out to be an evangelism issue.
Component: US General → Networking
Product: Tech Evangelism → Browser
Version: unspecified → Trunk

Comment 3

16 years ago
I can confirm this strange "compatible" dependant behaviour. If I visit the site
with Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021126, I get a
blank page. If I just add "compatible" to the UA string so that it now reads
Mozilla/5.0 (compatible; Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021126,
Mozilla renders the page fine.

The already mentioned Web Sniffer as well as tests with Opera 7 using different
UAs that do or do not contain the string "compatible" don't show any indication
of a server-side browser sniffer. With these tools/applications the page source
gets delivered completely.

Using a self-written script that acts as a proxy between server and browser,
showing the HTTP traffic in a console, it seems as if Mozilla prematurely closes
the connection halfway during the transfer of the page. I don't have the
slightest clue how this behaviour could depend on the user agent string.

Comment 4

16 years ago
Based on the cookie that wants to set as I load the page, this website is a
phpBB2 'frontpage.'
Version 2.0.3 of phpBB introduced a test in page_header.php:
&& strstr($HTTP_USER_AGENT,'compatible') - based on a similar problem at a
private phpbb forum I visit, this test causes the entire problem.

This issue was recently reported in phpbb bug tracking database, however,
although they're aware of the problem, it's still marked as unconfirmed.
Summary: - blank page unless UA string contains "compatible" → - blank page unless UA string contains "compatible" - (due to phpbb?)

Comment 5

16 years ago
Faking my USER_AGENT string I see the page is indeed a phpbb website, and indeed
version 2.0.3 Moving back to Tech Evangelism, updating summary and setting
severity to major as phpbb is one of the largest free message boards out there.
Severity: normal → major
Component: Networking → US General
Product: Browser → Tech Evangelism
Summary: - blank page unless UA string contains "compatible" - (due to phpbb?) → phpbb 2.0.3 shows blank page unless UA string contains "compatible"
Version: Trunk → unspecified

Comment 6

16 years ago
hmm, I doubt Asa is the right owner of a Tech Evangelism bug - sorry for the spam.
Assignee: asa → susiew
QA Contact: asa → zach
The problem is that if the UA does not contain the word "compatible" and the
agent sent a accept-encoding: gzip, the server will send back a content-encoding
header that says the content is gzip encoded, but it really is NOT encoded.

When the UA contains the word "compatible", the server will correctly send
compressed content.

You can easily check this with lynx using the -trace and -useragent
options with different useragent settings.

Comment 8

16 years ago
For reference purposes, Mozilla failing to display anything here is bug 184144.
However, I think that there is still a phpBB problem, so this bug should remain
open until that is fixed.

Comment 9

16 years ago
This bug has been fixed in phpBB CVS.

In my case it only occured with new PHP versions (where $HTTP_USER_AGENT) wasn't
available and when submitting a page (for instance moving a topic or working
with the admin).

Anyway, the pageheader files in both /includes/ and /admin/ have been altered to
change this behaviour.

BTW I'm one of the phpBB developer (
The mentioned phpBB bug (#1065) has been closed. This fix should be included in
phpBB 2.0.4

Comment 10

16 years ago
Thanks Bart! Is January a good time frame for the next release?

James, can you contact the site dnbscene and ask them to upgrade to the phpbb
2.0.4 when it is available? Thanks!
Target Milestone: --- → Jan

Comment 11

16 years ago
I hope we can release it quite a bit sooner. There are also some security fixes
in phpBB 2.0.4 (most of the are XSS related).

BTW this is all that has been changed with respect to this bug:

*** 35,41 ****
  	$phpver = phpversion();
! 	if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
  		if ( extension_loaded('zlib') )
--- 35,43 ----
  	$phpver = phpversion();
! 	$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ?
! 	if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') ||
strstr($useragent,'Gecko') ) )
  		if ( extension_loaded('zlib') )

Comment 12

16 years ago
(Apologies in advance for commenting here, but the phpbb bugs don't allow
outsiders to comment :( - which is also why I had to get Niji to link to this bug.) 
Bart, far be it for me to go and tell you how to solve this problem (not at all
knowing the phpbb code), but won't this solution just cause problems again for
the next gzip-supporting browser that comes along? I can imagine for example
Konqueror running into the exact same troubles...
I don't know what the original reason was to do user_agent filtering for MSIE,
but I'd be very hesitant of doing ever more filtering...

Comment 13

16 years ago now works. I guess they've upgraded to the latest source. I'm
leaving this bug open at the moment (until phpBB 2.0.4 is released), since other
sites will probably also suffer from the reported problem. If people feel this
bug should, in fact, be closed, please feel free to do so.


15 years ago
Whiteboard: [fixed in CVS and upcoming phpBB 2.0.4]

Comment 14

15 years ago
phpBB 2.0.4 has been released on Jan 16th.
Last Resolved: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in CVS and upcoming phpBB 2.0.4] → [fixed in phpBB 2.0.4]
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.