localhost WordPress Parse error

by TSOL
9 replies
  • WEB DESIGN
  • |
I am new to Warrior Forum and WordPress. I recently loaded Wampserver for the purpose of working on WordPress until I can buy my domain. After successfully installing WordPress and adding a few free themes. When I launch from the localhost I get the following message:

Parse error: parse error in C:\wamp\www\foodforthought\wp-content\themes\Persi\index.php on line 33(this number varies from theme to theme)

I only get this message when I activate the free themes. I apologize if this is the wrong area of the forum. Can someone help me resolve this issue.

Thanks.
#error #localhost #parse #wordpress
  • Profile picture of the author mojojuju
    Signature

    :)

    {{ DiscussionBoard.errors[2644121].message }}
  • Profile picture of the author dmor71
    Originally Posted by TSOL View Post

    I am new to Warrior Forum and WordPress. I recently loaded Wampserver for the purpose of working on WordPress until I can buy my domain. After successfully installing WordPress and adding a few free themes. When I launch from the localhost I get the following message:

    Parse error: parse error in C:wampwwwfoodforthoughtwp-contentthemesPersiindex.php on line 33(this number varies from theme to theme)

    I only get this message when I activate the free themes. I apologize if this is the wrong area of the forum. Can someone help me resolve this issue.

    Thanks.
    I build the wordpress sites with wampserver as well. Which theme are you using and where can i download it...I'll run it and see what i come up with.
    {{ DiscussionBoard.errors[2644607].message }}
    • Profile picture of the author TSOL
      I downloaded the Persi theme by toptut.com.

      Parse error: parse error in C:\wamp\www\foodforthought\wp-content\themes\Persi\index.php on line 33


      Here is the above referenced php file:

      <?php obwp_google_468_ads_show(); ?>
      <? endif; ?>
      <?php the_content('',FALSE,''); ?>
      </div>
      <div class="postmetadata">
      <a href="<?php the_permalink() ?>">Continue Reading</a>
      </div>
      </div>

      <?php endwhile; ?>

      <div class="entry">
      <?php obwp_google_468_ads_show(); ?>
      </div>

      <div class="navigation">
      <?php if(!function_exists('wp_pagenavi')) : ?>
      <div class="alignleft"><?php next_posts_link('Previous') ?></div>
      <div class="alignright"><?php previous_posts_link('Next') ?></div>
      <?php else : wp_pagenavi(); endif; ?>
      </div>

      <?php else : ?>

      <h2 class="center">Not Found</h2>
      <?php include (TEMPLATEPATH . '/searchform.php'); ?>

      <?php endif; ?>

      </div>
      <?php get_sidebar(); ?>
      <?php get_sidebar('right'); ?>

      <?php get_footer(); ?>
      {{ DiscussionBoard.errors[2645878].message }}
  • Profile picture of the author cyphix
    If you can possibly show us the code around that line (not just that line) it would be helpful!
    {{ DiscussionBoard.errors[2645493].message }}
  • Profile picture of the author cyphix
    Hmmm don't see anything wrong around line 33.... can you post more code?
    {{ DiscussionBoard.errors[2645912].message }}
    • Profile picture of the author TSOL
      That is all of the code from the index.php file of that directory. The funny thing is that when I activate other free themes from Skinpress.com I get the same message, but with different line number in the index.php file. Is this common with free Wordpress themes?
      {{ DiscussionBoard.errors[2646516].message }}
  • Profile picture of the author SteveJohnson
    It's likely that the problem is in this line (2nd line in your example):
    Code:
    <? endif; ?>
    This line uses the "short" PHP open tag, i.e. "<?" instead of "<?php". The normal configuration of PHP is set to NOT allow short open tags. You can change this in your php.ini file.

    BUT

    Using the short open tag when you're scripting PHP is very bad practice. You can never be sure what the server's configuration is going to be (most shared hosting has this OFF).

    So no, it's not necessarily a common problem with free WordPress themes - but it's probably a problem with themes from skinpress
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2649467].message }}
    • Profile picture of the author TSOL
      Thank you for your insight. Being that I am new to working on WordPress and working on it locally, I need to find a reputable site that codes themes properly as you have indicated and offers them for free. I will start my search, but if anyone can point me in the right direction It would really be appreciated. I like that theme because it had boxes for affiliated marketing.
      {{ DiscussionBoard.errors[2655183].message }}
  • Profile picture of the author cyphix
    Good catch Steve!
    {{ DiscussionBoard.errors[2649738].message }}

Trending Topics