Title: Parse Errors
Last modified: August 24, 2016

---

# Parse Errors

 *  Resolved [WrdprsKN](https://wordpress.org/support/users/wrdprskn/)
 * (@wrdprskn)
 * [11 years ago](https://wordpress.org/support/topic/parse-errors-6/)
 * I am transferring a WordPress/Xenforo site to another server. I’ve moved everything
   over — databases and files — and most things are working. However, I am getting
   a parse error message on WordPress on the new server. The posts display, but 
   above them it says:
 * **Parse error**: syntax error, unexpected end of file in **/opt/bitnami/apache2/
   htdocs/weblog/wp-content/plugins/genesis-simple-hooks/plugin.php(123) : eval()’
   d code** on line **15**
 * What would cause this? Thank you.
 * If it helps, below is the text of the plugins.php file:
 *     ```
       <?php
       /*
       	Plugin Name: Genesis Simple Hooks
       	Plugin URI: http://www.studiopress.com/plugins/simple-hooks
   
       	Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.
   
       	Author: Nathan Rice
       	Author URI: http://www.nathanrice.net/
   
       	Version: 2.1.0
   
       	License: GNU General Public License v2.0 (or later)
       	License URI: http://www.opensource.org/licenses/gpl-license.php
       */
   
       //* Define our constants
       define( 'SIMPLEHOOKS_SETTINGS_FIELD', 'simplehooks-settings' );
       define( 'SIMPLEHOOKS_PLUGIN_DIR', dirname( __FILE__ ) );
   
       register_activation_hook( __FILE__, 'simplehooks_activation' );
       /**
        * This function runs on plugin activation. It checks to make sure Genesis
        * or a Genesis child theme is active. If not, it deactivates itself.
        *
        * @since 0.1.0
        */
       function simplehooks_activation() {
   
       	if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, '2.1.0', '>=' ) )
       		simplehooks_deactivate( '2.1.0', '3.9.2' );
   
       }
   
       /**
        * Deactivate Simple Hooks.
        *
        * This function deactivates Simple Hooks.
        *
        * @since 1.8.0.2
        */
       function simplehooks_deactivate( $genesis_version = '2.1.0', $wp_version = '3.9.2' ) {
   
       	deactivate_plugins( plugin_basename( __FILE__ ) );
       	wp_die( sprintf( __( 'Sorry, you cannot run Simple Hooks without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', 'simplehooks' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) );
   
       }
   
       add_action( 'genesis_init', 'simplehooks_init', 20 );
       /**
        * Load admin menu and helper functions. Hooked to <code>genesis_init</code>.
        *
        * @since 1.8.0
        */
       function simplehooks_init() {
   
       	//* Admin Menu
       	if ( is_admin() )
       		require_once( SIMPLEHOOKS_PLUGIN_DIR . '/admin.php' );
   
       	//* Helper functions
       	require_once( SIMPLEHOOKS_PLUGIN_DIR . '/functions.php' );
   
       }
   
       add_action( 'genesis_init', 'simplehooks_execute_hooks', 20 );
       /**
        * The following code loops through all the hooks, and attempts to
        * execute the code in the proper location.
        *
        * @uses simplehooks_execute_hook() as a callback.
        *
        * @since 0.1
        */
       function simplehooks_execute_hooks() {
   
       	$hooks = get_option( SIMPLEHOOKS_SETTINGS_FIELD );
   
       	foreach ( (array) $hooks as $hook => $array ) {
   
       		//* Add new content to hook
       		if ( simplehooks_get_option( $hook, 'content' ) ) {
       			add_action( $hook, 'simplehooks_execute_hook' );
       		}
   
       		//* Unhook stuff
       		if ( isset( $array['unhook'] ) ) {
   
       			foreach( (array) $array['unhook'] as $function ) {
   
       				remove_action( $hook, $function );
   
       			}
   
       		}
   
       	}
   
       }
   
       /**
        * The following function executes any code meant to be hooked.
        * It checks to see if shortcodes or PHP should be executed as well.
        *
        * @uses simplehooks_get_option()
        *
        * @since 0.1
        */
       function simplehooks_execute_hook() {
   
       	$hook = current_filter();
       	$content = simplehooks_get_option( $hook, 'content' );
   
       	if( ! $hook || ! $content )
       		return;
   
       	$shortcodes = simplehooks_get_option( $hook, 'shortcodes' );
       	$php = simplehooks_get_option( $hook, 'php' );
   
       	$value = $shortcodes ? do_shortcode( $content ) : $content;
   
       	if ( $php )
       		eval( "?>$value<?php " );
       	else
       		echo $value;
   
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [schulte](https://wordpress.org/support/users/schulte/)
 * (@schulte)
 * [11 years ago](https://wordpress.org/support/topic/parse-errors-6/#post-6173186)
 * Hey there,
 * I suggest that you drop your question over on the Genesis Simple Hooks plugin
   support forum. The plugin developer or others using the plugin may have some 
   insight. Nothing jumped out at me during a search for similar, past issues.
 * [https://wordpress.org/support/plugin/genesis-simple-hooks](https://wordpress.org/support/plugin/genesis-simple-hooks)
 *  Thread Starter [WrdprsKN](https://wordpress.org/support/users/wrdprskn/)
 * (@wrdprskn)
 * [11 years ago](https://wordpress.org/support/topic/parse-errors-6/#post-6173360)
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Parse Errors’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [WrdprsKN](https://wordpress.org/support/users/wrdprskn/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/parse-errors-6/#post-6173360)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
