Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Linux Servers

Archive::Linux Servers Archive area for Linux Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2002, 09:28 PM
n00b8472
Sarnak
 
Join Date: Jan 2002
Posts: 49
Default db.ini

Why doesn't the linux servers use the info from db.ini? Every time I try to start up chat/world/zone I get 'Failed to connect to database: Error: Access denied for user: 'eq@localhost' (Using password: YES)

However, in my db.ini I have another user defined (namely the user that works with mysql) but the server doesn't seem to read this file at all.. wtf?
Reply With Quote
  #2  
Old 02-15-2002, 12:37 AM
misanthropicfnd
Fire Beetle
 
Join Date: Feb 2002
Posts: 19
Default

At the moment the executables built on linux use the login & db info statically defined in dbconnectinfo.linux.txt. Try changing this file & rebuilding.
Reply With Quote
  #3  
Old 02-15-2002, 04:07 PM
theCoder
Sarnak
 
Join Date: Jan 2002
Posts: 90
Default

It's not too hard to modify the code to read the db.ini file. I do it with every release I download (and since it's not so hard, I really don't know why the Linux version has this terrible hack).

These steps have worked for me so far, but I haven't had time to look at 0.2.3, so YMMV.

First, edit the common/database.h file and remove the ifdef's around the 2 constructors for the Database class (you can leave both constructors in if you want, or remove the constructor that takes no parameters).

Now edit the common/database.cpp and take out the ifdef's there as well. Now go through and change every instance of stricmp to strcasecmp and every instance of strnicmp to strncasecmp. If you feel like it, you can add #define's in the windows ifdef at the top mapping them back to the original, but if you're not going to compile on windows, don't worry about it.

Not edit every net.cpp you can find. They almost all have an ifdef section that defines the Database object different based on windows or Linux build. Take the Windows version of the database definition out of the ifdef and delete the Linux version. Remove any #include's of the silly text file hack (not necessary, but you don't need it).

Now when you compile and run, the programs will use the db.ini file. The only caveat is that the db.ini file has to be in the same directory as the binary. I usually just copy all the binaries to a new directory called bin and keep everything there (I actually modify the makefiles to build to ../bin/program_name instead of to just program_name).

If you want, you can reference my port of 0.2.0 in this thread: http://forums.eqemu.net/showthread.p...p;threadid=114.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:07 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3