View Full Version : Php / SQL type question...

13-09-2003, 01:24:23
... from a technophobe

Any of you chaps / chapesses know about php and/or SQL?

If so I could do with some advice please :)

Sir Penguin
13-09-2003, 02:41:43
Wow, you really are the opposite of Lurker.

What do you need to know?


13-09-2003, 10:22:08
Well 'somebody I know' is administrator of a forum run on phpBB 2 (which he knows from all too bitter personal experience is full of security holes)

A week ago someone exploited one of said holes and deleted the admin from the member list. This also meant config.php no longer had the right password in it so the whole forum was replaced by a

phpBB Critical Error: could not connect to database

It took the admin, who is fairly dull at this sort of thing, a week to figure that part out, and the forum is now back online.

But what 'he' can't figure out is how to re-insert himself to the member list as the site admin via phpMyAdmin, so that he can again administer the forum, and also have all his posts (which are still in the database) reappear.

I hope I explained that clearly enough, but have a sneaking suspicion that I didn't...

Sir Penguin
13-09-2003, 17:27:45
Then that's too hard for me. :)


13-09-2003, 17:41:46

I've now got myself back onto the memberlist (oops, what a giveaway - I mean to say 'the admin has got himself back onto the userlist...')

I can moderate posts/threads but still haven't managed to recover my admin priviliges. I guess there must be a field in the database tables that needs setting to make an administrator, but I have no idea which field in which table.

Anyone got any clues? Bueller?

13-09-2003, 23:47:35
Well, since I "work" for the competition I would suggest trying out some alternatives (http://www.tforum.org.pl) first, but if you insist on phpBB - why not create a "dummy" instance of the script, set up the admin account there, and just copy that account to your actual forum?

14-09-2003, 02:23:10
Does your SQL database use roles? If so, you may need to grant an admin role to your new Administrator account.

14-09-2003, 09:10:10
LoD: Thanks that's a top idea, problem though is my hosts only provide one SQL database, and I would need to set up a second parallel forum to create the dummy admin account in...

Darkstar: don't know I'm afraid. Have picked through all the tables with phpMyAdmin trying to find a likely looking field for enabling admin, but nothing stands out.

I have bought a vBulletin licence and will import everything to that in due course, but really need to sort this admin prob out first. Otherwise I will be importing myself as a non-administrator and will be back to square one.

In the words of the bard - bollocks

Scabrous Birdseed
14-09-2003, 09:17:29
So back up the forum, take it off-line, delete it, make a new one, copy the account to your local backup, put it back up.

14-09-2003, 09:23:11
Yep I can see how that should work out okay - thankyou Mr Scabrous

16-09-2003, 10:58:23
Let me know if you need a hand.

I know absolutely nothing about php/mysql as this site shows.

16-09-2003, 16:32:15
Originally posted by Nav
Let me know if you need a hand.

I know absolutely nothing about php/mysql as this site shows.

Thanks, I know even less, as my 'site' demonstrates all too well. But by some fluke the forum is now actually fixed. Biggest snag was re-synchronising it so that all the threads tied up properly.

Next I will move it to vBulletin, and also delete one user who is a complete asshole, imho. (If you're ever bored, REALLY bored, take a look at the forum and see if you can spot who it is. Clue: it isn't me. Don't think so anyway...)

But tonight Michael I have something far more important to do - I am going out on the piss and to have a curry :)

16-09-2003, 21:06:30
I was wondering why I was getting deja-vu with this thread. duh. Seems my brain is still on holiday (especially after that incident last night...)

If you still need to hack the admin in vbulletin, change the field 'usergroupid' to 6 in the table 'user'. Assuming you havent changed the usergroup defaults.

18-09-2003, 22:13:29
Thanks Nav, it's fixed now

For what it's worth... :hmm: