This is my problem and vinicius.edson has the same as me. :sleep:
And how 343 got it working wihout "lynx" for him?
It's absolutely required for the userdb.sh script...
Printable View
And how to retrieve char info from PHP? Log file only give char ID, and based on pwAdmin source the only way to get it is using Java RPC (it's defined on PW protocol files stored on /PWServer/authd/protocol/)
If somebody can lead the way to retrieve char info using PHP, i'll release it along with log retriever that works without lynx (so far i can only display the char ID taken from logs, got nowhere to get the char name, level, etc)
My only problem is that I cannot remember exactly what I did to get it working (to be honest). So now I am going to have to start fresh so I can make a tut, and/or I am going to 'pack' it into a 'release' for everyone ;)
I also plan on making some minor modifications, such as making the list 'auto-refresh'. For some reason (at least in my version) the 'website' refreshes every 30 seconds, but the list itself does not; so I think I am going to work on a way for the list to 'auto-refresh' as well.
Either way gave me a little time, and I will have a tutorial and or a release ;)
---------- Post added at 11:22 AM ---------- Previous post was at 11:17 AM ----------
(I apologize I am a novice when it comes to PHP, but) Is there maybe any way possible we could work that into a configuration line, so people can chose the exact number of top players displayed ?
shure, that's no problem.
Hendrik
Table 'dbo.uwebplayers' doesn't exist
---------- Post added at 09:57 PM ---------- Previous post was at 09:49 PM ----------
k - i found the one - for future - plz create ONE pack :)
The userdb.sh must be refreshed before the ranking.php is refreshed...
Because this script gets data from roles logs... Then "dump" it with the chardb.jsp into the uwebplayer table...
After it's dumped, the ranking.php can be refreshed to get new data from the table...
Becareful if you have too many roles on your server!! It will takes a lot of cpu usage at every refresh...
For auto refreshing the userdb.sh script, it can be done with /etc/crontab on your linux OS...
Thank you Hemer For the script.
Romulan... once again...
INSTRUCTIONS:
1. Import the 'uwebplayers.sql' into your 'dbo' database...
2. Configure the database password and user to make the 'chardb.jsp' connecting to the database correctly.
3. Edit the 'userdb.sh' for set your java path. (ex: /usr/share/java -> /usr/java/jdk1.5/jre)
3a. Edit the 'userdb.sh' for set your server IP to connect to tomcat...
(ex: http://192.168.12.200:8080/iweb/ -> http://192.168.0.50:8080/iweb/)
4. Put the 'chardb.jsp' in this folder -> apache-tomcat-5.5.28/webapps/iweb/role/
4a. Make folders if needed or doesn't exist...
ISSUE:
I can't find anywhere the "lynx" class... It seems to be important for dumping the roles database into the uwebplayers table.
type: wget install lynx
give all your files 777
i think you have only the java problem... you can also type :
/usr/java/jdk1.6.2-45/jre or anything else, but it have to be there!!!!
please write whats up, when you done
greetings
Hemer&Germania
./userdb.sh
This is what i get... :glare:Code:Exception in thread "main" java.lang.NoClassDefFoundError: lynx
Caused by: java.lang.ClassNotFoundException: lynx
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: lynx. Program will exit.
See my previous posts about the second issue with my http://pwserver:8080/iweb/role/chardb.jsp :sleep:
JDK 1.6 = Installed!
All PW needed libraries = OK!
Lynx = Installed!
Tomcat = Installed!
XAMPP = Installed!
Do not focus on userdb.sh, or lynx right now, trust me when I say they're not important. We Do need to figure out why your chardb.jsp is not working, as that is vital to this whole package working!
I plan on releasing a package when I receive an update from Hemer that includes a config line for being able to set exactly how many lines / top players that it will display. Unfortunately I cannot make a tutorial as there are too many little tedious changes that I have made, that it would certainly be much easier to just release as a package.
However if your chardb.jsp isn't working now, I do not think that my package (or any tutorial) will change that; so we must find out why your chardb.jsp is not functioning!
---------- Post added at 03:52 AM ---------- Previous post was at 03:19 AM ----------
is your database called "dbo" ??? (first thing that popped into my mind)
{you said you properly imported the "uwebplayers.sql", and your MySQL UN & PW are both root as it's only your test server}
if it's not called "dbo" you would have to change that in the following line within chardb.jsp:
("jdbc:mysql://localhost:3306/dbo?useUnicode=true&characterEncoding=utf8", "root", "root");
---------- Post added at 03:58 AM ---------- Previous post was at 03:52 AM ----------
If that's not it, keep looking at possible issues with the .jsp (not) connecting to the MySQL database, as I really think and feel that's where the problem lies. (ie... make sure user root is allowed access permissions from any host)
This is what i get now n_n" ...
===================================================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: com.mysql.jdbc.Driver
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
com.goldhuman.auth.AuthFilter.doFilter(AuthFilter.java:230)
root cause
javax.servlet.ServletException: com.mysql.jdbc.Driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.role.chardb_jsp._jspService(chardb_jsp.java:166)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
com.goldhuman.auth.AuthFilter.doFilter(AuthFilter.java:230)
root cause
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:125)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
org.apache.jsp.role.chardb_jsp._jspService(chardb_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
com.goldhuman.auth.AuthFilter.doFilter(AuthFilter.java:230)
====================================================
I think there is a missing class for this jsp:
"java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
This the only class/driver for mysql i have:
Code:/usr/local/apache-tomcat-5.5.28/webapps/iweb/WEB-INF/classes/com/goldhuman/util/MySqlCon.class
ok, here is a topranking script:
ranking-rz_top50.zip
simply change "$top" at ".rank_config.php" to the Max rank you want to show at your ranking.
Hendrik
I am not sure; I use the same java (JDK 1.6). Maybe it's something in tomcat oO ? Try to use this .jsp with my latest pwAdmin package maybe :)
MEGAUPLOAD - The leading online storage and file delivery service
---------- Post added at 01:40 PM ---------- Previous post was at 01:40 PM ----------
TYVM; testing, and release coming soon ;)
Alright, my package has been released :)
get it here:
MEGAUPLOAD - The leading online storage and file delivery service
Just follow the instructions in Top Players.txt ;)
simple php top
Short BY Function
PK
Level
Reputation
have fun
none thanked me so i remove it :D