Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 8th May 2013, 11:31 AM   #1
Joshua Leavitt
War Room Member
 
jleavitt13's Avatar
 
Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
Default
Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Hi there,

This morning I noticed one of my websites, advancedthermalinc.com started showing an error and will not load.

I can still log into wordpress, but the main website will not load. The error that is showing is below:

Parse error: syntax error, unexpected '<' in /home/jleavitt/public_html/advancedthermalinc.com/wp-content/themes/u-design/header.php on line 232

The weird part is that in the header file there is not a line 232, it ends at 229. I have not made any edits to this website for several months. So I am not sure what happened.

Thank you so much for your time.
jleavitt13 is offline  
Unread 8th May 2013, 11:34 AM   #2
HyperActive Warrior
 
bhartzer's Avatar
 
Join Date: 2010
Posts: 100
Thanks: 9
Thanked 17 Times in 14 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Take a look at your plugins and start by disabling all of them. See if the site comes back up. Then try to activate one plugin at a time to see which plugin is causing the error.

9 times out of 10 it's related to the plugins.

Buy or Sell Links Based on Authorship Status at AuthorLinks.net
bhartzer is offline  
Unread 8th May 2013, 11:45 AM   #3
Joshua Leavitt
War Room Member
 
jleavitt13's Avatar
 
Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

I have tried disabling all plugins and the error still occurs. I did try switching themes and that did fix it. But the theme I am using is customized, so doing a fresh install of theme would require a bunch of work. So i am hoping to just find the one error spot and fix it.

Thank you!
jleavitt13 is offline  
Unread 8th May 2013, 12:08 PM   #4
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: 2006
Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Originally Posted by jleavitt13 View Post

Parse error: syntax error, unexpected '<' in /home/jleavitt/public_html/advancedthermalinc.com/wp-content/themes/u-design/header.php on line 232

The weird part is that in the header file there is not a line 232, it ends at 229. I have not made any edits to this website for several months. So I am not sure what happened.
The way that PHP counts line numbers is not necessarily the same way that your text editor counts them (one may be set to ignore lines with comments, and the other may not, etc). So sometimes there will be a discrepancy between the two.

Why don't you post the last 20 or so lines of that page's source code, and we'll see if there are any syntax errors there.


Brandon Tanner is offline  
Unread 8th May 2013, 12:12 PM   #5
Joshua Leavitt
War Room Member
 
jleavitt13's Avatar
 
Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Lines 170 through 229


<div id="page-content-title">
<div id="page-content-header" class="container_24">
<div id="page-title">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works.
if (is_page()) : ?>
<h1><?php the_title(); ?></h1>
<?php elseif ( is_single() ) : ?>
<h1><?php the_title(); ?></h1>
<?php elseif (is_tax()) : /* If this is a taxonomy archive */
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
<h1 class="pagetitle"><?php echo ucwords( $term->taxonomy ) . ': ' . $term->name; ?></h1>
<?php elseif (is_category()) : /* If this is a category archive */ ?>
<?php if ($udesign_options['show_archive_for_string'] == 'yes') : ?>
<h1 class="pagetitle"><?php single_cat_title("", true); ?></h1>
<?php else : ?>
<h1 class="pagetitle"><?php printf( __('Archive for the ‘%s’ Category', 'udesign' ), single_cat_title("", false) ); ?></h1>
<?php endif; ?>
<?php elseif (is_search()) : /* If this is a search results page */ ?>
<h1 class="pagetitle"><?php printf( __('Search Results for ‘<em>%s</em>’', 'udesign' ), get_search_query() ); ?></h1>
<?php elseif (is_404()) : /* If this is a 404 page */ ?>
<h1 class="pagetitle"><?php esc_html_e('Page Not Found (Error 404)', 'udesign'); ?></h1>
<?php elseif( is_tag() ) : /* If this is a tag archive */ ?>
<h1 class="pagetitle"><?php printf( __('Posts Tagged ‘%s’', 'udesign' ), single_tag_title("", false) ); ?></h1>
<?php elseif (is_day()) : /* If this is a daily archive */ ?>
<h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_date() ); ?></h1>
<?php elseif (is_month()) : /* If this is a monthly archive */ ?>
<h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('F Y') ); ?></h1>
<?php elseif (is_year()) : /* If this is a yearly archive */ ?>
<h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('Y') ); ?></h1>
<?php elseif (is_author()) : /* If this is an author archive */ ?>
<h1 class="pagetitle"><?php esc_html_e('Author Archive', 'udesign'); ?></h1>
<?php elseif (isset($_GET['paged']) && !empty($_GET['paged'])) : /* If this is a paged archive */ ?>
<h1 class="pagetitle"><?php esc_html_e('Blog Archives', 'udesign'); ?></h1>
<?php else : // the case when a Title is NOT present the height should be maintained ?>
<div class="no-title-present"></div>
<?php endif; ?>
</div>
<!-- end page-title -->
</div>
<!-- end page-content-header -->
</div>
<!-- end page-content-title -->

