WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] another "Warning: Cannot modify header information - headers already sent by" (4 posts)

  1. VPNline
    Member
    Posted 2 years ago #

    Hi, i have looked at the other posts on this but not enough php experience to understand fully what they are saying or to do ... hence this post for help.

    I used the "woo tabs" widget for the first time yesterday and everything was working ok when in the wp admin. i modified the file widget-woo-tabs file to remove the date from 'popular posts' and it seemed to work.

    today i have tried to log back in and got the infamous message.

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/xxx/wp-content/themes/xxx/includes/widgets/widget-woo-tabs.php:463) in /home/xxx/public_html/xxx/wp-includes/pluggable.php on line 881

    i did save the original widget-woo-tabs and tried uploading that by ftp but it does not work as the error is with the pluggable file? i do not have a saved version of that.

    Below is code around line 881 from pluggable.php

    function wp_redirect($location, $status = 302) {
    global $is_IIS;

    $location = apply_filters('wp_redirect', $location, $status);
    $status = apply_filters('wp_redirect_status', $status, $location);

    if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    return false;

    $location = wp_sanitize_redirect($location);

    if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups

    *line 881* header("Location: $location", true, $status);
    }
    endif;

    first question is help with resolving the issue so i can login. secondly i guess i have to remove the woo tabs widget or not adjust it etc? thirdly is to learn that i shouldnt touch stuff i dont understand.

    thanks for any help

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    The issue is not with the pluggable.php file but with the plugin (or theme?) for 'widget-woo-tabs' - Use FTP to rename this errant plugin (or theme?) folder to old-foldername

  3. keesiemeijer
    moderator
    Posted 2 years ago #

    as the error is with the pluggable file?

    No, the error comes from the widget-woo-tabs.php line 463.

    try this:
    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    or this:
    Re-upload a fresh download of the woo tabs widget by using FTP or whatever file management application your host provides.

  4. VPNline
    Member
    Posted 2 years ago #

    thanks for help, really appreciated :)

    to resolve the issue i followed the faq and it seemed to be that the code

    "it is usually because there are spaces, new lines, or other stuff before an opening <?php tag or after a closing ?> tag"

    looking at widget-woo-tabs.php line 463 it was

    ?>

    <?php

    So i deleted line and tried to remove any hidden spaces around that line to make below and it worked when uploaded by ftp

    ?>
    <?php

    thanks once again for help

Topic Closed

This topic has been closed to new replies.

About this Topic