Sql question

  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

I am getting this error in my nuke forum board after I try to make myself an admin

Code: [ Select ]
SQL Error : 1064 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 ' 1)' at line 2

INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)

Line : 425
  1. SQL Error : 1064 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 ' 1)' at line 2
  2. INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)
  3. Line : 425


here are the fields as they show in php myadmin

Code: [ Select ]
  group_id     mediumint(8)                No    0        
  forum_id     smallint(5)    UNSIGNED         No    0 
  auth_mod    tinyint(1)                   No    0 
  1.   group_id     mediumint(8)                No    0        
  2.   forum_id     smallint(5)    UNSIGNED         No    0 
  3.   auth_mod    tinyint(1)                   No    0 



I have no idea what it is I have to change, nor do I know where to go from here. I am basically stuck. Anyone have a clue what went wrong? Or what I should look at from here? TIA
  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Posts: 285

Post 3+ Months Ago

Use this code:

Code: [ Select ]
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, '', 1);


Or this:


Code: [ Select ]
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, NULL, 1);
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

you will have to search for the line in the nuke forum code that looks like...
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)

and then make the mods as cazpianXI suggests
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

actually this is a flaw in phpnuke....after some extensive searching on this problem i found a solution

anyone else that happens to come up with a problem giving themselves moderator status in a nukebb portal should make a new file in there root

Code: [ Select ]
<?php
require("mainfile.php");
$index = 1;
$pagetitle = "- User to Moderator Forum Fix";
include("header.php");
OpenTable();
echo "<center><font class=\"title\">User to Moderator Forum Fix</font><br><br><font class=\"content\">";
$db->sql_query("DELETE FROM ".$prefix."_bbuser_group WHERE user_id=5");
$result = $db->sql_query("SELECT user_id, username FROM ".$user_prefix."_users");
if ($result) {
 while (list($uid, $uname) = $db->sql_fetchrow($result)) {
  if ($uid == 1) { continue; }
  $db->sql_query("INSERT INTO ".$prefix."_bbgroups (group_name, group_description) VALUES ('$uname', 'User')");
  if ($gid = $db->sql_nextid()) { $db->sql_query("INSERT INTO ".$prefix."_bbuser_group VALUES ($gid, $uid, 0)"); }
 }
 echo "User to Moderator Forum Fix has been done successfully.<br>"
 ."Be sure to remove this script out of your nuke root dir.";
} else {
 echo "Error: Cannot gathering user records!";
}
echo "</font></center>\n";
CloseTable();
include("footer.php");
?>
  1. <?php
  2. require("mainfile.php");
  3. $index = 1;
  4. $pagetitle = "- User to Moderator Forum Fix";
  5. include("header.php");
  6. OpenTable();
  7. echo "<center><font class=\"title\">User to Moderator Forum Fix</font><br><br><font class=\"content\">";
  8. $db->sql_query("DELETE FROM ".$prefix."_bbuser_group WHERE user_id=5");
  9. $result = $db->sql_query("SELECT user_id, username FROM ".$user_prefix."_users");
  10. if ($result) {
  11.  while (list($uid, $uname) = $db->sql_fetchrow($result)) {
  12.   if ($uid == 1) { continue; }
  13.   $db->sql_query("INSERT INTO ".$prefix."_bbgroups (group_name, group_description) VALUES ('$uname', 'User')");
  14.   if ($gid = $db->sql_nextid()) { $db->sql_query("INSERT INTO ".$prefix."_bbuser_group VALUES ($gid, $uid, 0)"); }
  15.  }
  16.  echo "User to Moderator Forum Fix has been done successfully.<br>"
  17.  ."Be sure to remove this script out of your nuke root dir.";
  18. } else {
  19.  echo "Error: Cannot gathering user records!";
  20. }
  21. echo "</font></center>\n";
  22. CloseTable();
  23. include("footer.php");
  24. ?>


then open that file in there browser.
then delete the file.

I guess I will have to do that everytime I make a new admin

jeez, would never had figured it out on my own
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

What kinda nuke? I'm guessing PHP-Nuke right? not PostNuke?
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

yeah php 7.0 i wonder if it is in 7.1 or not
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

I have heard phpnuke has a lot of flaws

check out the thread at powweb about web page defacement on their servers, many pages were defaced.

it was blamed on phpnuke as being the culprit the hackers got into
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

Yeah I might look at some other options...any recommendations?
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

phpbb

the one this forum runs on

free and better than most I have seen, if not the best

http://www.phpbb.com
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

Well no, I meant more along the lines of nuke or xoom.

Yeah I like phpbb, that is what I use
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

Sorry for the bum steer, I have never used Nuke or xoom, so I just assumed it was similar to phpBB

Now I am going to have to learn aren't I
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

Well it is similair to phpbb.....That is what the forums are for, I am learning as well.

This is the first time that I have used nuke and I really have a lot to learn about it. But I like what it has to offer becuase I am starting a local freelance news site, and It is the easiest way to get contributers for articles instead of having people email stories and me writing the html for it.

//sorry that was xoops btw
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

I'd go with PostNuke and the PNphpBB2 module.

In fact, I do go with that combo :D

I'm in the process of setting up 2 new domains right now with PostNuke & PNphpBB2, and once they're up and running and doing good, there's at least another 4 domains ready to go using the same combination - with some custom hacks & modules to make it a little more unique.
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

Yeah the problem is that I have already done a lot of modifications to it already. I expect a lot of traffic though and security is a big concern.

What managed posted has me worried about security, so I am wondering if there is better security with postnuke..or should I just go with it becuase no site is 100% secure.

Of course I will take all the precautions necessary to make my site secure...just don't want to scrap a weeks of work.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

PostNuke's far more secure than PHP-Nuke. I've been using PostNuke ever since April '02, and I've not had a single problem.

You're right, there isn't a computer on this planet that's 100% secure except for the one that's not turned on :)

PostNuke's much quicker to get to grips with and develop add-ons for too in my opinion - of course, I may be a lil biased because I was on the PostNuke support team for a few months in '02, and submitted a lil code to the core. But hey, I'm here now, so if you have questions, you know there's somebody here who knows what they're doin' :)
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

k thanks axe.....I guess I will go ahead and switch before I do anything more with it
  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Posts: 285

Post 3+ Months Ago

You might want to try b2evolution or moveabletype.

Post Information

  • Total Posts in this topic: 17 posts
  • Users browsing this forum: No registered users and 78 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.