MyBB Community Forums

Full Version: Parse error: syntax error, unexpected T_STRING
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The error which I get is:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/steamava/public_html/domaingamerone.net/inc/class_error.php on line 54

It happens when you visit:

http://gamerone.net/

How does one fix it?

A bit more information for you, the website did work perfectly with hostgator.com at the moment, however I have migrated to another host and this error has popped up. I'm now seeing if the website can work good with this UK host I'm trying, since I'd like a more local server, and to be with a British company. Anyway I have contacted them for support, they said go to you so here I am, and if all of the website including sub domains can't be made to work right then I'll just point my domain back to hostgator again instead of their servers.

I hope you can help.

Regards,
Graham.
Your host doesn't run PHP5.1 or newer, which should be common on hosts these days.

Or, if you are already running this newer version, reupload the inc/class_error.php file from a fresh download.
Your copy of ./inc/class_error.php has been edited too, it should say line 51 in the error, not 54, but yes, the problem is caused by an old version of PHP.
It says PHP version 5.2.16 in cPanel. Even using an original copy of ./inc/class_error.php just changed the error to line 51. Any more ideas?
Well, if you're getting this error, it's not running 5.2.16. Check that it's actually using 5.2.16 and that's not just what's available to you. Lots of people on cPanel have had PHP 5.1 or 5.2 showing on the control panel but they've actually been running 4.4.

Create a file called phpinfo.php or something in your file system, and put this in it:

<?php
phpinfo();
?>

Run that file in your browser, what does it say the version is at the top??