View Issue Details

IDProjectCategoryView StatusLast Update
0003058mantisbtbugtrackerpublic2003-12-13 04:41
Reportereborn Assigned Tojfitzell  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Summary0003058: Clicking on view_all_bug_page.php results in 'file download' popup
Description

I am using Mantis 0.18.0a3 in combination with PHP 4.3.1 and Apache 1.3.27. My client is IE 6.0 on WinXP SP1.

Every time I click on 'View bugs' I get a 'file download' popup. It looks like the webserver doesn't recognize the file as a php script. I have no problems with the rest of the system.

TagsNo tags attached.

Activities

eborn

eborn

2003-03-15 12:34

reporter   ~0003987

I have the obgzhandler enabled for PHP, so all the pages are automatically gzipped when send. When I disabble the ob_gzhandler in the php.ini file everything works fine!

When I click on the page in Mozilla I get a page full with wierd characters.

jfitzell

jfitzell

2003-03-15 22:35

reporter   ~0003989

This is not a mantis bug directly. The problem is that you have compression enabled in mantis which uses ob_gzhandler() in it's output buffer and also in the php.ini file. This is a known problem in PHP which causes the data to be compressed twice but it is only decompressed once by the browser. It then gets binary data, I presume, and offers to download it.

Your immediate fix would be to disable Mantis' compression, but I am just about to commit some code that should check if you have it enabled elsewhere and if so, disable it automatically. I would love it if you could grab the latests CVS code and see if it fixes the problem for you. If it doesn't, I think we'll look at disabling our compression by default.

jfitzell

jfitzell

2003-03-15 22:47

reporter   ~0003990

hmm... actually maybe I'm wrong... I just tested this and PHP catches the fact that I have both compression methods enabled and just gives a warning.

Well, perhaps you could try the new code anyway and see if it helps... if not maybe we can track it down more.

eborn

eborn

2003-03-15 22:58

reporter   ~0003991

I checked out the CVS version, but your assumption was right: it still sees the page as a binary file. And as you noted, when I set g_compress_html to OFF the problem is resolved.

eborn

eborn

2003-03-15 23:03

reporter   ~0003992

A 'quick and dirty' fix would be to add

get_cfg_var("output_handler") != "ob_gzhandler" &&

as line 30 in compress_api.php. That works for me.

jfitzell

jfitzell

2003-03-15 23:10

reporter   ~0003993

he he... that's actually the fix I made but I got distracted by an email and hadn't committed it yet.

It's committed now. Could you just double check that my code still solves it for you and then I'll mark this resolve.

eborn

eborn

2003-03-15 23:19

reporter   ~0003994

Ah :) Well, it still works like a charm, so you can put it to resolved!

jfitzell

jfitzell

2003-03-15 23:57

reporter   ~0003995

in CVS