View Full Version : PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/test123/public_
Nullification
10-02-2012, 11:00 PM
I just restored my forum with a backup today, and I'm getting white page.
checked server error log and I see this:
2012-10-03 03:54:32.096 [NOTICE] [1
:33475-0#APVH_xxxxx.net] [STDERR] PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/test123/public_html/forum.php on line 634
Simon Lloyd
10-02-2012, 11:17 PM
You may have an extra comma or missing a ; in whichever plugin you edited, try disabling all your add-on products and enabling them one by one until you get the error then you know which one to look at.
Nullification
10-02-2012, 11:24 PM
I tried disabling all plugins by config.php and it still doesn't work. This shows up on all pages, except images files.
Can you look at line 634 of forum.php and see what it looks like?
Nullification
10-02-2012, 11:30 PM
// get total members and newest member from template
--------------- Added 1349224337 at 1349224337 ---------------
I get this error when I remove it, I don't think its related to the file at all./
[STDERR] PHP Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/test11/public_html/includes/init.php on line 326
2012-10-03 04:30:49.762 [NOTICE] [120.1:37549-0#APVH_xxx.net] [STDERR] PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/test11/public_html/forum.php on line 633
2012-10-03 04:30:50.160 [NOTICE] [120.1198:37559-0#APVH_xxx.net] [STDERR] PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/test11/public_html/forum.php on line 633
Really? Hmm...what version do you have? I'm looking at vb4.20 PL2 and it looks like this:
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;
$ad_location['board_after_forums'] = vB_Template::create('ad_board_after_forums')->render();
$ad_location['board_below_whats_going_on'] = vB_Template::create('ad_board_below_whats_going_on ')->render();
(the first $ad_location line is 634). That error is saying something is wrong with a -> being in the wrong place, so I don't see how it could be a problem with that comment.
You could just try re-uploading forum.php from the vb distribution.
Nullification
10-02-2012, 11:37 PM
I already tried.. re-uploaded the entire package twice, just downloaded the zip off vbulletin like a hour ago.
That's strange that you got that error in init.php - were you always getting that? The error in forum.php after you removed the line came out one line less than before, which is what you'd expect to happen.
Do you know what version of PHP you have?
Nullification
10-02-2012, 11:49 PM
5.3.17
That should be OK. And that error in init.php is in an area that only gets executed when you disable hooks, so that's probably why that started appearing.
I'm kind of stumped. When you uploaded the files, did you select ASCII/binary mode? Maybe try uploading with different settings for that.
Edit: I searched for that error on vbulletin.com and found a few mentions of it, but no answers. However, someone did mention that with some hosts you need to use a .htaccess file to direct it to use php5, otherwise you're actually getting php4. Did you try going to the adminCP (assuming you can get there) and looking at "view php info" under Maintenance?
Simon Lloyd
10-03-2012, 12:17 AM
When you've done this in config.php https://www.vbulletin.com/docs/html/disable_plugins and you try accessing www.yoursite.com/admincp/index.php what do you get?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.