4 Attachment(s)
Re: pwAdmin (iWeb) Final Release
Hi,
I installed PWServer on coLinux and Debian Lenny with this guide:
[Development] Server + Client @ 1.4.2 & Guide - RaGEZONE forums
But I have a probleme about pwAdmin and the access to my db MySQL.
I think I have the same problem of technology05 and Aringaso (and maybe others peoples):
pwAdmin > SERVER CONTROL > SERVICES > all are "Online",
but pwAdmin > ACCOUNTS > I have the message "Connection to MySQL Database Failed".
/PWServer/jetty-7.2.0/webapps/pwAdmin/WEB-INF:
// connection settings to the mysql pw database
String db_host = "localhost";
String db_port = "3306";
String db_user = "root"; (<-- OK)
String db_password = "mysqlpass"; (<-- OK)
String db_database = "pw"; (???)
/PWServer/authd/table.xml:
<connection name="auth0" poolsize="3" url="jdbc:mysql://127.0.0.1/pw?useUnicode=true&characterEncoding=utf8" username="root" password="mysqlpass"/> (<-- OK)
And I don't understand the solution of Aringaso (maybe this is a good solution, I don't know):
http://forum.ragezone.com/f452/pwadm...ml#post5558809
--------------------
/etc/init.d/mysql stop:
Stopping MySQL database server: mysqld.
/etc/init.d/mysql start:
Checking for corrupt, not cleanly closed and upgrade needing tables...
mysql -u root -p:
Enter password:*********
Welcome to the MySQL monitor (...)
mysql> set password for root@localhost=password('*********');
Query OK, 0 rows affected (0,00 sec)
>>> Connection to MySQL Database Failed (again!)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.00 sec)
>>> I don't have a pw database?
cd /PWServer/gamedbd
ls
>>> clsconfig dbf dbtool gamedbd gamesys
/PWServer/.setup
>>> pwdb.sql
colinux:~# cd /PWServer/gamedbd
colinux:/PWServer/gamedbd# ./gamedbd gamesys.con
Usage: ./gamedbd conf-file [importclsconfig|exportclsconfig|clearclsconfig|listrole|listrolebrief|listuserbrief|listfaction|listfactionuser|listcity|updateroles|convertdb|repairdb|tablestat|tablestatraw|towdb|tobdb|compressdb|decompressdb|gennameidx|listid tablename|rewritetable fromname toname|rewritetable roleidfile fromname toname|read tablename roleid|query roleid|merge dbdatapath|listshoplog|findmaxsize dumpfilename]
colinux:/PWServer/gamedbd#
Re: pwAdmin (iWeb) Final Release
LOOOOL je viens juste de comprendre... Oui il faut exécuter le script pwdb.sql dans adminer ou phpmyadmin pour installer la database :laugh:
----------------------------------
LOL! I just got it... Yes you need to execute the sql script (pwdb.sql) inside adminer or phpmyadmin to installer the db :laugh:
Re: pwAdmin (iWeb) Final Release
OK ^^
I make a copy of "pwdb.sql" on my hard drive C:\ and I go to http://localhost:8080/adminer/admine...?username=root and I clic on "SQL Request" and I clic on the "Browse" button for search the "pwdb.sql" file?
Re: pwAdmin (iWeb) Final Release
Quote:
Originally Posted by
Extatune
Yes :):
Re: pwAdmin (iWeb) Final Release
Yeah ! :thumbup:
My pwAdmin is OK now.
Thx a lot.
Re: pwAdmin (iWeb) Final Release
this can avoided by applying a little fix to pwadmin which create the needed db if they dont exist.
1 Attachment(s)
Re: pwAdmin (iWeb) Final Release
or... here everyone; here is a full DB dump (empty) that includes everything needed for 'dbo'
note: don't apply this if you already have accounts / a running server; you will lose all accounts / current DB data
ONLY apply this to a new server set up
Re: pwAdmin (iWeb) Final Release
yay, again the stupid version of the pw mysqldb
note that the pw user db is far easier to admin if all passwords are stored as "0x00.." instead of binary stuff in a varchar.
you can simply change that by removing the "varbin2hex" stuff from aquireuserpasswd and changing your register scripts from
PHP Code:
$Salt = $Login.$Pass;
$Salt = md5($Salt);
$Salt = "0x".$Salt;
MySQL_Query("call adduser('$Login', $Salt,
to
PHP Code:
$Salt = $Login.$Pass;
$Salt = md5($Salt);
$Salt = "0x".$Salt;
MySQL_Query("call adduser('$Login', '$Salt',
this avoid converting stuff from binary to readable hex strings and vice versa when interacting with the db ;)
of course you need to change some queries in pwAdmin too.
when all that is done, the mysql db behaves like the good old mssql
if wished i can post a query that transforms all users binary passwords to the hex version for converting existing dbs to the "readable" version
Re: pwAdmin (iWeb) Final Release
Quote:
Originally Posted by
343
Import the database DBO_ROLES that I supplied above, and like ronny said make sure the game server is running.
:thumbup::thumbup: Lol its Work Now Thanks Man :lol:
Re: pwAdmin (iWeb) Final Release
Quote:
Originally Posted by
ivanaivana
Same trouble... SQL import function don`t write more then 54 accounts... Anyone can help to solve it?
Re: pwAdmin (iWeb) Final Release
wrong html escaping
change line 450 in role jsp to:
PHP Code:
rolename = StringEscapeUtils.escapeJava(StringEscapeUtils.escapeHtml(chr.base.name.getString()));
813:
PHP Code:
name = StringEscapeUtils.escapeHtml(character.base.name.getString());
1339:
PHP Code:
String rolename = StringEscapeUtils.escapeHtml(chr.base.name.getString());
1366
PHP Code:
String rolename = StringEscapeUtils.unescapeJava(rs.getString("role_name"));
this should work, i dont remember which of those lines i modified myself, i think i added the "escapejava" stuff to get rid of " in character names and with escaping java instead of html that kind of works better and doesnt mess everything
Re: pwAdmin (iWeb) Final Release
I have a problem, after updated list of characters print "Roles Imported to MySQL Table" , but characters are not added to the database
Re: pwAdmin (iWeb) Final Release
Quote:
Originally Posted by
tbnanubis
wrong html escaping
change line 450 in role jsp to:
PHP Code:
rolename = StringEscapeUtils.escapeJava(StringEscapeUtils.escapeHtml(chr.base.name.getString()));
813:
PHP Code:
name = StringEscapeUtils.escapeHtml(character.base.name.getString());
1339:
PHP Code:
String rolename = StringEscapeUtils.escapeHtml(chr.base.name.getString());
1366
PHP Code:
String rolename = StringEscapeUtils.unescapeJava(rs.getString("role_name"));
this should work, i dont remember which of those lines i modified myself, i think i added the "escapejava" stuff to get rid of " in character names and with escaping java instead of html that kind of works better and doesnt mess everything
Half of probblem solved!!! now i can see cyrylic symbols in chars list!! :drool:
But second probblem is still exist - only 54 characters are imported... and still error any ideal why?? and how to solve it?
Re: pwAdmin (iWeb) Final Release
done everything I can find in here, but, the character list never updates: always Failed to Import roles to MySQL
however, I can access the characters by using the, By ID at top right.
Any ideas why?
Re: pwAdmin (iWeb) Final Release
Your database and pwadmin isnt connecting i think...Make sure all the info is right in the files...(.pwadminconf i think it is)