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 07-02-2015, 07:50 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database Error when Searching

I received an email which notifies me a database error, it is as below

My forum doesn't happen a problem with it, search functions are still working.
Can anyone spot where the problem comes from, and how to reproduce it?

Quote:
Database error in vBulletin 4.2.2:

Invalid SQL:

SELECT post.*,userfield.*, usertextfield.*, user.*, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar,
customavatar.dateline AS avatardateline, customavatar.width AS width, customavatar.height AS height,
customavatar.height_thumb AS height_thumb, customavatar.width_thumb AS width_thumb, customavatar.filedata_thumb
FROM post AS post
LEFT JOIN user AS user ON (user.userid = post.userid)
LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (user.userid = usertextfield.userid)
LEFT JOIN avatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN customavatar AS customavatar ON (customavatar.userid = post.userid)
WHERE post.postid IN (.);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 10
Error Number : 1064
Request Date : Thursday, July 2nd 2015 @ 10:15:46 AM
Error Date : Thursday, July 2nd 2015 @ 10:15:46 AM
Script : http://xxxx.com/forum/search.php?searchid=318478
Referrer : http://xxxx.com/forum/search.php
IP Address : 60.xx.xx.xx
Username : someone
Classname : vB_Database
Reply With Quote
  #2  
Old 07-02-2015, 06:32 PM
tanzeelniazi tanzeelniazi is offline
 
Join Date: Apr 2012
Posts: 375
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i think you need to repair tables in php admin
Reply With Quote
  #3  
Old 07-02-2015, 09:25 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Invalid SQL errors are almost always related to modified code.

To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

[Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

Next, disable all products (except vB Blog and vB CMS if you are running the Suite.)

Admin CP -> Plugins & Products -> Manage Products -> Disable

Then manually uncheck all plugins that are not for 'vBulletin Blog' and vBulletin CMS' here:

Admin CP -> Plugins & Products -> Plugin Manager

Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

Do you have the same problem?
Reply With Quote
  #4  
Old 07-03-2015, 12:09 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your replies.

But tasks mentioned above wouldn't solve the situation. The problem isn't consistent, it happened only once in a while. I'm trying to debug and reproduce but it will take too much time.

The only idea I can see through right now is the error comes from "Find user's latest posts"
Reply With Quote
  #5  
Old 07-03-2015, 02:13 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should follow my above, post it will at least rule out some things that can cause these problems and if it is what I said above it will find what is causing it so a fix can be found, but if you don't want to even try why post for help when a possible solution might be just a few mins of work
Reply With Quote
  #6  
Old 07-05-2015, 09:35 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, it seems that you misunderstood.

I will soon do as you mentioned but not now. My forum is quite large so I can't easily close it for a while just to find an error which rarely occurs (and doesn't really affect security)

However, the tasks you tell me to do are more likely reinstalling the forum, so I'm afraid I couldn't follow thoroughly.
Reply With Quote
  #7  
Old 07-05-2015, 12:31 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are not reinstalling your forum only uploading the files and you don't need to close your site while doing it
Reply With Quote
  #8  
Old 07-05-2015, 02:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't want to close your live site, then make a database backup of the live site and create a test forum. Then you can try to reproduce the error on the test forum and diagnose the problem there.
Reply With Quote
  #9  
Old 12-08-2015, 06:25 PM
QSTR QSTR is offline
 
Join Date: Nov 2010
Location: Poland
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@master

I have the same error.
If I type in search 'dac diy' as unregistered user.... and I switch to the second page, voila:
PHP Code:
SELECT post.*,userfield.*, usertextfield.*, user.*, IF(displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupid,avatar.avatarpathNOT ISNULL(customavatar.userid) AS hascustomavatar,
                        
customavatar.dateline AS avatardatelinecustomavatar.width AS widthcustomavatar.height AS height,
                        
customavatar.height_thumb AS height_thumbcustomavatar.width_thumb AS width_thumbcustomavatar.filedata_thumb
            FROM post 
AS post
                LEFT JOIN user 
AS user ON (user.userid post.userid)
LEFT JOIN userfield AS userfield ON (user.userid userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (user.userid usertextfield.userid)
LEFT JOIN avatar AS avatar ON (avatar.avatarid user.avatarid)
LEFT JOIN customavatar AS customavatar ON (customavatar.userid post.userid)
            
WHERE post.postid IN (.); 
vb 4.2.3, hooks disabled
No susp. files found.

PM with your plugins/products list. We can compare them.

Thanks.

--------------- Added [DATE]1449689399[/DATE] at [TIME]1449689399[/TIME] ---------------

Soo, I spent a half day with this, and I got something - so, what I did:
- copy of my PRD -> TEST, 1:1
- all non standard plugins/products -> DELETE
- cron jobs -> DISABLED
- overwrite vB files -> DONE
- check susp. files and delete non vB files -> DONE
- create new, clean style -> DONE
and.... what, nothing....

But - the funny thing now.
I didn't want to lose my time for Human Verfication, so I went to CP and disabled this function.
And... haha. Its working!

When I enable 'Human Verification' (Q&A) it crashes my board when I'm searching fe. 'dac diy' - of course I have to switch to the second page (or further)

@VB support - I can share You my board with files/db (with wiped passwords / emails / etc.) for tests.
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 12:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08441 seconds
  • Memory Usage 2,261KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete