Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-22-2013, 11:33 PM   PM User | #1
Roberto696
New to the CF scene

 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Roberto696 is an unknown quantity at this point
Wordpress php quick help,

Receiving error message "Internal Server Error 500" from my small business website!

I am using wordpress 3.4.1 supermassive theme, and my php error according to my wordpress blog is:
PHP Parse error: syntax error, unexpected T_ELSE in /www/blog/wp-content/themes/supermassive/header.php on line 160

PHP Code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta charset=<?php bloginfo('charset'); ?> />
<?php if ( is_home() ) { ?>
<meta name="description" content="<?php echo get_bloginfo'description''display' ); ?>" />
<?php ?>
<title><?php wp_title(''); ?></title>

<?php require(ghostpool_inc 'options.php'); ?>

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/reset.css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/prettyPhoto.css" media="screen" />

<!--[if IE]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/style-ie.css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/style-ie7.css" media="screen" /><![endif]-->

<?php require(ghostpool_inc 'skins.php'); ?>

<?php require(ghostpool_inc 'styling.php'); ?>
 
<?php if($theme_custom_css) { ?><style><?php echo stripslashes($theme_custom_css); ?></style><?php ?>

<?php if($theme_favicon_ico) { ?><link rel="icon" href="<?php echo($theme_favicon_ico); ?>" type="image/vnd.microsoft.icon" />
<link rel="SHORTCUT ICON" href="<?php echo($theme_favicon_ico); ?>" /><?php ?>
<?php 
if($theme_favicon_png) { ?><link rel="icon" type="image/png" href="<?php echo($theme_favicon_png); ?>" /><?php ?>
<?php 
if($theme_apple_icon) { ?><link rel="apple-touch-icon" href="<?php echo($theme_apple_icon); ?>" /><?php ?>

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php if(is_singular()) wp_enqueue_script('comment-reply'); ?>
<?php wp_enqueue_script
("jquery"); ?>
<?php wp_head
(); ?>

<script src="<?php bloginfo('template_directory'); ?>/lib/scripts/mediaplayer/jwplayer.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
<script src="http://concerto-platform.googlecode.com/svn-history/r268/v2/admin/js/lib/jquery.tablesorter.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.cycle.min.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.prettyPhoto.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/custom.js"></script>

<script src="<?php bloginfo('stylesheet_directory'); ?>/js/cufon-yui.js"></script>
<?php if($theme_leaguegothic) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/League_Gothic_400.font.js"></script><?php ?>
<?php 
if($theme_quicksand) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/Quicksand_Book_400-Quicksand_Bold_700-Quicksand_Book_Oblique_oblique_400-Quicksand_Bold_Oblique_oblique_700.font.js"></script><?php ?>
<?php 
if($theme_sansation) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/Sansation_400-Sansation_700.font.js"></script><?php ?>
<?php 
if($theme_vegur) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/Vegur_400-Vegur_700.font.js"></script><?php ?>
<?php 
if($theme_chunkfive) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/ChunkFive_400.font.js"></script><?php ?>
<?php 
if($theme_sansation) { ?><script src="<?php bloginfo('stylesheet_directory'); ?>/js/fonts/Sansation_400-Sansation_700.font.js"></script><?php ?>
<script>Cufon.replace('h1,h2,h3,h4,h5,h6', {hover: true});</script>

<?php if($theme_timthumb == "0") { ?>
<script src="<?php bloginfo('template_directory'); ?>/js/reflection.js"></script>
<script>
jQuery(document).ready(function(){
    jQuery(".reflection-s").reflect({
        height: 25,
        opacity: 0.3
    });
    jQuery(".reflection-m").reflect({
        height: 70,
        opacity: 0.3
    });
    jQuery(".reflection-l").reflect({
        height: 100,
        opacity: 0.5
    });
});
</script>
<?php ?>

  <script>

(function ($) {
  // custom css expression for a case-insensitive contains()
  jQuery.expr[':'].Contains = function(a,i,m){
      return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase())>=0;
  };


  function listFilter(sort, list) { // sort is any element, list is an unordered list
    // create and add the filter form to the sort
    var form = $("<form>").attr({"class":"filterform","action":"#"}),
        input = $("<input>").attr({"class":"filterinput","type":"text"});
    $(form).append(input).appendTo(sort);

    $(input)
      .change( function () {
        var filter = $(this).val();
        if(filter) {
          // this finds all links in a list that contain the input,
          // and hide the ones not containing the input while showing the ones that do
          $(list).find("a:not(:Contains(" + filter + "))").parent().slideUp();
          $(list).find("a:Contains(" + filter + ")").parent().slideDown();
        } else {
          $(list).find("li").slideDown();
        }
        return false;
      })
    .keyup( function () {
        // fire the above change event after every letter
        $(this).change();
    });
  }


  //ondomready
  $(function () {
    listFilter($("#sort"), $("#list"));
  });
}(jQuery));
  </script>

<script>var rootFolder='<?php bloginfo('template_directory'); ?>';</script>
<?php echo stripslashes($theme_scripts); ?>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-31739871-2']);
  _gaq.push(['_setDomainName', 'karmanhealthcare.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php wp_head(); ?> 
</head>                    
<body class="no-js">

<script>
    var el = document.getElementsByTagName("body")[0];
    el.className = "";
</script>

<a href="#top_arrow"></a>

<!--Begin Page Wrapper-->
<div id="page-wrapper" style="background: url(<?php echo $theme_custom_header?>)
<?php if($theme_header_repeat == "No Repeat") { ?>no-repeat
<?php } elseif( $theme_header_repeat == "Repeat Horizontally") { ?>repeat-x
<?php } elseif( $theme_header_repeat == "Repeat Vertically") { ?>repeat-y
<?php } else { ?>repeat<?php ?>
<?php 
if($theme_header_position == "Left") { ?>left top
<?php } elseif($theme_header_position == "Right") { ?>right top
<?php } else { ?>center top<?php ?>;">

    <!--Begin Header-->
    <div id="header">

        <div id="header-top">

            <!--Begin Logo-->
            <div id="logo">
                <?php if($theme_custom_logo) { ?><a href="<?php bloginfo('url'); ?>"><img src="<?php echo($theme_custom_logo); ?>"></a><?php } else { ?><a href="<?php bloginfo('url'); ?>"><span></span></a><?php?> }
            </div>
            <!--End Logo-->
            
        </div>
        
        <div class="clear"></div>
        
        <!--Begin Nav-->
        <div id="nav">
            <?php wp_nav_menu(sort_column=menu_order&container=ul&theme_location=header-nav&fallback_cb=null
Roberto696 is offline   Reply With Quote
Old 01-23-2013, 12:07 AM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
The error is in this line:
Code:
                <?php if($theme_custom_logo) { ?><a href="<?php bloginfo('url'); ?>"><img src="<?php echo($theme_custom_logo); ?>"></a><?php } else { ?><a href="<?php bloginfo('url'); ?>"><span></span></a><?php?> }
The end of the line is <?php?>}, which means that brace is outside of the PHP processor. You get the T_ELSE error since it is never terminated (my lint test gives me a T_END since that's the only code I have). Change that to <?php }?> and it should then correct that error.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
wordpress

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:25 PM.


Advertisement
Log in to turn off these ads.