RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

PHP scripts for MyRunUO

panther

Sorceror
PHP scripts for MyRunUO

This release consists of PHP versions of Zulu's MyRunUO .asp scripts. You will need the current version of his release, then add the files included here for use on your PHP driven web server. Besides being converted to PHP, some of the HTML code has been cleaned up and MySQL queries optimized. Not everything (especially guilds) has been fully tested yet as I was using an inactive shard for testing. Please report any problems, including sample links.

Thank you to Kinetix <[email protected]> for his GumpReader PHP script which was used to create the paperdoll viewer! See paperdoll.php for copyright info.

The images directory from MyRunUO is required for this version.

Information on MyRunUO can be found here:
http://www.runuo.com/forum/showthread.php?t=25551&page=1

See the README.txt file for more information.

Changes to 1.01:
- Fixed html codes showng in names.

Changes to 1.00:
- Added paperdolls to player pages using Kinetix's script.
- Added guild name to guild skill averages page.

Changes to 0.92:
- Added line break after "Grandmaster" in player skills page.
- Fixed guild warfare listing not showing guild names.
- Corrected rank numbering in guild list.
- Fixed problems with timestamps.

Changes to 0.91:
- Fixed blank players showing up in status (staff members).
- Fixed title in guild page.
- Fixed page arrows not appearing - modified page status for status, players, and guilds.
 

Attachments

  • MyRunUO-PHP-1.01.zip
    60.1 KB · Views: 1,771

stormwolff

Knight
Mostly Great work but here are two things

If there are more players than can fit on one page in the original set there was an arrow to go to the second page.

Also the names of the guilds don't appear in the guild war section of the guilds
 

panther

Sorceror
stormwolff said:
Mostly Great work but here are two things

If there are more players than can fit on one page in the original set there was an arrow to go to the second page. On yours I don't see one: http://stormfiles.no-ip.info/myrunuo/ players.php

Also the names of the guilds don't appear in the guild war section of the guilds page for me: http://stormfiles.no-ip.info/myrunuo/guilds.php

I've fixed the first problem along with a couple of minor issues, but I don't know why guilds aren't showing up for you at all. It doesn't appear that there's any data in your database for the guilds.
 

stormwolff

Knight
panther said:
I've fixed the first problem along with a couple of minor issues, but I don't know why guilds aren't showing up for you at all. It doesn't appear that there's any data in your database for the guilds.

The guilds were in the top part at the time of my posting but they were only showing up as numbers in teh guild war part.

As you noticed a few hours later no guilds at all. The players still exist but for some reason the guilds dissapear. This seems to happen from time to time. The guilds will be up when the server first loads, but they disappear later on.

I updated my guild page again and its showing what I reported before but here is a pic in case I lose the guild data again.

http://stormfiles.no-ip.info/guilds.jpg

18 and 25 are at war but its dispalying the guild numbers and not their names.
 
Error message...

dunno if this is a bug or not but when i load the status.php it says this....
other than that it works great.

Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in C:\***\***\status.php on line 179
 

panther

Sorceror
Version 0.92

This should correct the guild warfare list problems as well as the timestamp errors and a couple of other minor details.
 

stormwolff

Knight
Past issues fixed and got a couple new ones

Not all guild member names are showing up as links its happening in every guild even ones with only 1 member. Here is an example:

http://stormfiles.no-ip.info/guild.jpg

The guild Kymenlääni with the dots over the a's is showing up as

Kymenl&# 228;&# 228;ni with #228; instead of ä

Names with apostrophes show up as #39; insted of ' example fai's s mule shows up as fai# 39;s mule.
 

Iridath

Wanderer
got the same problems with the special chars ;)

you can get rid of it by deleting the htmlspecialchars() function calls...
 

PerfectWing

Wanderer
Alright, with everything set up, configured properly, and such. I've managed to get RunUO booting without the large error report in the screen every 5ish minutes. I've managed to get MySQL (with the proper db and tables), Apache 1.3 webserver, and PHP 4.3 installed and running.

Basically, it looks flawless, yet the tables aren't being written to properly or something. I'm getting no error reports and it's making troubleshooting this with my limited manual MySQL and PHP knowledge quite difficult. The only thing I've noticed is that under the MySQLAdmin.exe the 'myrunuophp' database is listed as 'sleeping'. Everything is pretty much a default setup, localhost:80 (3306 for MySQL) so forth and so on.

