what version of vbulletin are you using?
check if you have following vbulletin setting:
ACP->Settings->options Site Name / URL / Contact Details
there setting:
Always use Forum URL as Base Path
for vbgallery to work without error you need this setting to NO
if you need to have this setting to yes (for vbulletin) you can always apply this fix:
Issues with submit comment!
(use "better fix")
this is the only explanation I have, because search works well on my site.
Luc