Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter bramme

    (@bramme)

    It seems I have finally uncovered the problem.

    To create my blog’s theme, I downloaded a blank sandbox theme (I believe from wpcandy.com) and used that.

    Just now, I tried moving my site to another host and see what that gave. When trying to login I suddenly got a “headers already sent” error which pointed to my theme/functions.php directory. When I looked at that, I saw the following:

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));
    ?>
    
    <?php // for sidebar.php if needed (remove the // below the if() statement) ?>
    <?php // if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : endif; ?>

    Removing second to last line, causing the problems: apparently, simply putting a php comment, also counts as whitespace…

    Deleting those 2 last lines solved all my problems.

    Thread Starter bramme

    (@bramme)

    That did not work for me. I still believe having to hack the wordpress index file is not really a solution. I’d like to see an answer what’s causing this: is it a blank line in one of the files, is it some encoding problem???

    Anyhow, I’ve just had an e-mail my site was down, showing nothing but a blank page. I’ve replaced all the files I deleted the closing tags from with their originals and removed the ob hack. In the back of my head, I’m thinking something like caching caused the problem (I do have caching enabled in my .htaccess).

    This however means my feed is once more down ??
    I’ve tried the output hack, but to my surprise, it did not work… Is there anything else creating output for the feeds except feed-rss2.php (or other similar .php file)?

    Thread Starter bramme

    (@bramme)

    Update: and suddenly, after deleting said (tried but failed) fix, it worked again. File encoding anyone?

    Thread Starter bramme

    (@bramme)

    None of the above worked. I’m starting to think I’ll have to search every file and remove the ending ?> tag…

    Could this be server related? Some setting in Apache or so that goes wonky?

    If this were my own code, I’d say “tough luck, my own damn fault” but seeing as a lot of people encounter this problem, I really think some effort should be made into finding a solution.

    The solution posted here (https://www.wynia.org/wordpress/2006/01/19/rss-feeds-broken-wordpress-plugins-and-duct-tape-solutions/) worked for the blank line on my homepage, however not for the line in my feed.

    Thread Starter bramme

    (@bramme)

    Note: I have tried manipulating the output with ob_start and ob_get_contents(), but that just included my header twice, which is really weird (ob_end_flush didn’t cause any problems)…

    Thread Starter bramme

    (@bramme)

    Otto, thank you for your replies, but please note I did all of your above mentioned. I did state the problem, post my feed (albeit a bit disguised) but did not know anything about the plugins (I did disable the feedburner plugin though), but this did not change anything.

    I consider myself a wisened php developer and did allready consider removing the ending ?> tags (something CodeIgniter for example does in every PHP file, preventing any “output already” sent errors). I am just wondering now which other files get loaded…

    Thread Starter bramme

    (@bramme)

    Clearing that one line did not work for me. I am completely baffled.

Viewing 7 replies - 1 through 7 (of 7 total)