I used the an test.xml from example taken from axkit.org
Installed most components
kampen@eureka:~/down/cpan/AxKit-1.4 > perl Makefile.PL
checking for module mod_perl >= version 1.17... yes
checking for module XML::Parser >= version 2.27... yes
checking for module Digest::MD5 >= version 2.09... yes
checking for module Compress::Zlib >= version 0... yes
checking for module Error >= version 0.13... yes
checking for module Apache::Request >= version 0.31_03... yes
checking for module XML::XPath >= version 1.00... yes
checking for module Storable >= version 0.7... yes
checking for module HTTP::GHTTP >= version 1.00... yes
checking for module XML::Sablotron >= version 0.40... yes
checking for module XML::LibXSLT >= version 0.99... yes
running xml2-config... ok
checking for main() in -lxml2... yes
checking for iconv() in -liconv... no
checking for libiconv() in -liconv... no
checking for iconv() in -lc... yes
checking if iconv() param 2 is const... no
Writing Makefile for Apache::AxKit::CharsetConv
Writing Makefile for Apache::MimeXML
Writing Makefile for AxKit
kampen@eureka:~/down/cpan/AxKit-1.4 >
This are ther other modules:
[Fri Sep 28 12:34:55 2001] [notice] Apache/1.3.20 (Unix) AxKit/1.4
mod_perl/1.26 mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 configured --
resuming normal operations
[Fri Sep 28 12:34:55 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/local/apache/bin/suexec)
static build
eureka:/w20/bin # ./httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_so.c
mod_setenvif.c
mod_ssl.c<<<<<<<<<<<<<<<<
mod_perl.c<<<<<<<<<<<<<<<
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec
eureka:/w20/bin #
Doing strace on httpd://eureka.acon.nl/xmltest/test.xml
eureka:/w20/bin # ps ax |grep httpd
24650 pts/1 S 0:01 ./httpd -X
eureka:/w20/bin # strace -p 24650
accept(16,
...........................................
getcwd("/usr/local/apache/htdocs/xmltest", 1024) = 33
brk(0x86eb000) = 0x86eb000
read(4, "", 4096) = 0
read(4, "", 4096) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
close(4) = 0
munmap(0x40018000, 4096) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
stat64("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("./Apache/Axkit/Language/XPathScript.pmc", 0xbffff29c) = -1 ENOENT
(No such file or directory)
open("./Apache/Axkit/Language/XPathScript.pm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
stat64("/usr/local/apache//Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache//Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat64("/usr/local/apache/htdocs/xmltest/test.xml", {st_mode=S_IFREG|0644,
st_size=462, ...}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
stat64("/usr/local/apache/htdocs/xmltest/.xmlstyle_cache",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/local/apache/htdocs/xmltest/.xmlstyle_cache/a5b1f4f6dae41b93ac41e8a22c7d9db4",
0x826f440) = -1 ENOENT (No such file or directory)
brk(0x86ee000) = 0x86ee000
stat64("/usr/local/apache/htdocs/xmltest/test.xps", {st_mode=S_IFREG|0755,
st_size=614, ...}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
brk(0x86ef000) = 0x86ef000
stat64("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("./Apache/Axkit/Language/XPathScript.pmc", 0xbffff29c) = -1 ENOENT
(No such file or directory)
open("./Apache/Axkit/Language/XPathScript.pm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
stat64("/usr/local/apache//Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache//Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) ---
eureka:/w20/bin #
Doing locate (after updatedb) , it should be there :
eureka:/w20/bin # locate XPathScript
/home/kampen/down/cpan/AxKit-1.4/blib/lib/Apache/AxKit/Language/XPathScript.pm
/home/kampen/down/cpan/AxKit-1.4/blib/man3/Apache::AxKit::Language::XPathScript.3pm
/home/kampen/down/cpan/AxKit-1.4/lib/Apache/AxKit/Language/XPathScript.pm
/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/AxKit/Language/XPathScript.pm
/usr/share/man/man3/Apache::AxKit::Language::XPathScript.3pm
/var/cache/man/cat3/Apache::AxKit::Language::XPathScript.3pm.gz
eureka:/w20/bin #
Maybe its a wrong configuration?
Startup.pl
#!/usr/bin/perl
#modify the include path before we do anything
BEGIN {
use Apache ();
use lib Apache->server_root_relative('lib/perl');
}
#commonly used modules
use Apache::Registry ();
use Apache::Constants ();
use CGI qw(-compile :all);
#use CGI::Carp ();
#use DBI ();
#put any other common modules here
#use Apache::DBI ();
#use Apache::Server ();
#use LWP ();
#use DB_File ();
1;
httpd.conf:
PerlRequire conf/startup.pl
PerlFreshRestart On
PerlPostReadRequestHandler 'sub { Apache->request(shift) } '
#PerlTransHandler My::Proxy
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
alias /perl/ /usr/local/apache/perl/
<Location /perl/>
sethandler perl-script
perlhandler Apache::Registry
perlsendheader On
options +ExecCGI
</Location>
PerlModule AxKit
<Location /xmltest>
SetHandler perl-script
PerlHandler AxKit
AxAddStyleMap application/x-xpathscript \
Apache::Axkit::Language::XPathScript
</Location>
These are the testing files - example taken from axkit.org
( only reachable by ip number still? 217.158.50.178 If this is a big
issue, I'm willing to offer dns service for this site in return)
eureka:/w20/htdocs/xmltest # less test.xml
<?xml version="1.0"?>
<?xml-stylesheet href="test.xps" type="application/x-xpathscript"?>
<dromedaries>
<species name="Camel">
<humps>1 or 2</humps>
<disposition>Cranky</disposition>
</species>
<species name="Llama">
<humps>1 (sort of)</humps>
<disposition>Aloof</disposition>
</species>
<species name="Alpaca">
<humps>(see Llama)</humps>
<disposition>Friendly</disposition>
</species>
</dromedaries>
test.xml lines 1-17/17 (END)
eureka:/w20/htdocs/xmltest # less test.xps
<%
$t->{'humps'}{'pre'} = "<td>";
$t->{'humps'}{'post'} = "</td>";
$t->{'disposition'}{'pre'} = "<td>";
$t->{'disposition'}{'post'} = "</td>";
$t->{'species'}{testcode} = sub {
my $node = shift;
my $t = shift;
$t->{pre} = '<tr><td>' . findvalue('@name', $node) . '</td>';
$t->{post} = "</tr>";
return 1;
}
%>
<html>
<head>
<title>Know Your Dromedaries</title>
</head>
<body bgcolor="white">
<table bgcolor="eeeeee" border="1">
<tr><th>Species</th><th>No. of Humps</th><th>Disposition</th></tr>
<%= apply_templates('/dromedaries/species') %>
</table>
</body>
</html>
test.xps lines 1-28/28 (END)
Clues as to what I'm doing wrong here?
Arnold van Kmapen