GoDaddy - Preview DNS

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 13, 2009   (RSS)

By richb - August 11, 2009

I'm using GoDaddy and have not moved my domain. Until I do so I must use <domain>.previewdns.com. I read another posting that GoDaddy adds extra things and when actual domain is setup this will go away. Until then I must use this previewdns.com and getting the following error;

Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in /home/..../cmsAdmin/lib/init.php on line 283.

I'm on version 1.31 and here is the code for init.php

====================================================================
function removePreviewDnsContent($html = null) {[/#0000ff]

// skip if not on *.previewdns.com host
if (@$_SERVER['HTTP_X_FORWARDED_SERVER'] != 'previewdns.com') { return; }[/#0000ff]

// call this function to filter output
if (!$html) { ob_start('removePreviewDnsContent'); } [/#0000ff](THIS IS LINE 283)[/#ff0000]

// returned filtered output
// *.previewdns.com injects code right before closing body tag. Adding trailing space in body tag
// prevents their system from matching it and injecting their code
if ($html) { return preg_replace('|</body>|i', '</body >', $html); }[/#0000ff]

}
===============================================================================

Re: [richb] GoDaddy - Preview DNS

By Dave - August 13, 2009

Hi Rich,

Thanks for sending your info through. For anyone else who has this error you can fix it by changing this line in /lib/init.php from this:
if (!$html) { ob_start('removePreviewDnsContent'); }

to this:
if ($html === null) { ob_start('removePreviewDnsContent'); }

And this fix will be in v1.33 as well.

Thanks!
Dave Edis - Senior Developer
interactivetools.com