Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2014, 05:46 AM
gajinoz gajinoz is offline
 
Join Date: Nov 2011
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Strange parse error

Does anyone have any idea what might be causing the following error?

Vers. 4.2.3

Parse error: syntax error, unexpected '<' in /home/xxxxxxxx/public_html/vb4/includes/class_core.php(4715) : eval()'d code on line 1

It happens every now and the. When doing something in the forum the whole page will suddenly go blank and be filled with many lines of the above.
Reply With Quote
  #2  
Old 11-02-2014, 07:45 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's caused by one of your templates which has an invalid expression or tag in it.
When it happens again, look at the template it uses and search in the template for any weird things related to "<".
Reply With Quote
Благодарность от:
Max Taxable
  #3  
Old 11-04-2014, 04:29 AM
gajinoz gajinoz is offline
 
Join Date: Nov 2011
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
It's caused by one of your templates which has an invalid expression or tag in it.
When it happens again, look at the template it uses and search in the template for any weird things related to "<".
OK, but how do I know what template to look at?
Reply With Quote
  #4  
Old 11-04-2014, 04:41 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What are you doing on your site when it happens? Also a link to your site so when we check we can tell you what template it is if an account is needed then please create a test account for us
Reply With Quote
  #5  
Old 11-04-2014, 04:53 AM
gajinoz gajinoz is offline
 
Join Date: Nov 2011
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
What are you doing on your site when it happens? Also a link to your site so when we check we can tell you what template it is if an account is needed then please create a test account for us
The problem I have is that it is VERY random and doesn't happen very often, in fact I have had only two people tell me that they are seeing it.

You could sit there on the site all day and chances are you'd never see it. Most of the times it's happened to me is when I'm viewing who's online then go back to the main forum. I'm not sure how you would determine the template because, when it happens the entire screen fills with line like the one I have in my first post. Nothing else at all. A simple refresh of the web page and it disappears.

I've been disabling plugins one by one trying to see which one could be the culprit but the problem happens so infrequently that you can never be sure if it's fixed or not so the process is a very long one.
Reply With Quote
  #6  
Old 11-04-2014, 03:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As already pointed out, that part of the code in class_core.php is rendering a template. Have you tried using a totally default style on your site and seeing if you still get the same error?
Reply With Quote
  #7  
Old 11-04-2014, 07:21 PM
gajinoz gajinoz is offline
 
Join Date: Nov 2011
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
As already pointed out, that part of the code in class_core.php is rendering a template. Have you tried using a totally default style on your site and seeing if you still get the same error?

It is a totally default style, I have never used any other than the default. I am also turning off the plugins one by one to see if one of those is causing it.

I understand it could be a template I simply don't know how to determine what template.
Reply With Quote
  #8  
Old 11-04-2014, 07:41 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gajinoz View Post
I am also turning off the plugins one by one to see if one of those is causing it.
That's a good idea. It's pretty common for plugins to change the template cache, so it could be that all your templates are OK.

I haven't tried this at all myself, but you might try editing file includes/class_core.php and (temporarily) changing the lines around line 4715 like this (the red parts are added):
Code:
if (strpos($template_code, '$final_rendered') !== false)
{
	ob_start();
	eval($template_code);
	if (($error = ob_get_clean()) !== '') {
		echo $error;
		echo "\nTemplate '{$this->template}'\n\n";
		var_dump(debug_backtrace());
	}
}
else

and maybe 'die' after the backtrace if you don't want a bunch of them. Again that would be temporary of course because you normally wouldn't want to be doing all that for every template.

If you want to try it and you aren't used to doing things like that, I'd suggest that you copy class_core.php to another name before changing it, that way if you run in to problems you can just copy it back.
Reply With Quote
  #9  
Old 11-04-2014, 08:35 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Login to your vB Admincp and click on "Settings>Options" on the side menu, then go to "General Settings" in the drop down and choose it. Now scroll down and find "Add Template Name in HTML Comments" tick "Yes" and then scroll down and save the settings. This will render the template name when you view the source of the site. Go to your site on the thread/page/posts/pm where ever this is happening and then right click anywhere in the browser screen on the page and choose "View Source". Now when you view the source you will see what templates are called in the code. The templates called are in green in the source view. This should help you narrow down the problem.

Also if you have a straggler "<" out there it will usually show all the time and be somewhere weird or look weird. But sometimes you do not always see it if you have a custom skin, it will disappear from time to time. This was a simple template coding error and can happen when a mod installs code into templates (if the developer does not check their code) or when you or someone else modifies the templates and makes a coding error. Basically you are looking for code that would look similar to this in the template. This is JUST an example NOT the code you need to search for:

Code:
<<a href="http://mysite.com">My Site.com</a>
Notice the double "<<" this is usually the cause of an error such as this. The correct way would be:

Code:
<a href="http://mysite.com">My Site.com</a>
See the difference? If you cannot place your URL here in this thread for help for whatever reason then you will have to actually search for this error, but as stated above if you turn on the template tags and then give us a link to your site one of us should be able to spot it and tell you where/what to edit. Otherwise its a bit hard to help with little info, kinda like trying to help in the dark when you need to see.
Reply With Quote
  #10  
Old 11-04-2014, 08:52 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HM666 View Post
Login to your vB Admincp and click on "Settings>Options" on the side menu, then go to "General Settings" in the drop down and choose it. Now scroll down and find "Add Template Name in HTML Comments" tick "Yes"
Yeah, that's a good idea. I thought about that but since the OP said the page was blank, I was thinking that nothing was being output. But it could be that there's no html because of the error, but the comments are stll there. And it's easier to try that than to edit a file.

Quote:
Also if you have a straggler "<" out there it will usually show all the time and be somewhere weird or look weird. ...
I don't think an html error like that would cause this error. It would have to be somethign that causes the compiled template to be invalid php code.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09815 seconds
  • Memory Usage 2,266KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete