compression problem and wrong MIMIC - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: compression problem and wrong MIMIC (/showthread.php?tid=22189) |
compression problem and wrong MIMIC - El Forum - 09-01-2009 [eluser]Dennis_gull[/eluser] Hi, My server doesn't allow apache gzip / deflate so I had to compress my php/js/css files with php. However when I turn the option on in the config.php file I will get the below Fatal error when I try to call an ajax function, any ideas why I get this error message? Quote:<b>Fatal error</b>: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in <b>/home/xxxxxx/public_html/system/libraries/Exceptions.php</b> on line <b>160</b><br />All my ajax pages uses a controller + model (no view) so maybe I can turn gzip off in the ajax page, if so how does it work? My second question is quite weired, when I use the RewriteEngine to hide the index.php I will get the wrong MIME type on my only png file which I load from a css file, the below message is shown when I monitor the http traffic in google chrome: Quote:Resource interpreted as image but transferred with MIME type text/plain. This is my .htaccess: Code: RewriteEngine on so if I comment out line 2 and 3 the MIMI type will work as it should, from what I see png files shouldn't get affected by the above code... compression problem and wrong MIMIC - El Forum - 09-01-2009 [eluser]pistolPete[/eluser] [quote author="Dennis_gull" date="1251816982"] any ideas why I get this error message?[/quote] Just read the comment above the setting: Code: /* ... You could use a very simple view like this: ajax_view.php Code: <?php ajax_controller.php Code: <?php compression problem and wrong MIMIC - El Forum - 09-01-2009 [eluser]Dennis_gull[/eluser] I didn't think about reading the comment above the option Thanks for pointing this out.. Any ideas on the second issue? compression problem and wrong MIMIC - El Forum - 09-01-2009 [eluser]John_Betong[/eluser] [quote author="Dennis_gull" date="1251845707"]I didn't think about reading the comment above the option Thanks for pointing this out.. Any ideas on the second issue?[/quote] For your first point I stumbled upon this code from some knowledgeable code/poster. It solved one of my problems: Code: if (LOCALHOST) // DO NOT compress $result |