need help with this crazy code error

Discussion in 'HTML & Website Design' started by tonyfloyd, Jun 15, 2007.

  1. #1
    hi

    see below...what is this??...i am trying to install a wordpress theme and its not working......please help...thnks...tony


    Fatal error: Cannot redeclare register_sidebar() (previously declared in /home/tonykana/public_html/wp-includes/widgets.php:36) in /home/tonykana/public_html/wp-content/themes/TripleK2/app/includes/sbm.php on line 26
     
    tonyfloyd, Jun 15, 2007 IP
  2. HypertextFever

    HypertextFever Peon

    Messages:
    158
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Whomever wrote that theme has code in there that is only allowed to be included once.

    My advice is get a different template.

    Or... if you want to try and salvage this one...

    Paste the PHP source from sbm.php here (as long as there's no secret data) and I'll update it.

    Or, if you are comfortable doing so, open sbm.php for editing, go to line 26, and remove the include/require code that says something like:

    require_once('blah/blah.blah');
    PHP:
    Hope this helps.
     
    HypertextFever, Jun 15, 2007 IP
  3. Will Morgan

    Will Morgan Peon

    Messages:
    70
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Or just before the function name, add this:
    if(!function_exists('register_sidebar')) {
    // put the function register_sidebar() code here
    }
    PHP:
     
    Will Morgan, Jun 19, 2007 IP
  4. privadous

    privadous Active Member

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #4
    be sure you don´t have any blank character nor CR after the end of the file, I mean after this: ?>
    in
    /home/tonykana/public_html/wp-includes/widgets.php
    or
    /home/tonykana/public_html/wp-content/themes/TripleK2/app/includes/sbm.php

    prove this and sorry for my english
     
    privadous, Jun 19, 2007 IP