<div class="clear"></div>

<div id="page-content">
<img src="http://atc.jleavittdesigns.com/wp-content/uploads/2012/11/gg-bttn-over.png" style="display:none;">
<?php // Breadcrumbs
if ( ($udesign_options['show_breadcrumbs'] == 'yes') && class_exists('simple_breadcrumb') ) : ?>
<div class="container_24">
<?php $breadcrumbs_go = new simple_breadcrumb; ?>
</div>
<?php else : ?>
<div class="no-breadcrumbs-padding"></div>
<?php endif; ?>



<?php endif; ?>
jleavitt13 is offline  
Unread 8th May 2013, 12:42 PM   #6
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: 2006
Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

I don't see any obvious syntax errors in that code. Normally, whenever it says syntax error, unexpected '<' that means that the previous statement is missing a closing semi-colon. But that doesn't seem to be the case in your code (unless I just overlooked something).

If you haven't changed any code and this just started happening all of a sudden, then it's likely due to either a theme/plugin update, or a PHP version update (either scenario has the potential to break existing code). WordPress is not really my thing though, so it would probably be best to contact the developer of the theme about this.


Brandon Tanner is offline  
Unread 10th May 2013, 03:50 AM   #7
Active Warrior
 
Altin's Avatar
 
Join Date: 2012
Location: Albania
Posts: 73
Thanks: 25
Thanked 13 Times in 12 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Most probably it is a "extra space" issue. Open /home/jleavitt/public_html/advancedthermalinc.com/wp-content/themes/u-design/functions.php and editi it; remove any extra empty space before and after the code. It happens very often in Wordpress that just an extra empty space at the end or beginning of functions.php file, can mess up your site. Because the extra space might be in functions.php (which loads first), the error might show as in "in header.php" which loads after. Let me know if that helps.

Altin is offline  
Unread 10th May 2013, 09:20 AM   #8
ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ
War Room Member
 
RobinInTexas's Avatar
 
Join Date: 2008
Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

It might be the lack of a couple of semicolons


<?php // Breadcrumbs
if ( ($udesign_options['show_breadcrumbs'] == 'yes') && class_exists('simple_breadcrumb') ) : ?>
<div class="container_24">
<?php $breadcrumbs_go = new simple_breadcrumb; ?>
</div>
<?php else : ?>


<?php else ; ?>

Robin


...Even if you're on the right track, you'll get run over if you just set there.
RobinInTexas is offline  
Unread 10th May 2013, 04:50 PM   #9
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: 2006
Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

@ Robin - the colons are just an alternate syntax for opening curly brackets, so it's valid code.

http://php.net/manual/en/control-str...ive-syntax.php


Brandon Tanner is offline  
The Following User Says Thank You to Brandon Tanner For This Useful Post:
Unread 10th May 2013, 06:06 PM   #10
ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ
War Room Member
 
RobinInTexas's Avatar
 
Join Date: 2008
Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3
Default
Re: Help please. Website Down, syntax error. Not sure what to do
Share on: 
fb share twitter share gplus share more share

Learn something new every day.

How about if you change this line

<?php else : // the case when a Title is NOT present the height should be maintained ?>

to

<?php else : /* the case when a Title is NOT present the height should be maintained*/ ?>

Robin


...Even if you're on the right track, you'll get run over if you just set there.
RobinInTexas is offline  
Closed Thread


Bookmarks

Tags
error, syntax, website


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 01:35 PM.