Title: Parse error: syntax error, unexpected T_STRING
Last modified: August 30, 2016

---

# Parse error: syntax error, unexpected T_STRING

 *  Resolved [rypher21](https://wordpress.org/support/users/rypher21/)
 * (@rypher21)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/)
 * Hi,
 * Im having an issue with the wordpress migration in dot.ph – “Parse error: syntax
   error, unexpected T_STRING in /home/incorporatio/incorporation.ph/wp-content/
   themes/konstruct/libraries/options-plus/loader.php on line 6”
 * Im using the same template on our other websites and haven’t encountered any 
   errors. Any input would be greatly appreciated.
 * Below is the loader.php
 * <?php
    /** * WARNING: This file is part of the OptionsPlus library. DO NOT edit*
   this file under any circumstances. */ namespace OptionsPlus;
 * // Prevent direct access to this file
    defined( ‘ABSPATH’ ) or die();
 * require_once __DIR__ . ‘/assets.php’;
    require_once __DIR__ . ‘/helper.php’; 
   require_once __DIR__ . ‘/fonts.php’;
 * /**
    * Register auto loader */ spl_autoload_register( __NAMESPACE__ . ‘\Loader::
   load’ );
 * /**
    * Class loader for OptionsPlus library * * [@package](https://wordpress.org/support/users/package/)
   OptionsPlus * [@category](https://wordpress.org/support/users/category/) Library*/
   final class Loader { public static function load( $class ) { // Has namespace
   if ( strpos( $class, ‘OptionsPlus\\’ ) === 0 ) { $segments = array_slice( explode(‘\\’,
   $class ), 1 ); $classname = array_pop( $segments ); $filename = preg_replace(‘/([
   A-Z])/’, ‘-\\1’, $classname ); $filename = trim( strtolower( $filename ), ‘-‘);
   $path = strtolower( implode( ‘/’, $segments ) ); $file = op_directory_path() .‘/’.
   $path . ‘/’ . $filename . ‘.php’;
 *  if ( is_file( $file ) ) {
    require_once $file; } } } }

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

 *  [jack randall](https://wordpress.org/support/users/theotherlebowski/)
 * (@theotherlebowski)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555365)
 * the error message is telling you that the problem is on line 6 of the file, what’s
   actually on line 6 of the file? (there are no line numbers in the code you pasted…)
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555385)
 * What version of PHP are you running on the site that’s having this problem? IIRC,
   that’s the error you receive if you’re trying to use namespacing on a version
   of PHP older than 5.3.
 *  Thread Starter [rypher21](https://wordpress.org/support/users/rypher21/)
 * (@rypher21)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555481)
 * Hi thank you for the response:
 * the PHP Version of the site is PHP Version 5.2.17
 * line 6: namespace OptionsPlus;
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555484)
 * Namespacing isn’t available on PHP 5.2, so you aren’t going to be able to use
   that plugin as is. You’ll need to either upgrade PHP on the server or ask if 
   the plugin authors have a version that doesn’t use namespacing.
 *  Thread Starter [rypher21](https://wordpress.org/support/users/rypher21/)
 * (@rypher21)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555486)
 * Thank you very much!! I will contact them and ask to upgrade the PHP version 
   that’s installed in the server…:)

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

The topic ‘Parse error: syntax error, unexpected T_STRING’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [rypher21](https://wordpress.org/support/users/rypher21/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-help-3/#post-6555486)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
