Parse error: syntax error, unexpected '<' in PLEASE HELP

Discussion in 'PHP' started by gamer1999, May 28, 2010.

  1. #1
    I cant see the problem

     
    gamer1999, May 28, 2010 IP
  2. actress143

    actress143 Peon

    Messages:
    132
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    at the last line just type as

    ?>

    then tell me
     
    actress143, May 28, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    <?php
    // ++=========================================================================++
    // || vBadvanced CMPS v3.2.1 (vB 3.6 - vB 3.8) - 70508
    // || © 2003-2010 vBadvanced.com - All Rights Reserved
    // || This file may not be redistributed in whole or significant part.
    // || http://vbadvanced.com
    // || Downloaded 18:06, Tue Feb 9th 2010
    // || 467070508_407843050728
    // ++ ========================================================================++
    
    error_reporting(E_ALL & ~E_NOTICE);
    define('THIS_SCRIPT', 'adv_index');
    define('VBA_PORTAL', true);
    define('VBA_SCRIPT', 'CMPS');
    
    // ============================================
    // Enter the full path to your forum here
    // Example: /home/vbadvanced/public_html/forum
    // ============================================
    
    $forumpath = '/home/content/g/a/m/gameapbt/html/forums';
    
    // ============================================
    // No Further Editing Necessary!
    // ============================================
    
    if ($forumpath)
    {
    if (!is_dir($forumpath))
    {
    echo 'Invalid forum path specified! Please edit this file and be sure to include the correct path for your $forumpath variable.';
    exit;
    }
    
    chdir($forumpath);
    }
    
    ?>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-12946892-1");
    pageTracker._trackPageview();
    } catch(err) {}</script>
    PHP:
     
    danx10, May 28, 2010 IP
  4. gamer1999

    gamer1999 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i did that and its a blank page now. Atleast the error went away
     
    gamer1999, May 28, 2010 IP
  5. gamer1999

    gamer1999 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes same error
     
    gamer1999, May 28, 2010 IP
  6. Urlin

    Urlin Member

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #6
    Pls give full page code. Is page extension .php or .html?
     
    Urlin, May 29, 2010 IP
  7. gerulis

    gerulis Active Member

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #7
    I seriuosly doubt that this is the right place for analytics code.
     
    gerulis, May 29, 2010 IP
  8. gamer1999

    gamer1999 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    that is the whole page its the home page to my forums

    huh?
     
    gamer1999, May 31, 2010 IP
  9. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Get rid of your analytics code and it will be fixed. DO NOT ?>. DO NOT PLACE YOUR CODE THERE.
     
    krsix, May 31, 2010 IP
  10. Trikun3

    Trikun3 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Make sure you've uploaded the file in binary mode.
     
    Trikun3, May 31, 2010 IP
  11. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Are you just posting random spam to get your postcount up? This has nothing to do with it, he just posted HTML in the middle of a PHP file.
     
    krsix, Jun 1, 2010 IP
  12. Trikun3

    Trikun3 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    ...Sorry that I misread the error? I thought I had read the error similar to:

    Syntax error, unexpected '?'
    Code (markup):
    I'm well aware that you can't embed HTML directly in PHP, but I'm not spamming..

    On a sidenote, thanks for letting me increase my post count by one..
     
    Trikun3, Jun 1, 2010 IP
  13. mehmetm

    mehmetm Well-Known Member

    Messages:
    134
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #13
    that code just defines constants,variables and changing directory, don't function any process to screen.
    I guess it's not the main page of your forum. it is like a settings page.
    so just requesting this page will print a blank page..
     
    mehmetm, Jun 1, 2010 IP
  14. Trikun3

    Trikun3 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I agree with mehmetm in saying that the file is a configuration page. It looks like something used as the index.php that defines all the basepaths, etc. You're going to want to put that javascript into the header of the vbadvanced template you're using.
     
    Trikun3, Jun 1, 2010 IP