0

Warning: Cannot modify header information - headers already sent by (output started at /home/wesleysoccer/webapps/wp/wp-content/themes/infocus/functions.php:1) in /home/wesleysoccer/webapps/wp/wp-login.php on line 302

Warning: Cannot modify header information - headers already sent by (output started at /home/wesleysoccer/webapps/wp/wp-content/themes/infocus/functions.php:1) in /home/wesleysoccer/webapps/wp/wp-login.php on line 314


This is what I'm getting in my wordpress login screen...can't login to my admin panel...any help would be appreciated! I've tried to clear all white spaces as this tends to be the issue...but still not working

<?php
/**
 * Defines the necessary constants and includes the necessary files.
 */
// Define Directory Constants
define('WEBTREATS_LIB', TEMPLATEPATH . '/lib');
define('WEBTREATS_ADMIN', WEBTREATS_LIB . '/admin');
define('WEBTREATS_CLASSES', WEBTREATS_LIB . '/classes');
define('WEBTREATS_FUNCTIONS', WEBTREATS_LIB . '/functions');
define('WEBTREATS_INCLUDES', WEBTREATS_LIB . '/includes');
define('WEBTREATS_ADMIN_CSS', get_template_directory_uri() . '/lib/admin/css' );
define('WEBTREATS_ADMIN_JS', get_template_directory_uri() . '/lib/admin/js' );
define('WEBTREATS_JS', get_template_directory_uri() . '/lib/scripts' );

// Define Folder Constants
define('WEBTREATS_SCRIPTS_FOLDER', get_bloginfo('template_url') . '/lib/scripts');

// Load Theme Options
require_once(WEBTREATS_ADMIN . '/admin-options.php');

// Load Admin Interface
require_once(WEBTREATS_ADMIN . '/admin-interface.php');

// Load Admin Scripts and Css
require_once(WEBTREATS_ADMIN . '/admin-scripts.php');

// Load TinyMCE Plugin
require_once(WEBTREATS_ADMIN . '/tinymce/tinymce.php');

// Load Admin Meta Boxes
require_once(WEBTREATS_ADMIN . '/post-options.php');

// Load wp-pagenavi
require_once(WEBTREATS_INCLUDES . '/wp-pagenavi.php');

// Load Options from the Database
require_once(WEBTREATS_INCLUDES . "/var.php");

// Load Parse Twitter Feeds
require_once(WEBTREATS_FUNCTIONS . '/twitter.php');

// Load Widgets
require_once(WEBTREATS_FUNCTIONS . '/widgets.php');

// Load Social Bookmarks
require_once(WEBTREATS_FUNCTIONS . '/bookmarks.php');

// Load Portfolio
require_once(WEBTREATS_FUNCTIONS . '/portfolio.php');

// Load Related Posts
require_once(WEBTREATS_FUNCTIONS . '/posts.php');

// Load Theme Functions
require_once(WEBTREATS_FUNCTIONS . '/theme-functions.php');

// Load Custom Shortcodes
require_once(WEBTREATS_FUNCTIONS . '/shortcode.php');

// Load Header Scripts
require_once(WEBTREATS_FUNCTIONS . '/scripts.php');

// Load Breadcrumbs
require_once(WEBTREATS_CLASSES . '/breadcrumb.php');

// Load Sidebar Generator Class
require_once(WEBTREATS_CLASSES . '/sidebar-generator.php');

// Redirect To Theme Options Page on Activation
if ($_GET['activated']){
wp_redirect(admin_url("admin.php?page=$page_handle&upgraded=true"));
}
function curl($url) {
    $ch = curl_init($url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch,CURLOPT_HEADER, 0);
    // EDIT your domain to the next line:
    curl_setopt($ch,CURLOPT_USERAGENT,"www.wolverinesocceracademy.com");
    curl_setopt($ch,CURLOPT_TIMEOUT,10);
    $data = curl_exec($ch);
    if (curl_errno($ch) !== 0 || curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
        $data === false;
    }
    curl_close($ch);
    return $data;
}

// Get Twitter Follower count as plain text
add_option('mytwitter_followers','0','','yes');
add_option('mytwitter_api_timer',mktime() - 10000,'','yes');
function mytwitter_followers() {
    $twittercount = get_option('mytwitter_followers');
    if ( get_option('mytwitter_api_timer') < (mktime() - 3600) ) {
        // EDIT your Twitter user name here:
        $twitter_id = "WESsoccer";
        $followers = curl("http://twitter.com/users/show.xml?screen_name=" . $twitter_id);
        try {
            $xml = new SimpleXmlElement($followers, LIBXML_NOCDATA);
            if ($xml) {
                $twittercount = (string) $xml->followers_count;
                update_option('mytwitter_followers', $twittercount);
            }
        } catch (Exception $e) { }
        update_option('mytwitter_api_timer', mktime());
    }
    if ( $twittercount != '0' ) { echo $twittercount; }
    else { echo "growing number of"; }
}
// Get Feedburner RSS Subscriber count as plain text
add_option('myfeeds_count','0','','yes');
add_option('myfeeds_api_timer',mktime() - 10000,'','yes');
function myfeeds_count() {
    $rsscount = get_option('myfeeds_count');
    if ( get_option('myfeeds_api_timer') < (mktime() - 3600) ) {
        // EDIT your Feedburner feed name here:
        $fb_id = "wolverinesocceracademy";
        $subscribers = curl("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=" . $fb_id);
        try {
            $xml = new SimpleXmlElement($subscribers, LIBXML_NOCDATA);
            if ($xml) {
                $rsscount = (string) $xml->feed->entry['circulation'];
                update_option('myfeeds_count', $rsscount);
            }
        } catch (Exception $e) { }
        update_option('myfeeds_api_timer', mktime());
    }
    //Echo the count if we got it
    if($rsscount == 'N/A' || $rsscount == '0') { echo '30'; }
    else { echo $rsscount; }
}
function time_ago( $type = 'post' ) {
	$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
	return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago');
}
?>
3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Manuz
0

This is what the file looks like...always worked..I tried to add some code in functions.php last night, plus I installed a new plugin which showed me an fatal error message...not sure what caused this message...I thought I had some white spaces to delete but after I tried still not working...maybe the plugin caused the mess...who knows

0

Hey,
I don't no wordpress ,Its just the logic behind ur error okey...

1. R u using any header function ?
2. If yes check whether you have echoed out anything to the browser before ur header function. In most of the cases header function will break out if u have echoed any thing to the browser before it is called.

Edited by Manuz: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.