title: fatal error: Parse error: syntax error, unexpected $end in
body: <p>This is the wordpress plugin that was runing fine on old PHP version but now on PHP5.4.X producing the following error.</p>
  
  <p>Plugin could not be activated because it triggered a fatal error.</p>
  
  <p>Parse error: syntax error, unexpected $end in C:\wamp\www\testweb\wp-content\plugins\bxslider\slider.php on line 175</p>
  
  <p>HERE is the SLIDER.PHP File.</p>
  
  <pre><code>&lt;?php
  error_reporting(1);
  if(!defined('ABSPATH')) {
      die("Don't call this file directly.");
  }
  if (!defined('WP_CONTENT_URL')) {
      define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
  }
  define('CONTENT_SLIDE_URL',get_option('siteurl').'/wp-content/plugins/bxslider/');
  
  
  
  /* Add Administrator Menu's*/
  function bx_content_slide_menu()
  {
      $level = 'level_10';
     add_menu_page('BX Content Slide', 'BX Content Slide', $level, __FILE__,'bx_content_slide_options',CONTENT_SLIDE_URL.'images/icon6.png');
     add_submenu_page(__FILE__, 'Help &amp;amp; Support', 'Help &amp;amp; Support', $level,'bx_content_slide_help','bx_content_slide_help');
  }
  add_action('admin_menu', 'bx_content_slide_menu');
  
  function bx_content_slide_options()
  {
      bx_settings_update();
      global $wpdb;
      $query="Select * from wp_slider";
      $slider_res=$wpdb-&gt;get_results($query);
  
      if($_GET['mode']=='edit'){
          $query="select * from wp_slider where id='".$_GET['id']."'";
          $cur_slider_res=$wpdb-&gt;get_results($query);
  
  
      }
  
      include_once dirname(__FILE__).'/options_page.php';
  }
  
  
  function bx_settings_update(){
      global $wpdb;
      if(isset($_POST['total_options']))
      {
          echo '&lt;div class="updated fade" id="message"&gt;&lt;p&gt;Content Slide Settings &lt;strong&gt;Updated&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;';
  
  
          for($i=1;$i&lt;=($_POST['total_options']-1);$i++){
              if(!empty($_POST['wpcs_options']['slide_imagetext'.$i])){   
          $query="INSERT INTO `wp_slider` (`image`, `link`, `content`,`name`) VALUES ('".$_POST['wpcs_options']['slide_image'.$i]."', '".$_POST['wpcs_options']['slide_imagelink'.$i]."', '".$_POST['wpcs_options']['slide_imagetext'.$i]."', '".$_POST['name']."');";
          $wpdb-&gt;query($query);
              }
          }
          //update_option('bx_options', $_POST['bx_options']);
      }
      if($_GET['mode']=='delete'){
          $wpdb-&gt;query("Delete from wp_slider where id='".$_GET['id']."'");
          header("location:admin.php?page=bxslider/slider.php" );
      }
      if($_GET['mode']=='edit' &amp;&amp; isset($_POST['id'])){
  
      $wpdb-&gt;query("update wp_slider set image='".$_POST['wpcs_options']['slide_image1']."', link='".$_POST['wpcs_options']['slide_imagelink1']."', content='".$_POST['wpcs_options']['slide_imagetext1'] ."',name='".$_POST['name']  ."' where id='".$_POST['id']."'");
          header("location:admin.php?page=bxslider/slider.php" ); 
  
      }
  
  
  }
  
  
  function createTable()
  {
        global $wpdb;
  
      $qndTable = $wpdb-&gt;prefix . "slider";
  
      if($wpdb-&gt;get_var("show tables like '$qndTable'") != $qndTable)
      {
          $create =   "CREATE TABLE " . $qndTable . " (
                                `id` int(11) NOT NULL AUTO_INCREMENT,
                                `image` varchar(255) NOT NULL,
                                `link` varchar(255) NOT NULL,
                                `content` text NOT NULL,
                                `name` varchar(255) NOT NULL,
                                PRIMARY KEY (`id`)
                              ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;";
  
          require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
          dbDelta($create);
  
      }
  }
  function deleteTable(){
       global $wpdb;
       $wpdb-&gt;query("DROP table ".$wpdb-&gt;prefix . "slider");
  
  }
  
  register_activation_hook(__FILE__,  'createTable');
  
  register_deactivation_hook(__FILE__,  'deleteTable');
  
  
  function bxcontent_slider( $atts ) {
      $sname=$atts[slider];
      $type=$atts[type];
      if(!$type) $type='image';
      global $wpdb;
      $query="Select * from wp_slider where name='".$sname."' ";
      $slider_res=$wpdb-&gt;get_results($query);
  
  
      addbx_head($sname);         
  
      if($type=='image'){
      $content .='&lt;ul class="'.$sname.'"&gt;';   
          foreach($slider_res as $slider){
              $content .= '&lt;li&gt;&lt;img src="'.$slider-&gt;image.'" /&gt;&lt;/li&gt;';
          }
      $content .='&lt;/ul&gt;';
      }elseif($type=='content'){
      $content .='&lt;div class="'.$sname.'"&gt;';  
          foreach($slider_res as $slider){
          $content .= '&lt;div&gt;'.$slider-&gt;content.'&lt;/div&gt;';
          }
          $content .='&lt;/div&gt;';
      }
  
      return $content;
      // echo  "slider = {$atts[slider]}";
  }
  add_shortcode('bxcontentslider', 'bxcontent_slider');
  function addbx_head($sname){
  ?&gt;
  &lt;script language='javascript'&gt;
                  var $jquery = jQuery.noConflict(); 
                  $jquery(document).ready(function(){
  
                    $jquery('.&lt;?php echo $sname ?&gt;').bxSlider({
                        auto:true,
                        controls:false,
                         pagerCustom: '#bx-pager-&lt;?php echo $sname?&gt;',
                         pagerActiveClass:"active"
                        });
  
  
                  });
  
                  &lt;/script&gt;
  &lt;?
  }
  function add_bxjs() {
      /*wp_enqueue_script(
          'custom-script',
          plugins_url('/bxslider/jquery.bxslider.js', __FILE__ ) ,
          array( 'jquery' )
      );*/
      wp_enqueue_style('bxstyle', plugins_url('/bxslider/jquery.bxslider.css', __FILE__ ));
      wp_enqueue_script('jquery',plugins_url('/bxslider/jquery.min.js', __FILE__ ), array('jquery'));
      wp_enqueue_script('easing',plugins_url('/bxslider/jquery.easing.1.3.js', __FILE__ ), array('jquery'));
      wp_enqueue_script('bxscript',plugins_url('/bxslider/jquery.bxslider.js', __FILE__ ), array('jquery'));
  }
  
  add_action( 'wp_enqueue_scripts', 'add_bxjs' );
  </code></pre>
  
  <p>The line 175 stated is have add_action( 'wp_enqueue_scripts', 'add_bxjs' );</p>