1 (edited by kev1952 2005-09-28 01:58)

Topic: Error: "Unable to fetch rank info"

I am still testing PunBB locally. I want to change the default user ranks and every time I click update I get this error. I have user ranks enabled in options. Everything else works perfectly - the system will work fine without the changes I want to make but I would preffer to be able to change them. Be gentle - first time I've ever played with something like this.... :|

EDIT: Just ran the debug mode and this is the error it returned:

File: E:\Website\htdocs\Forum\admin_ranks.php
Line: 84

PunBB reported: Unable to fetch rank info

Database reported: SQL logic error or missing database (Errno: 1)

Re: Error: "Unable to fetch rank info"

Enable debug mode
http://punbb.org/forums/viewtopic.php?id=2658

Re: Error: "Unable to fetch rank info"

I already did that - the error is listed in my first post. Have unistalled and reinstalled MySQL and the problem still persists.

Re: Error: "Unable to fetch rank info"

lol, I went to post before you edited but ended up posting after tongue
You're using SQLite?

Re: Error: "Unable to fetch rank info"

Good question - the version I downloaded and installed was presented as "Windows (x86) 4.1.14". I assume it was the full installation but my knowledge of MySQL is equivalent to my knowledge of rocket science - basically non-exsitant.:)

6 (edited by Smartys 2005-09-28 16:59)

Re: Error: "Unable to fetch rank info"

OK, MySQL it is tongue
Edit: Google returns 2 results, and both seem related to PunBB (although mods, not features) tongue
Can you use the DB Management plugin (download it from the Downloads page if you don't have it already) and run "describe #__ranks" (without the "s)

Re: Error: "Unable to fetch rank info"

Thanks... did as you suggested and get a "Sorry your database type is not yet supported" error.

8 (edited by Smartys 2005-09-29 22:59)

Re: Error: "Unable to fetch rank info"

How very odd...
Well, that means you're not using MySQL tongue
Mind copy/pasting me the $db_type line from config.php?

Re: Error: "Unable to fetch rank info"

Okay - I checked and it is MySQL Lite. Here is the line you asked for:

$db_type = 'sqlite';

10

Re: Error: "Unable to fetch rank info"

kev1952 wrote:

Okay - I checked and it is MySQL Lite. Here is the line you asked for:

$db_type = 'sqlite';

Well, if you're using MySQL, it should say:

$db_type = 'mysql';

Re: Error: "Unable to fetch rank info"

Thanks, but I tried that change and it wouldn't even startup. Have changed it back and can at least get in again.

Re: Error: "Unable to fetch rank info"

Re-install PunBB, make sure to use MySQL instead of SQLite

Re: Error: "Unable to fetch rank info"

I ran into this same problem. I fixed it by changing the query in admin_ranks.php from

// Make sure there isn't already a rank with the same min_posts value
        $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' && min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error());

to

// Make sure there isn't already a rank with the same min_posts value
        $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' and min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error());

as SQL was erroring on &&, being an improper operator.

I'm using PostgreSQL 8.1.3