Parse error: syntax error, unexpected ':'

Discussion in 'PHP' started by cari, Aug 17, 2011.

  1. #1
    I am having a problem finding the error on this, can anyone help?

    Parse error
    : syntax error, unexpected ':' in /home/.../public_html/wp-content/themes/mimbopro/index.php on line 220

    219 <?php
    220 } http://www.....com/wp-admin/theme-editor.php?file=/home/.../public_html/wp-content/themes/mimbopro/index.php& theme=Mimbo+Pro&a=te&scrollto=3839
    221 }
    222 ?>
     
    cari, Aug 17, 2011 IP
  2. goendul

    goendul Member

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #2
    check index.php in your current theme and fix the error in the line 220. You can use notepad++ to see the line
     
    goendul, Aug 17, 2011 IP
  3. cari

    cari Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I already did that, and I posted the lines 219 through 220 and I can't see the error. Was hoping that someone else could.
     
    cari, Aug 17, 2011 IP
  4. The Webby

    The Webby Peon

    Messages:
    1,852
    Likes Received:
    30
    Best Answers:
    1
    Trophy Points:
    0
    #4
    The lines that you have posted don't make any sense.. May be its a wordpress thing that I don't know about..
    It certainly doesn't make any sense PHP wise..
     
    The Webby, Aug 17, 2011 IP
  5. freelanceinphp

    freelanceinphp Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #5
    can you paste a full code? sample code not understandable to find a problem.
     
    freelanceinphp, Aug 18, 2011 IP
  6. iBank ™

    iBank ™ Peon

    Messages:
    63
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    0
    #6
    219 <?php
    [COLOR=#ff0000]220 }  http://www.....com/wp-admin/theme-editor.php?file=/home/.../public_html/wp-content/themes/mimbopro/index.php&         theme=Mimbo+Pro&a=te&scrollto=3839
    221 }[/COLOR]
    222 ?>
    Code (markup):
    Where on earth have you seen a syntax like that ? Get rid of the given section and everything ( from what you have shared ) will be ok.
     
    iBank ™, Aug 18, 2011 IP
  7. Rufas

    Rufas Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    3
    Trophy Points:
    0
    #7
    I really didn't make any sense. If the address is a variable, you didn't close it (with ;) and assign it to anything. If you want it to be display on screen as a link, you didn't close the php tag either. What are you trying to do?

    - Rufas
     
    Rufas, Aug 19, 2011 IP
  8. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #8
    Post the code from the { (the one before line 219) so we can see why there's raw T_STRING in your PHP.

    It looks like a construct such as

    <?php
    blah blah
    if (something) {
    ?>
    some non-PHP code
    <?php
    } else {
    <something else here, maybe a header, or a variable being set to the text starting with 'http:'>

    But what you posted is a syntax error. (Unless it's in the middle of a heredoc, maybe.)
     
    Rukbat, Aug 22, 2011 IP