PDA

View Full Version : help getting this error (just came on my site after someone did somin)


honcho
11-15-2008, 04:26 PM
getting this error can someone tell me what to do to fix it

Database error in vBulletin 3.7.3:

Invalid SQL:

SELECT COUNT(*)
FROM phpbb_userlist AS userlist
LEFT JOIN phpbb_userlist AS userlist_ignore ON (userlist_ignore.userid = 1 AND userlist_ignore.relationid = userlist.userid AND userlist_ignore.type = 'ignore')
WHERE userlist.relationid = 1
AND userlist.friend = 'pending' AND userlist_ignore.type IS NULL;

MySQL Error : Table 'web82-honcho.phpbb_userlist' doesn't exist
Error Number : 1146
Request Date : Saturday, November 15th 2008 @ 06:22:05 PM
Error Date : Saturday, November 15th 2008 @ 06:22:05 PM
Script :
Referrer :
IP Address :
Username :
Classname : vb_database
MySQL Version : 5.0.67-community

Lynne
11-15-2008, 04:58 PM
Does the table userlist exist? Look in your list of tables in maintenance > repair/optimize tables and see if it's listed. If not, you will need to add it. I don't know what that query is, you may have to ask at vb.com for it.

honcho
11-15-2008, 05:01 PM
its not there lynne but i have a bk up of my site in july where would ir be in there to reupload it

Lynne
11-15-2008, 05:05 PM
You may use a backup, but then you will lose all your posts since then. I think the best thing to do is get the query to run to make a new userlist table. All it is is the list of buddies and ignored users for everyone. It's not a big loss if they have to redo that. I think it's better to have them redo that than lose all the posts since then.

honcho
11-15-2008, 05:08 PM
yeah that sounds better to me how would i go about this please im new to all this

Lynne
11-15-2008, 05:14 PM
You need to get the query to recreate that table. I don't know what it is. You will need to ask over at vb.com.

honcho
11-15-2008, 05:15 PM
ok many thanx for your help

honcho
11-17-2008, 07:55 AM
ok i have had no joy over there and now i have to reinstall vb and transfer databases so site will work again anyone help me with this as its a bit out of my league to be honest

i know its a bit cheeky to ask in here for this massive task but i have no other option my host have tryed to restore my site and this is what they have said ........

Thanks for your reply.

If you are still having some problems with the forum I would advise reinstalling vBulletin and importing the database that has been restored which should fix the problem for you.

You need to make sure you take a backup of the database before you reinstall the forum, either through vBulletin itself or from the database import/export tool in the eXtend control panel.

many thanx in advance

Lynne
11-17-2008, 02:55 PM
Did you try putting in a support ticket and asking for the query to recreate that table? Or did you make a thread asking for the query? How long did you wait for an answer? I know they go through and try to answer every thread over there.

honcho
11-17-2008, 08:07 PM
ok i decided ill just reinstall vb and import posts and users daya

how would i go about this any one know any gd posts for tutorials on how to install vb

pdf format ect ect

also what areas do i need to bk up for


posts
users


so i dont loose this info ,

sorry to be a pain if this already posted but i cant find it and am totaly new to this vb stuff
but am willing to learn as it will save me lots of hassle in long ru

Lynne
11-17-2008, 08:34 PM
That is really the more difficult way to go about this. And, I really have no experience in what you want to do, so I'll have to let someone else help with that.

honcho
11-17-2008, 08:47 PM
ok lynne many thanx for you help may host said i could do this easyer but just need to know what files to take of server or what to replace ect ect

to go bk to 3.7.3 and reinstall all hacks that all but save userlists and posts and passwords ect ect

--------------- Added 1226963319 at 1226963319 ---------------

i have all msql files bked up from host bk up of a cpl oh weeks ago

so should this not store all posts and users

SEOvB
11-17-2008, 09:49 PM
Well if you can't recreate the userlist table for whatever reason.

1. Reinstall vBulletin.
2. Download the Impex system from vBulletin.com/members
3. Use impex to import all the readable data from your current database into the new one.

Instructions on how to install vBulletin and use Impex can be found at http://vbulletin.com/docs they've got it explained the easiest.

honcho
11-18-2008, 07:53 AM
thanx will this also do the posts as well

Carnage
11-18-2008, 09:22 AM
To recreate the userlist table:



