Browser tries to download page instead of showing it

General project discussion. NOT for help questions.
Post Reply
domexxiu

Browser tries to download page instead of showing it

Post by domexxiu »

I faced some problems with CMS Made Simple version <=1.2.3 - my browser (usually Firefox) tried to download index.php instead of showing the real content. This problem occured quite often, but not on every page load. And usually while using Album-module. I checked out headers web server was sending (with Firefox Live HTTP headers plugin) and noticed that Album-module was not sending Content-type for the image or page. And all content was compressed.

So my educated guess was that browser couldn't decide what to do with this content and opened download-dialog. Then I noticed that my web server had zlib compression turned on. I turned it off, and everything worked just fine after that.

So, if you have this kind of problems, add .htaccess to your CMSms root directory and add line:

php_flag zlib.output_compression Off

Or edit your php.ini / virtualhost/httpd.conf directly.

Hope this helps someone :)
Post Reply

Return to “General Discussion”