Forum Moderators: coopster

Message Too Old, No Replies

Search Engine Highlighting (SEHL) Broken - Blank XHTML

         

JAB Creations

5:09 am on Feb 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have tried implementing SEHL after reading about it on A List Apart.

Here is what the code looks like in my main header...

ob_start("ob_gzhandler"); // PHP Compression
include("header-sehl-1.8.3.php");
//ob_start("sehl");

Notice I have SEHL's ob_start commented out. A funny thing happened, when I clicked my site from Google the XHTML output was completely blank (application/xhtml+xml). I tried commenting out the compression ob_start but received the same results. Are we not allowed multiple ob_starts? Also why it the script completely obliterating my site's output when I uncomment it? The footer is also set correctly.

Also the directions included express the need to save sehl-1.8.3.php as UTF-8. However even after savnig it as UTF-8 in SuperEdi and even going to the extent of adding...

header('content-type: text/html; charset: utf-8');

The file still reads as ISO when I visit it live on my site!

What am I missing here? The directions don't seem very organized.

- John

[edited by: eelixduppy at 5:37 pm (utc) on Feb. 7, 2008]

whoisgregg

6:57 pm on Feb 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I can address one of your questions:
Are we not allowed multiple ob_starts?

From the manual [php.net]:

Output buffers are stackable, that is, you may call ob_start() while another ob_start() is active. Just make sure that you call ob_end_flush() the appropriate number of times. If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order.

That part of them being filtered sequentially and the fact that the first is gzipping the data might cause some problems with any kind of pattern matching going on in the second callback function... At a minimum, I bet you'd need to reverse the order to do the "sehl" ob_start first to get this working.

JAB Creations

3:02 am on Feb 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I attempted your suggestion among several variations without success.

- John