CREATE TABLE IF NOT EXISTS `phpbb_userlist` (
`userid` int(10) unsigned NOT NULL default '0',
`relationid` int(10) unsigned NOT NULL default '0',
`type` enum('buddy','ignore') NOT NULL default 'buddy',
`friend` enum('yes','no','pending','denied') NOT NULL default 'no',
PRIMARY KEY (`userid`,`relationid`,`type`),
KEY `userid` (`relationid`),
KEY `relationid` (`relationid`,`type`,`friend`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

honcho
11-18-2008, 12:49 PM
ok tnahx guys but i think i need someone to help me do this as im pretty lost on these last 2 posts

im ok @ installintg mods ec6te ct but tyhe whole other stuff im lost unfort

Lynne
11-18-2008, 01:39 PM
ok tnahx guys but i think i need someone to help me do this as im pretty lost on these last 2 posts

im ok @ installintg mods ec6te ct but tyhe whole other stuff im lost unfort
You want to go to your Admin CP > Maintenance > Execute SQL Query and input the query in the code box below into the Manual Query field on that page and hit Continue. If you get No Permission, then you will need to go into your config.php file and find the line about which users have permission to perform mysql queries and add your userid into that line. Save/upload, go back and try again.



To recreate the userlist table:



CREATE TABLE IF NOT EXISTS `phpbb_userlist` (
`userid` int(10) unsigned NOT NULL default '0',
`relationid` int(10) unsigned NOT NULL default '0',
`type` enum('buddy','ignore') NOT NULL default 'buddy',
`friend` enum('yes','no','pending','denied') NOT NULL default 'no',
PRIMARY KEY (`userid`,`relationid`,`type`),
KEY `userid` (`relationid`),
KEY `relationid` (`relationid`,`type`,`friend`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

honcho
11-18-2008, 03:53 PM
i cant access my admin cp panel lynne it wont let me in @ all i get errors when trying access in there as i wa saying my forum is totaly fecked

Lynne
11-18-2008, 03:58 PM
Then do it through phpMyAdmin or whatever your host has set up for you.

honcho
11-18-2008, 04:12 PM
and i do this after the reinstall lynne yes sorry to be a real doppy person here

Lynne
11-18-2008, 05:11 PM
No, you leave your database as is and run that query to add the userlist table. The error you first posted said that table didn't exist, so that is the query to create it. That should hopefully get rid of the error you were getting.

honcho
11-18-2008, 05:43 PM
ok i now get this error peeps

Warning: array_keys() [function.array-keys]: The first argument should be an array in [path]/includes/functions.php on line 4098

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4098

and still admin cp

many thanx for being patient with mew i know i must be bugging you all now

Carnage
11-18-2008, 06:34 PM
Could you open up functions.php and copy paste me lines 4095 - 4100?

Need to know which array isn't there.

honcho
11-18-2008, 06:59 PM
ok thanx carnage here is the lines

$user['forumpermissions'] = array();
}

foreach (array_keys($vbulletin->forumcache) AS $forumid)
{
if (!isset($user['forumpermissions']["$forumid"]))
{
$user['forumpermissions']["$forumid"] = 0;
}
foreach ($membergroupids AS $usergroupid)
{
$user['forumpermissions']["$forumid"] |= $vbulletin->forumcache["$forumid"]['permissions']["$usergroupid"];
}
foreach ($infractiongroupids AS $usergroupid)
{
$user['forumpermissions']["$forumid"] &= $vbulletin->forumcache["$forumid"]['permissions']["$usergroupid"];
}
}

// do access mask stuff if required
if ($vbulletin->options['enableaccess'] AND $user['hasaccessmask'] == 1)
{
if (empty($accesscache["$user[userid]"]))
{
// query access masks
// the ordercontrol is required! (3.5 bug 1878)
$accessmasks = $vbulletin->db->query_read_slave("

there's probably more than you needed but beter more than less lol

SEOvB
11-18-2008, 07:46 PM
ok thanx carnage here is the lines

$user['forumpermissions'] = array();
}

foreach (array_keys($vbulletin->forumcache) AS $forumid)
{
if (!isset($user['forumpermissions']["$forumid"]))
{
$user['forumpermissions']["$forumid"] = 0;
}
foreach ($membergroupids AS $usergroupid)
{
$user['forumpermissions']["$forumid"] |= $vbulletin->forumcache["$forumid"]['permissions']["$usergroupid"];
}
foreach ($infractiongroupids AS $usergroupid)
{
$user['forumpermissions']["$forumid"] &= $vbulletin->forumcache["$forumid"]['permissions']["$usergroupid"];
}
}

// do access mask stuff if required
if ($vbulletin->options['enableaccess'] AND $user['hasaccessmask'] == 1)
{
if (empty($accesscache["$user[userid]"]))
{
// query access masks
// the ordercontrol is required! (3.5 bug 1878)
$accessmasks = $vbulletin->db->query_read_slave("


there's probably more than you needed but beter more than less lol

Reupload your vBulletin files make sure the old ones are being over written. Make sure you've disabled plugins via the config.php file edit and then attempt to run the upgrade script if you aren't at the latest version.

Carnage
11-18-2008, 08:11 PM
frds: that wont help. The issue is caused here: $vbulletin->forumcache

obviously for some reason the forumcache isn't there.

honcho
11-18-2008, 08:16 PM
so what do you think i should do guys as i am willing to start over as long as i can keep posts and users would just need some info on what to do when board is reinstalled as i have bk ups of my sql ect ect and just wanna get board bk online asap

but if it can be done via other ways in fine with that aswell

its just ive been banging ma head of a brick wall for a cpl oh days now and just well peeved of lol:up:

Carnage
11-18-2008, 08:26 PM
if you have a full backup; try this.


<?php
include("./includes/adminfunctions.php");
build_forum_permissions();
?>


save it as rebuildforumcache.php and upload to your main directory.

Then navigate to http://<your site url>/rebuildforumcache.php

honcho
11-18-2008, 10:25 PM
all sorted now guys many thanx for you help will be fixing the skins and mods now thanx again

Lynne
11-18-2008, 11:51 PM
You got it fixed! Yippeeeee! Now, first thing is Back It Up and put the backup someplace safe!

honcho
11-19-2008, 09:55 AM
yeah many thanx again guys for all your help