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);
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);
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";
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.