Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Syntax Error, unexpected T_STRING WordPress



The site in question:

I brought this theme from Theme Forest:

But after uploading the theme via FTP and activating I am left with a broken site with this error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/25/d161120255/htdocs/testing/wp-content/themes/rockwell_v1.3/freshwork/functions/freshoptions.php on line 7

I will message anyone who is willing to help out FTP access and wp login details for the site.

But if it can be solved easier than this, I would very much appreciate the help.



Answers (5)


Utkarsh Kukreti answers:

Please message me the details.

Utkarsh Kukreti comments:

Thanks for the PM.

Just checked - your site is on PHP Version 4.4.9, and that line in freshoptions.php uses some PHP OOP stuff that requires PHP 5.2+

Steven Ellis comments:

link to freshoptions.php above.


Utkarsh Kukreti comments:

Added the code mentioned on to .htaccess.

Steven Ellis comments:

This has help and it now works!! Thank you!

I guess this is what I get for using 1and1!!!!


Maor Barazany answers:

Find the above file (freshoptions.php) and paste it here


Fahad Murtaza answers:

@Maor has suggested the right thing.


Just Me answers:

please check your PHP version. It could be you are using PHP 4 while needing PHP5.

Just Me comments:

I doubt you are using the right PHP version. It is probably set in .htaccess and missing at this moment.


Dan | gteh answers:

I believe that is caused by using the wrong PHP version. It looks like the theme was developed for use with PHP5 and your hosting is using PHP4. See if your host allows you to switch from PHP 4 to PHP5

Most hosting companies give you an option in the control panel to change which version of PHP you are using

Steven Ellis comments:

I am Using PHP5. I am hosted with 1and1.

Dan | gteh comments:

1and1 requires you to place this code in your .htaccess file in order to use PHP5. Can you confirm it is there?

AddType x-mapp-php5 .php

Dan | gteh comments:

they use 4 by default for some odd reason