MyBB Community Forums

Full Version: Great New Error. Parse Error?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Check out this new error I keep getting now when I go to my webpage (lrsdhwhelp.com)

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/24/d341733217/htdocs/lrsdhwhelp/inc/class_error.php on line 51

Any ideas on what to do?
First - if you've manually edited the file, reupload ./inc/class_error.php for your MyBB version.

Otherwise, it will typically be a unescaped template variable. Go through your error templates (custom ones are highlighted green) and make sure all PHP variables are encased in { } - e.g.

<div>I am {$mybb->user['username']}</div>
If it's not that it looks like your host doesn't run PHP 5.1+.
99% chance that your host doesn't have PHP5.1 or greater.
Heh. Helps if I look in the right file. Shy

The only slight problem is this 'new' error. If it's only just appeared, I'd be surprised if you were able to run 1.6 previously...
Well this is a "new" error to me; meaning that I previously had a 403 error that I fixed. I tried looking for missing } in the php script, but I had no idea exactly where to look, but I haven't edited the files at all, so I would assume that there wouldn't be anything missing in the code. My host is 1&1 (1and1.com) and I was look through there website and found something in the FAQ about PHP 5,5.1, and/or 5.2 so I'm assuming they support PHP 5.1+. So as a last resort I reuploaded the class_error.php file, but had no luck. I'm still getting the same error, so any more suggestions would be nice. And yes, this is Mybb 1.6.
Another user on 1&1 was still on PHP 4, you probably are too. Ask them to upgrade your account to PHP 5.1+. What they support/offer and what your account has isn't necessarily the same.
(2010-09-21, 02:52 PM)MattRogowski Wrote: [ -> ]Another user on 1&1 was still on PHP 4, you probably are too. Ask them to upgrade your account to PHP 5.1+. What they support/offer and what your account has isn't necessarily the same.

Alright, I sent them a message asking what PHP version I had and if they could upgrade me to 5.1+. Hope it works!
If you're running 1.6 you can't even install it of you're not running PHP 5. Even then, I'm surprised you don't get errors before the errorhandler is started.

Anyway, see what the host returns...
(2010-09-21, 11:19 PM)Tomm M Wrote: [ -> ]If you're running 1.6 you can't even install it of you're not running PHP 5. Even then, I'm surprised you don't get errors before the errorhandler is started.

Anyway, see what the host returns...

Well you are right, I've been getting random errors that I haven't even made it to the install. I found this link on how to upgrade to PHP 5 for 1&1 Hosting: http://faq.1and1.com/scripting_languages...ade/4.html
But my problem is that I don't know exactly where to put the code:
AddType x-mapp-php5 .php .php4
In my main directory (I guess) I have two folders for my 2 websites. I've already solved the problem to make sure to redirect the traffic from lrsdhwhelp.com to the lrsdhwhelp folder. But there is also a "Logs" folder which I cannot delete in the main directory. Ok, so the the tutorial says add the code to the .htaccess. The only problem is that there is an htaccess in the Log folder and I believe there is one some where in all the MyBB 1.6 files uploaded in the lrsdhwhelp folder. I try adding the code to the end either one, but I still kept getting an error.
*And no, I have not heard back from the hosting's support section yet about my problem.*
Pages: 1 2