How do, Here's hoping this list allows unsubscribed people to post. Assuming it does, please cc: replies to me -- thanks.
I've run in to a problem with AxKit that I'd appreciate some help with.
I'm trying to follow Barrie Slaymaker's article at
http://www.perl.com/lpt/a/2002/09/24/axkit.html
to use AxKit to help me put a load of photos online.
So far, I've installed AxKit from CVS (as it was about 18 hours ago),
and I'm slowly building up a configuration file to get it to do what I
want. I've used AxKit before, and I'm happy that it's installed in to
Apache properly.
The relevant parts of my httpd.conf look like this:
Alias /axkit/pictures/ "/nfs/pictures/"
PerlModule Axkit
<Directory "/nfs/pictures/">
#
# This config is straight from Barrie's article
#
Options -All +Indexes +FollowSymLinks
DirectoryIndex index.xml index.xsp
AxHandler axkit .xml .xsp
AxDebugLevel 10
AxGzipOutput Off
AxAddXSPTagLib AxKit::XSP::Util
AxAddXSPTagLib AxKit::XSP::Param
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
AxAddStyleMap application/x-saxmachines \
Apache::AxKit::Language::SAXMachines
AxHandleDirs On
AxAddRootProcessor application/x-saxmachines . \
{http://axkit.org/2002/filelist}filelist
#
# Now we deviate from Barrie's article
#
PerlSetVar AxSAXMachineClass "AxKit::Gallery::ProofSheetMachine"
</Directory>
I'm trying to start simply, and verify that AxKit is actually generating
the XML filelist that I expect. So the code in
AxKit::Gallery::ProofSheetMachine currently looks like this.
package AxKit::Gallery::ProofSheetMachine;
use strict;
use XML::SAX::Machines qw(Pipeline);
sub new {
my $proto = shift;
return bless {}, ref $proto or $proto;
}
sub get_machine {
my $self = shift;
my ($r) = @_;
my $m = Pipeline(\*STDOUT);
return $m;
}
1;
AIUI, all this should do is pass the XML that AxKit generates back to
the browser. Once I've got this simple bit working I can get smarter.
This module is installed in to the Perl site lib directory, and is
visible to Perl;
% perl -MAxKit::Gallery::ProofSheetMachine -e 'exit;'
runs with no errors.
If I restart the httpd with this configuration it works. However, if I
then point my browser at "http://localhost/nfs/pictures/" I get an
internal server error response. The error log contains:
...
[AxKit] fast handler called for /axkit/pictures/
...
[AxKit] Generated file list:
... (the filelist looks good)
[AxKit] media: screen, preferred style: #default
[AxKit] Cache: key = 34ca241b95d967659f6bd8b4537b8d31
... all looks normal
[AxKit] styles: Apache::AxKit::Language::SAXMachines(.)
[AxKit] Style Provider Override: Apache::AxKit::Provider::File
[AxKit] [uri] File Provider looking up uri .
[AxKit] [uri] File Provider set filename to /usr/local/www/htdocs/axkit
[AxKit] about to execute: Apache::AxKit::Language::SAXMachines::handler
[AxKit] Caught an exception
[Error] stylesheet '.' could not be found or is not readable
[AxKit] From: /usr/local/lib/perl5/site_perl/5.005/Error.pm : 147
[AxKit] [Backtrace] stylesheet '.' could not be found or is not readable at
/usr/local/lib/perl5/site_perl/5.005/Error.pm line 147
Error::throw('Apache::AxKit::Exception::Error', '-text',
'stylesheet \'.\' could not be found or is not readable') called at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/AxKit.pm line 629
AxKit::process_request('AxKit::Apache=SCALAR(0x845c80c)',
'Apache::AxKit::Provider::File=HASH(0x845c8fc)', 'ARRAY(0x84395e0)')
called at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/AxKit.pm
line 458
AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x845c80c)',
'Apache::AxKit::Provider::File=HASH(0x845c8fc)') called at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/AxKit.pm line 285
eval {...} called at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/AxKit.pm line 276
AxKit::main_handler('AxKit::Apache=SCALAR(0x845c80c)',
'Apache::AxKit::Provider::File=HASH(0x845c8fc)') called at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/AxKit.pm line 193
AxKit::fast_handler('AxKit::Apache=SCALAR(0x845c80c)') called at
/dev/null line 20
eval {...} called at /dev/null line 20
I'm guessing that the problem is down to the use of '.' in the
AxAddRootProcessor directive in the config file. But that seems to be
legal.
Any advice would be appreciated. Googling for the error message didn't
turn up anything useful.
N
--
FreeBSD: The Power to Serve http://www.freebsd.org/ (__)
FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',)
\/ \ ^
--- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/_)
msg02204/pgp00000.pgp
Description: PGP signature
