Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 25, 2009 09:34PM

Running WampServer 2.0i [07/11/09] under Windows 7
Includes :
- Apache 2.2.11
- MySQL 5.1.36
- PHP 5.3.0

When any page has a PHP error the page fails as noted in the message subject. I put a deliberate error into a working page forcing the failure after a page with a notice would not run. The error appears in the PHP log, but the page totally fails. I'm used to the error messages showing up on web page and error log. BTW I'm also getting this issue with PHP 5.2.11 which suggests a PHP.ini or apache setting error.

Suggestions anyone?

Thank You
Arn

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 25, 2009 09:43PM

possibly <? instead of <?PHP

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 25, 2009 09:52PM

Thank you for the response, however all of my scripts start with <?PHP

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 25, 2009 10:03PM

what colour is the wamp tray icon?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 25, 2009 11:22PM

It looks like it always does when the WAMP Server is functioning normally and as I mentioned when I remove the intentional php coding error it works. The icon appears to be white, small black square on lower left, smaller black dot on the right, something that resembles a T or an F without the center line in the middle in a black background.



Edited 1 time(s). Last edit at 11/25/2009 11:23PM by arnb.

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 26, 2009 04:41AM

Solved this issue by setting PHP.ini as follows:

output_buffering = Off (versions 5.2.11 and 5.3.0)

Also set the following to enable error logging to a file

error_log = "c:/wamp/logs/php_error.log" (version 5.3.0 already set this way in 5.2.11)



Edited 1 time(s). Last edit at 11/26/2009 04:44AM by arnb.

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 26, 2009 06:23AM

error logging is turned off as it causes a bug with phpinfo()

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 26, 2009 01:22PM

Thank you for that information, however I encountered no apparent issues running phpinfo with PHP 5.3.0 with logging to "c:/wamp/logs/php_error.log.

What is the bug you encountered?

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 26, 2009 04:01PM

i havent. its in the wampserver change log

2.0-i -- 07/11/2009
now using 5.3.0
PECL packages are not included anymore (not available on the PHP website)
now using MySQL 5.1.36
now using phpMyAdmin 3.2.0.1
SQLiteManager is not included anymore, not compatible with PHP 5.3.0
minor bug corrected in the php.ini file
the PHP log file has been desactivated since it creates a bug with the phpinfo() function


as for output buffereing- thats now the default from the php.net team in their production.ini

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 26, 2009 08:58PM

I found the problem is caused by setting output_buffering on or nnnn(4096), running a script with ob_start('ob_gzhandler'), then having PHP throw an error.

My web hosts over the years did not and currently do not use output_buffering by default, so I've coded the ob_start on most of my scripts. I suppose it's time to add a small test checking if output_buffering is on by default prior to issuing the ob_start.

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 26, 2009 09:03PM

ye seems like a plan

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: arnb (---.dyn.optonline.net)
Date: November 27, 2009 03:34AM

Update:
Additional testing indicates this failure occurs only when the PHP error occurs prior to issuing the ob_start('ob_gzhandler'). Moving the ob_start to the beginning of the script cures the problem.

Options: ReplyQuote
Re: Content Encoding Error (Firefox) / Internet Explorer cannot display the webpage IE8)
Posted by: Lectrik (---.lightspeed.stlsmo.sbcglobal.net)
Date: January 02, 2013 01:05AM

arnb Wrote:
-------------------------------------------------------
> Solved this issue by setting PHP.ini as follows:
>
> output_buffering = Off (versions 5.2.11 and
> 5.3.0)


Thank you! This solved my problem. You don't have to directly change php.ini, you can just use the WAMPServer tray icon pulldown for PHP Settings and uncheck output_buffering.

For reference I was having issues using Headway Theme with Wordpress and it was when I was trying to look at the media library through the Headway grid interface.

Options: ReplyQuote


Sorry, only registered users may post in this forum.