logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Setting up database pwobjectdata on Ubuntu server?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 15:32    Post subject: Setting up database pwobjectdata on Ubuntu server? Reply with quote

Hey all, I am having a problem with a database storing persistent item information for Rami_Ahmed's persistent player owned shop. I thought I had the database set up properly, but it appears I do not.

I am running Ubuntu server 7.06, MySQL 5 and have been running NWNx since I started the server, two years ago (I didn't have it on Ubuntu until a year ago, but..) and have had a few problems with the database but I have always been able to hack it out. This one has me stumped. Someone want to give me a hand? Maybe if you could post the SQL code for creating the tables I would need for that db? I looked in the aps_demo mod, and all I find in there is sqlite information. Is it different?

Please forgive my noobishness. I had to learn Linux, now I am working on SQL..its a slow process when one has limited time Smile
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Tue Jul 08, 2008 18:43    Post subject: Reply with quote

Do you have nwnx_odmbc in the latest version? If not, storing campaign objects is impossible. That's ODMBC and not the ODBC plugin that comes with nwnx. Not sure which you have? One of them the source is in the folder "db", the other is "odmbc".

If you don't have odmbc, the easiest way to get it and any other Linux plugins is using nwnx_easy (link in my sig). It's geared especially towards Debian and Ubuntu servers.

If you do, this might be helpful:

Code:
CREATE TABLE containers (
  charname text,
  player text,
  item text,
  count int(64) default NULL,
  IDENTIFIED int(64) default NULL
) TYPE=MyISAM;


It might need changing for you though... what exactly are you trying to do?
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 18:54    Post subject: Reply with quote

I do not have ODMBC. This could be one good reason for this not working. I was sure I had it installed. Now I will do that.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 19:16    Post subject: Reply with quote

where can I get just the most recent nwnx_odmbc plugin? I cannot seem to find it.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Jul 08, 2008 20:17    Post subject: Reply with quote

http://www.nwnx.org/phpBB2/viewtopic.php?p=8184
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 21:00    Post subject: Reply with quote

Ah, thanks. I didn't think that was a working version, so I did not use it.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 21:09    Post subject: Reply with quote

Ok, so I DLed that plugin and put it in place, and now I am getting a message on server startup:

Error: ODBC: Oncreate() Failed

Then a bunch of plugins load properly, then the mod starts as it should, then:

LIBRARY ODBC!SPACER does not exist
LIBRARY ODBC!SPACER does not exist
this one goes 6 times, then:

LIBRARY ODBC!EXEC does not exist
LIBRARY ODBC!FETCH does not exist

Repeated to infinity
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Tue Jul 08, 2008 22:21    Post subject: Reply with quote

Additional information:
nwnx_odmbc.txt reports:

o Critical Error: Datasource must be either MySQL or SQLite
o Shutdown.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Wed Jul 09, 2008 1:45    Post subject: Reply with quote

OK, this is a little maddening..I have gone ahead and updated the plugins on the server, because I found them mostly all to be outdated. I am guessing that this is a good thing for various reasons. Now I still get the startup error, and I still have no pwobjdata access.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Wed Jul 09, 2008 1:59    Post subject: Reply with quote

I browsed around and tried some of the fixes others have made work, but I am having no success. I am stumped, I'll admit it.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Wed Jul 09, 2008 2:25    Post subject: Reply with quote

Code:
    SQLExecDirect("CREATE TABLE pwobjdata (" +
        "player varchar(64) default NULL," +
        "tag varchar(64) default NULL," +
        "name varchar(64) default NULL," +
        "val BLOB," +
        "expire int(11) default NULL," +
        "last timestamp(14) NOT NULL," +
        "KEY idx (player,tag,name)" +
        ") TYPE=MyISAM;");

Should be what you're looking for...


LIBRARY ODBC!SPACER does not exist
would tend to indicate that SQLInit() has not been executed OnLoad() of module...which in turn indicates and older ODBC plugin.

Critical Error: Datasource must be either MySQL or SQLite
means you need one of the above set in the nwnx.ini file (source=...)
Code:
Use these five settings for MySQL connections
source = mysql
server = localhost
user   = nwn
pwd    = nwn
db     = nwn


Cheers
Gryphyn
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Wed Jul 09, 2008 2:35    Post subject: Reply with quote

source eh? That is missing from my nwnx.ini file. Interesting that I have never noticed this before in a year and half of running this server, isnt it? Embarassed

I've managed to make the table in phpmyadmin, that was a little maddening as well, but thats simply because I am an idiot and kept making typos. I don't have exactly this table structure, but I think I will be changing it now, because I see some things I have set differently.

I have the newest odmbc plugin from virusman, now. Is there something I have to do to install it properly that I have missed?

I do however, have SQLInit called in my modload script, I have just confirmed this.
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Wed Jul 09, 2008 2:58    Post subject: Reply with quote

Here is my nwnx.ini file:

Code:

[ODBC2]
; Log file
MaxLogSize=512 ; in KByte
LogLevel=1    ; 0=nothing, 1=only errors, 2=everything

[Database]
source=mysql
server=localhost               #name of the database server
user=XXXX                #username to access db
pass=XXXX                #password for username
db=nwn                   #database to connect to
hookscorco=true

[Debug]
debuglevel=1          #Set to 1 or higher to output successively
#                     # verbose debug information

[LogDir]
logdir=logs.0         #Set to the relative root of the log directory.

[CHAT]
chat_script=fky_chat # default = chat_script ;)
server_script=fky_chat_srv # without extension!
processnpc=1 # switch NPC speech processing on/off
ignore_silent=0 # disable processing of silent talk/shout messages
debuglevel=1

[EVENTS]

event_script=fky_chat_event

[RESETPLUGIN]
disabled=n

#[FUNCTIONS}
#disabled=n
#debuglevel=1

_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
william_hunter



Joined: 31 Jan 2007
Posts: 149

PostPosted: Wed Jul 09, 2008 3:18    Post subject: Reply with quote

And now when I try to log into the mod, it crashes. -sigh- I couldn't leave well enough alone..I think its the chat plugin that needs to be updated now, as I have updated nwnx.so and odbc.so (odmbc).
_________________
The Realm of Tharagon NWN PW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group