Parse Error: Syntax Error, Unexpected T_variable

Discussion in 'PHP' started by huiz41, Feb 1, 2013.

  1. #1
    Parse error: syntax error, unexpected T_VARIABLE in /home/smarthea/public_html/ocart/vqmod/vqcache/vq2-catalog_view_theme_default_template_error_not_found.tpl on line 1

    For any URL to my site that should be hitting the 404 page.

    Example:
    http://www.smarthealthshop.com/xtremeno.html

    Any ideas of a missing loop / operator?
    This is for an OpenCart platform inside the VQMOD by the way.

    Thanks!
     
    huiz41, Feb 1, 2013 IP
  2. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #2
    Post code here so that we can see what's wrong
     
    greatlogix, Feb 1, 2013 IP
  3. huiz41

    huiz41 Active Member

    Messages:
    188
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Actually, it was an extension error (XML) file in the VQMOD and renaming it resolved the problem. Sorry for the hassle.
     
    huiz41, Feb 1, 2013 IP
  4. Pierre0101

    Pierre0101 Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    Hello Their,
    i have a little problem of Parse Erro: Systax Error,
    I just dont undderstand what i did wrong :(
    Here is my site jordanstile.com

    The page show:
    Parse error: syntax error, unexpected '<' in /home/virtual/site526/fst/var/www/html/wp-content/themes/organic_portfolio_gray/includes/custom-header.php on line 8

    Here is the code:
    <?php
    //Custom Header Image Code -- from the WordPress.com API
    define('NO_HEADER_TEXT', true);
    define('HEADER_IMAGE', '%s/images/logo.png'); // %s is theme dir uri
    define('HEADER_IMAGE_WIDTH', 960);
    define('HEADER_IMAGE_HEIGHT', 100);

    function header_style() { ?>
    <style type="text/css">
    #header #title a {
    background: url(<?php header_image(); ?>) no-repeat;
    }
    </style>
    <?php }
    function admin_header_style() { ?>
    <style type="text/css">
    #headimg {
    width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
    height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
    background-image: url(<?php header_image(); ?>) top left no-repeat;
    }
    #headimg h1,
    #headimg #desc {
    display: none;
    }
    }
    </style>
    <?php }
    add_custom_image_header('header_style', 'admin_header_style'); //Add the custom header
    ?>

    Thank you for your precious help!

    Sorry i'm newbie, and try to understand, I know you have experience and i will very appreciate to see my site get back to life...
     
    Pierre0101, Feb 8, 2013 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Static CSS in the markup being output by PHP? Ouch... that's just code for nothing.

    Of course it's for turdpress -- nothing like micromanaging from the php and markup stuff that has ZERO business in the PHP or the markup. Gotta love the H1 around what's unlikely to be the master heading for all sections of the page, the lack of a H1 or proper text where you're blowing a image... and said presentational image in the markup... the PNGFix bloat, HTML 5 bloat, and endless pointless DIV for christmas only knows what...

    My advice? Gut EVERYTHING you seem to be trying to do here for a h1 with actual text for text, with an image replacement method like gilder-levin. You're already outputting probably twice the code necessary and you don't even have real content yet.
     
    deathshadow, Feb 8, 2013 IP