webMonitor v2 - by BonScott

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Fearen
Noob
Noob
Posts: 1
Joined: 24 Sep 2014, 13:17
Noob?: Yes

Re: webMonitor v2 - by BonScott

#101 Post by Fearen »

I don't know if anybody still reading this topic, but I want to share solutions for some problems discussed above.
First of all I encontered some problems with POSIX.pm, as some of the guys here. To get rid of it you can just hardcode all libs that perl wants in webMonitorServer.pm and webMonitorPlugin.pl. I know that it is very crude way to deal with that error, but for now it works. If someone has a better idea, I shall gladly listen to it.
You need to open webMonitorPlugin.pl in any text editor and replace this lines right after first comment section until second comment (quote: # Initialize some variables as well as plugin hooks) with this code:

Code: Select all

use strict;
use lib "%path to your openkore folder%/src";
use lib "%path to your perl folder%/site/lib";
use lib "%path to your perl folder%/lib";
use lib "%path to your openkore folder%/plugins/WebMonitor";
use Plugins;
use Settings;
#our $path;
#BEGIN {
#	$path = $Plugins::current_plugin_folder;
#	$path = 'D:/games/openkore_ready/plugins/WebMonitor';
#}
#use lib $path;
use webMonitorServer;
use Globals;
use Log qw(warning message error);
Where %path to your perl folder% and %path to your openkore folder% are path to your perl and openkore folders respectively.

Now in webMonitorServer.pm you need to replace all after first comment section until "BEGIN {" with:

Code: Select all

use strict;
use lib "%path to your openkore folder%/src";
use lib "%path to your perl folder%/site/lib";
use lib "%path to your perl folder%/lib";
use Base::WebServer;
use base qw(Base::WebServer);
use Translation qw(T TF);
use Globals;
use Log qw(message debug);
use Utils;
use Log;
use Commands;
use template;
use Skill;
use Settings;
use Network;
use Network::Send ();
use POSIX ();
use POSIX qw(strftime);
Again where %path to your perl folder% and %path to your openkore folder% are path to your perl and openkore folders respectively.
Then I found out that you need specific perl version. For windows it is: ActivePerl-5.12.3.1204-MSWin32-x86-294330. You can find windows installer easily.
Next thing you need to know is that sometimes socket #1025 may be used for some windows services or program. So I just changed port option in config.txt and webMonitorPlugin.pl to 1020. With config.txt everything is clear. For the webMonitorPlugin.pl find lines:

Code: Select all

##### Seting webServer after of plugins loads
sub post_loading {
	$port = $config{webPort} || 1025;
	$bind = $config{webBind} || "localhost";
And change 1025 with 1020 or any other port you want to use.
If you do all this steps WebMonitor will start normally.
Right now when I go to 127.0.0.1:1020 it loads blank page with "Not Found". Working on it now.

artthai
Noob
Noob
Posts: 1
Joined: 15 Jul 2020, 02:51
Noob?: Yes

Re: webMonitor v2 - by BonScott

#102 Post by artthai »

Do this plugin still work?
I got message "Internal Server Error" in my browser.

Post Reply