I am using AI::ExpertSystem::Advanced
to run an expert system from web content.
I have a website where I run a Perl script with this code:
use strict;
use warnings;
use AI::ExpertSystem::Advanced;
use AI::ExpertSystem::Advanced::KnowledgeDB::Factory;
use Data::Dumper;
use File::Slurp;
open(LOG, ">C:\\xampp\\htdocs\\xampp\\bc\\log.txt");
print LOG "START EXPERT\n";
system("C:\\Perl\\bin\\perl C:\\xampp\\htdocs\\xampp\\bc\\create_yaml.pl");
print LOG "START CREATE DB\n";
my $yaml_kdb = AI::ExpertSystem::Advanced::KnowledgeDB::Factory->new('yaml', {
filename => 'C:\\xampp\\htdocs\\xampp\\bc\\recepty.yaml'
});
print LOG "LOAD RECEPTY\n";
my $text = read_file(
'C:\\xampp\\htdocs\\xampp\\bc\\knowledgebase.yaml',
array_ref => 1,
chomp => 1
);
print LOG "LOAD DB\n";
my $ai = AI::ExpertSystem::Advanced->new(
viewer_class => 'terminal',
knowledge_db => $yaml_kdb,
initial_facts => $text
);
print LOG "NEW ES\n";
$ai->mixed();
print LOG "RESULT DONE\n";
#$ai->summary();
close LOG;
I tried to create a log. When I run this source in terminal my log is full and all things are right. But when I run it from web it is something wrong. My log file is only:
START EXPERT
START CREATE DB
LOAD RECEPTY
LOAD DB
I think that something with creating new expert system is bad. Links or I dont know. What do you think?
ERROR OF MY LOCAL SERVER:
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.
The system cannot find the path specified. Unable to get Terminal Size.
The Win32 GetConsoleScreenBufferInfo call didn't work.
The COLUMNS and LINES environment variables didn't work.
The resize program didn't work. at C:/Perl/lib/Term/ReadKey.pm line 362.
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.