Any suggestions? Need more information? Not sure if I should have posted this in zulu's topic, but I thought I'd stick to not playing thread necromancer straight off the bat.
 

panther

Sorceror
PerfectWing said:
Basically, it looks flawless, yet the tables aren't being written to properly or something. I'm getting no error reports and it's making troubleshooting this with my limited manual MySQL and PHP knowledge quite difficult. The only thing I've noticed is that under the MySQLAdmin.exe the 'myrunuophp' database is listed as 'sleeping'. Everything is pretty much a default setup, localhost:80 (3306 for MySQL) so forth and so on.
Does your RunUO console show that the database is being updated okay? Is there any data written to the tables?
 

PerfectWing

Wanderer
Yes, the RunUO console shows several flawless updates. The status page is updated fine, however the pseudo-MyUO page never actually receives any information from the MySQL database, leading me to believe that no data is being written in the first place. Though, as I said before, I'm receiving no errors or warnings whatsoever (from the RunUO console all the way to the page-loading in IE) making troubleshooting it without any general knowledge quite tediously difficult.
 

panther

Sorceror
Try logging in using the mysql command line client (mysql/bin directory). Use:
mysql -u root -p MyRunUO
Assuming your database is called "MyRunUO" - rename it as necessary.
Then enter:
SELECT COUNT(*) FROM myrunuo_characters;
The count will show how many characters, if any, are stored in the database file and you'll at least know if something is being written.
You can also use:
SHOW TABLE STATUS;
to get a complete status screen of all tables in that database.
 

PerfectWing

Wanderer
Everything is empty, as I suspected, and nothing is being written to the tables. :-\

Know any off-hand 'common problems' that might lead to this happening? Thanks for helping to confirm my suspicions.

mysql> use myrunuophp
Database changed
mysql> select count(*) from myrunuo_characters;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.05 sec)
 

panther

Sorceror
PerfectWing said:
Everything is empty, as I suspected, and nothing is being written to the tables. :-\

Know any off-hand 'common problems' that might lead to this happening? Thanks for helping to confirm my suspicions.
Nope, that's very odd. Generally errors are generated if MyRunUO can't write to the database for some reason. Are you sure everything is configured to use the same database and you don't have multiple databases?
 

PerfectWing

Wanderer
From Config.cs of /Engines/MyRunUO/ folder.
Code:
// Is MyRunUO enabled?
		public static bool Enabled = true;

		// Details required for database connection string
		public static string DatabaseDriver			= "{MySQL ODBC 3.51 Driver}"; //mysql
		//public static string DatabaseDriver			= "{SQL Server}"; //ms sql server

		public static string DatabaseServer			= "localhost";
		public static string DatabaseName			= "MyRunUOPHP";
		public static string DatabaseUserID			= "root";
		public static string DatabasePassword			= "xxx";
		public static string DatabasePort			= "3306"; //blank for ms sql server, 3306 for mysql
From myrunuo.inc.php of /web/ folder.
Code:
// Edit your database settings:

$SQLhost = "localhost";
$SQLport = "3306";
$SQLuser = "root";
$SQLpass = "xxx";
$SQLdb   = "MyRunUOPHP";
From httpd.conf of /Apache Group/Apache/conf/
Code:
LoadModule php4_module "C:/php/php4apache.dll"
AddType application/x-httpd-php .php
AddType appliation/x-httpd-php .php3
AddType application/x-httpd-php .php4


And PHP4 is installed with "Register Globals = off" (That's fine, I think, right?)

See anything wrong? Need anymore configurations?
 

panther

Sorceror
Well, it's not an Apache or PHP problem since the database isn't even getting written to. Did you install the MySQL ODBC plugin and the .NET ODBC library? Although, without these I recall errors are generated when MyRunUO goes to save the data. I guess you should post on the MyRunUO thread about this.
 
S

shaDoze

Guest
@PerfectWing

This might work in Config.cs:
Code:
public static bool LoadDataInFile = false;

If your MySQL does not allow (or is not able to) load in files, it simply won't work. Setting this to false will use the old method to execute queries (takes longer).
 

ditmar

Wanderer
Thanks!

Great that you translated the asp files to php. I needed it because my webserver supports php only. Works great, i have a few issues tho, i pm-ed you the link to my server's Myrunuo so you can see the issues i have for myself.

Ditmar
 
Top