hooks

2007-06-25 Thread john1
I've just been playing with the all the different hooks, just to see how 
it all hangs together. 

eg

sub hook_connect {
  my $self = shift;
  $self-log( LOGDEBUG, '*CONNECT' );
  return DECLINED;
}

I am unable to get the connect, pre_request or body_data hooks to 
fire. They are similar to the above, (perhaps with OK instead of 
declined) or just a straight forward die.
I also notice that response sent goes via my code, but when I use 
the browser back button, Response sent is on the console, but 
nothing from my hook.

Anyone any ideas?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 and Apache fop?

2007-02-09 Thread john1
On 8 Feb 2007 at 10:39, Also Sprach Matt Sergeant:

 On 6-Feb-07, at 7:20 AM, [EMAIL PROTECTED] wrote:
 
  Ok, I have some lengthy processes coming up in the near future.
  Should I wait for the job server to be written or will I have to  
  implement the above?
 
  Assuming the latter :)
 
 Yeah :-(
 
 If I were you I'd have some sort of job-server (mod_perl would be my  
 recommendation) that you call to entirely separately.

I presume this is short term until the easy to use and implement job server
arrives? :)

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 and Apache fop?

2007-01-30 Thread john1
On 27 Jan 2007 at 13:20, Also Sprach Jörg Walter:

 So while a simple plugin would be enough for development purposes, when you go
 live you have to enhance that plugin to support asynchronous operation.
 That's not too hard, we're still talking about no more than 100 lines of
 code, but it's something to keep in mind.

Would I be correct in thinking that the way to do asynch, given a job that 
blocks for N
seconds, would be to fork/exec and use danga to listen on an agreed socket?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ax2 uploading files

2007-01-26 Thread john1
Lo,

The plugin isn't written yet. Any idea when it might be?
If it's not soon, I could always have a go myself in a week or two...

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2: contributing

2007-01-25 Thread john1
On 24 Jan 2007 at 11:39, Also Sprach Matt Sergeant:

 On 24-Jan-07, at 10:52 AM, [EMAIL PROTECTED] wrote:
 
  Given the above (I presume it's correct) the ways around it are
 
  1) Have a separate DBI daemon that processes requests and
  uses Danga.

 In the next release I hope to build a job server for long running  
 things.

Ha! when's the next release? :)

 Not sure how feasible it is, but we'll give it a go.

Will it be another ax2 server that essentially does RPC
from the main server? Something along the lines of using Danga
to listen on a FD (as per the Ax2 docs)?
The methods on the main ax2 server then have to have some 
CONTINUATION jiggery pokery?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 Wiki

2007-01-24 Thread john1
Jorg,
 
 I have added frist pages to the AxKit2 wiki located at:
 
 http://trac.axkit.org/axkit2/wiki

Well done!
 
 Feel free to add to my effort, explaining your own experiences or trying to 
 understand my explanations.

I have a few questions/points...

I think it's been mentioned before either on list or in the docs about where 
stuff should 
be installed. I don't think (as apposed to the wiki) that the modules etc 
should be
under a per site directory structure. That makes upgrading more tedious and 
time 
consuming.
The modules should be installed in the usual perl module area, eg under 
site_perl.
The plugins should be under the AxKit2 directory in a directory called plugins.
That makes installing with a make install possible.

I like the ideas about SSL using stunnel or squid. Do they work under windows 
though?
I was under the impression that SSL could be handled via apache and requests 
passed on the Ax2. Is this possible?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL

2007-01-24 Thread john1
Lo all,

I was wondering how easy it would be to add SSL to Ax2.
The reason being I need an SSL webserver for another project
and I'm unsure as to how difficult it would be to take the code and 
add in SSL myself. It wouldn't be serving web pages, just messages.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Static files and hook_xml_response

2007-01-24 Thread john1
Lo,

I'm still having static files, .js, .jpg etc go through 
hook_xml_response. I have a test in there that returns DECLINED
for such files, but it's a bit of a kludge. Perhaps it should be possible 
to do it via the config file? I was told it did this some time back but 
the latest svn (back then) didn't seem to do it. No doubt more 
PEBKAC than Ax2 though :)

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ax2: contributing

2007-01-24 Thread john1
Lo,

I was wondering if it would be possible to contribute to the project a 
mysql db app? They don't come more dynamic than a db app :)

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Static files and hook_xml_response

2007-01-24 Thread john1
On 24 Jan 2007 at 15:49, Also Sprach Jörg Walter:

 On Wednesday, 24. January 2007 13:24, [EMAIL PROTECTED] wrote:

  I'm still having static files, .js, .jpg etc go through
  hook_xml_response. I have a test in there that returns DECLINED
  for such files, but it's a bit of a kludge. Perhaps it should be possible
  to do it via the config file?

 Files *.yourDynamicPagesExtension
   Plugin yourApplicationPlugin
 /Files

 or similar. That way, your plugin is only called for the fhiles it actually
 processes.

Ah, that may be my problem, I don't have dynamic page extensions.
Below is my config file. Is what I want not possible with this setup?

PluginDir /usr/lib/perl5/site_perl/5.8.7/i486-linux/AxKit2/plugins

Pluginlogging/warn
LogLevel  LOGDEBUG

Plugin request_log
RequestLog access_log

Plugin  error_xml
ErrorStylesheet /home/john/perl/ecomm/error.xsl
StackTrace On

Plugin fast_mime_map
Plugin parse_post_data

DocumentRoot /home/john/perl/ecomm/webroot

Server

Port   8010

Plugin uri_to_file
Plugin serve_file

DirectoryIndex index.xml

Location /ecomm

Plugin development
Plugin cachecache
CacheModule  Memory
# ten megabytes (ish)
CacheSize1000
CacheNamespace ecomm
CacheExpiresIn 10hours
DocumentRoot/home/john/perl/ecomm/web/webroot
PluginDir /home/john/perl/ecomm/web/plugins
Plugin ecomm.pm
ShowParams 1
StyleSheetDir /home/john/perl/ecomm/web/stylesheets
/Location

/Server




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 Wiki

2007-01-24 Thread john1
On 24 Jan 2007 at 15:45, Also Sprach Jörg Walter:

 On Wednesday, 24. January 2007 13:08, [EMAIL PROTECTED] wrote:

  The modules should be installed in the usual perl module area, eg under
  site_perl. The plugins should be under the AxKit2 directory in a directory
  called plugins. That makes installing with a make install possible.

 Well, that's why I mention three methods of installation. No definite
 consensus has been found yet, however.

 My personal favourite has been what you describe (and what I present as third
 scheme), plus a way to have two (or more) plugin directories: global (core)
 plugins, private plugins and maybe custom system-wide plugins.

 Well that's two of us, is that nearly a consensus!

 But I don't have any experience with that kind of setup. Instead, I now know
 how nicely multiple private copies of AxKit2 work. I like them, as I tend to
 suffer from update-breakage rather often.

heh

  I like the ideas about SSL using stunnel or squid. Do they work under
  windows though?

 I think so, yes.

I've had a look into it today and yes both have windows binaries.

Thanks

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2: contributing

2007-01-24 Thread john1
On 24 Jan 2007 at 15:51, Also Sprach Jörg Walter:

 On Wednesday, 24. January 2007 13:29, [EMAIL PROTECTED] wrote:

  I was wondering if it would be possible to contribute to the project a
  mysql db app? They don't come more dynamic than a db app :)

 Did you solve the problem of asynchronous queries?

No. I have no idea how to go about it. I don't believe it could be done
from the application, it would involve some hairy stuff in the DBI, if
it's possible at all. I just have to content myself with not writing
crappy sql :)
A page typically takes 100th of a second to generate on our
production server, which isn't too shabby.

Given the above (I presume it's correct) the ways around it are

1) Have a separate DBI daemon that processes requests and
uses Danga. ie A db request is palmed off to the DBI server
and the DBI server gives Ax2 a kick when the data has been
retrieved. I believe Danga sockets have this capability.

2) Have Ax2 forkable. qpsmtpd which seems very similar to this
has a qpsmtpd-forkserver option. This may or may not be possible
with Ax2

3) Go back to Ax1 and apache.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 wiki

2007-01-18 Thread john1
On 17 Jan 2007 at 15:17, Also Sprach Matt Sergeant:

 On 17-Jan-07, at 9:34 AM, [EMAIL PROTECTED] wrote:
 
  Are we to have an AxKit2 wiki or something hanging off the existing
  AxKit1 wiki?
 
 Not sure - what do you think would be best? I'm thinking start from  
 scratch...

Well, AxKit 1 and 2 need to be kept separate but both under the 
axkit.org domain.

 I need to either beef up the wiki properly so that we can add  
 accounts for editors, or just go with a different piece of software  
 for the wiki.

I have no experience of wiki software.
The merits of various ones have just been discussed on the 
qpsmtpd list though, fwiw. 

John 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 wiki

2007-01-18 Thread john1
On 18 Jan 2007 at 9:07, Also Sprach Anthony Gardner:

 Well suggested. I was an AxKit user and am interested in seeing how 
AxK2 works but don;t have the time to work it out by myself and
 would like to see an overall concept before diving in.

You could always ask on here...

I've developed an app already on Ax2. Indeed, I'm already half way 
through a second one.
I find it easier than with Ax1. I used sawa with ax1. All of my apps 
use a backend db so all the gui is dynamic. All use xslt, none of that 
drug induced taglib stuff.
Ax2 is more logical and easier to understand than Ax1. Indeed, I can 
now knock up view/edit/db change for a given record in under an 
hour. The most complicated bit about all of this development is 
understanding web apps generally, which is a problem regardless of 
platform.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 wiki

2007-01-18 Thread john1
On 18 Jan 2007 at 9:07, Also Sprach Anthony Gardner:

 Well suggested. I was an AxKit user and am interested in seeing how 
AxK2 works but don;t have the time to work it out by myself and
 would like to see an overall concept before diving in.

You could always ask on here...

I've developed an app already on Ax2. Indeed, I'm already half way 
through a second one.
I find it easier than with Ax1. I used sawa with ax1. All of my apps 
use a backend db so all the gui is dynamic. All use xslt, none of that 
drug induced taglib stuff.
Ax2 is more logical and easier to understand than Ax1. Indeed, I can 
now knock up view/edit/db change for a given record in under an 
hour. The most complicated bit about all of this development is 
understanding web apps generally, which is a problem regardless of 
platform.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 wiki

2007-01-18 Thread john1
Ants,

 you're right, I could've but I felt a bit of an idiot as no one else was
 asking the basic questions.
 
 What is the url to get the code out of svn ... if that's still the way it's 
 done. I'll try and have another 
 look at it.

heh, Don't let that stop you. I frequently look an idiot. (see posts 
passim).
I even had to ask the syntax of the svn command. How's that for 
basic?

svn co svn://axkit.org/axkit2

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2: passing params to a stylesheet

2007-01-17 Thread john1
Lars,

  What's the syntax for passing param(s) to a stylesheet?
 
 Try $processor-transform(XSLT($stylesheet, %parms))
 
 That's actually (almost) documented in the very bottom of the
 AxKit2::Processor POD.

You're not wrong!
 
 Yeah, an example in the documentation would be a nice touch ;-)

I'm going to update the wiki

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Axkit2 wiki

2007-01-17 Thread john1
Lo all,

Are we to have an AxKit2 wiki or something hanging off the existing 
AxKit1 wiki?

Could someone send me a username and password for the wiki 
please?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AxKit2: Saving other objects in a plugin

2007-01-15 Thread john1
Lo all,

I have a plugin, Baz, which uses the axkit2 version of an object, ie no 
package syntax and blessing and what have you.

I will be using another module, eg Foo::bar. Now when I create an 
instance of foo::bar where's the best place to store it, given that it is 
_not_ to be referenced across plugins but will be referenced, 
possibly across methods of Baz?
In a my variable declared at the top of Baz, or in a notes field?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Danga and aio

2007-01-10 Thread john1
On 9 Jan 2007 at 15:56, Also Sprach Matt Sergeant:

 On 9-Jan-07, at 10:18 AM, [EMAIL PROTECTED] wrote:
 
  Is there a quick and easy way to find out if the kernel supports aio?
 
 I'm not sure. Probably best to just check kernel versions. 2.4  
 generally doesn't. 2.6 does. I assume you're talking about Linux here.

My apologies, yes. Unfortunately it's a red hat kernel, so am unsure
as to what the actual kernel version is. uname gives:
2.4.21-32.0.1.ELsmp
The RH release is:
Red Hat Enterprise Linux ES release 3 (Taroon Update 5)

Is there a little bit of perl code I could run to see if everythings ok?
I vaguely remember something in the code of the Danga stuff or 
somewhere that did a little test or could tell if aio was supported...

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ax2 production setup

2007-01-10 Thread john1
Lo all,

I'm running it on RH Linux.

Currently I have one app set up thus:

/var/www/AxKit2/APP_1

AxKit2 contains the axkit prog and a link to the plugins directory.
APP_1 contains
./web
./web/plugins
./web/stylesheets
./web/webroot
./web/webroot/graphics
./web/webroot/js

Now it's been mentioned before to use daemontools, so I can set 
that up. Is daemontools the way to go? I am more used to an rc.foo
script.

Given that there will be two other apps (at least), should I have one
Ax2 server or one for each app? I am leaning towards one for each 
app because we have 4 cpus and I presume it would be better for 
throughput.

TIA

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Danga and aio

2007-01-10 Thread john1
On 10 Jan 2007 at 9:30, Also Sprach Matt Sergeant:

 I've used this in the past to check if I'm using epoll (though that's  
 not the same as whether aio is supported):
 
 my $POLL = with  . ($Danga::Socket::HaveEpoll ? epoll() :
  $Danga::Socket::HaveKQueue ? kqueue() : poll 
 ());

I get poll(). I also get poll() on my 2.6.14 slackware laptop.
I do I get epoll or kqueue?
I have tested Danga::Socket (make test). On the RH it skips the 
event tests. On the slack box it passes all tests.
I've just installed IO::AIO and Danga::Socket on the slack 2.6.14 
kernel and both installed ok but I still get with poll() using the code 
above.

More importantly, does it mean that ax2 will run like a pig on the RH 
with poll() only?

 To check if AIO works I've just tried to install IO::AIO - if it  
 fails then it's not available.

Doh!
You know, I think my brain goes to sleep every time I start a new 
thread on this list!

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Fwd) Re: (Fwd) Re: Bug in parse_post_param

2007-01-09 Thread john1
On 8 Jan 2007 at 17:34, Also Sprach Matt Sergeant:

 Now fixed in SVN - thanks for the continued prodding.

No probs. Thanks for fixing it! It's going into production soon.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Danga and aio

2007-01-09 Thread john1
Is there a quick and easy way to find out if the kernel supports aio?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



(Fwd) Re: (Fwd) Re: Bug in parse_post_param

2007-01-08 Thread john1
Any news as yet on the below?

 There appears to be a bug in parse_post_param plugin.

 It works for firefox but not for IE5.5 and IE6.
 I've tracked it down to IE setting the $$bref 2 bytes too long.
 So it's probably a CR/LF thing.

 Yeah there's vague mention of this in the perlbal source. I'll dig
 into it.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2 seg fault

2006-12-01 Thread john1
Obviously, when I said I had fixed it, I was mistaken.
The location / stops the seg faults etc, but then stops my other 
locations from working. Which is a Bad Thing and definitely not what 
I wanted :)

On 29 Nov 2006 at 12:41, Also Sprach Matt Sergeant:

 On 28-Nov-06, at 5:29 AM, [EMAIL PROTECTED] wrote:
 
  Can you run it under gdb and get a stack trace?
 
  How do I do that?
 
 In the axkit2 dir, run:
 
 $ gdb perl
 gdb run ./axkit (and any flags you use here)
 
 Then do your thing that causes the segfault. It should stop the  
 debugger, then type:
 
 gdb bt
 
 And email back the stack trace that gives.
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2 seg fault

2006-11-30 Thread john1
As requested. Mind you, I have fixed it, after a fashion.
I've set up a location thusly:

Location / 
  Documentroot foo/bar
/Location

Now it doesn't crash, but I do get a The browser sent a request the 
server didn't understand page.

[EMAIL PROTECTED]:/var/www/AxKit2$ gdb perl
GNU gdb Red Hat Linux (6.3.0.0-0.30.1rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...(no debugging
symbols found)
Using host libthread_db library /lib/tls/libthread_db.so.1.

(gdb) run axkit -c axkit.conf
Starting program: /usr/bin/perl axkit -c axkit.conf
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218528416 (LWP 27532)]
L7 request_log register_hook: response_sent = hook_response_sent
L7 error_xml register_hook: error = hook_error
L7 fast_mime_map register_hook: mime_map = hook_mime_map
L7 parse_post_data register_hook: body_data = hook_body_data
L7 uri_to_file register_hook: uri_translation = hook_uri_translation
L7 uri_to_file register_hook: fixup = hook_fixup
L7 serve_file register_hook: write_body_data = hook_write_body_data
L7 serve_file register_hook: response = hook_response1
L7 serve_file register_hook: response = hook_response2
L7 emap_2epm register_hook: post_read_request = hook_post_read_request
L7 emap_2epm register_hook: xmlresponse = hook_xmlresponse
81.16.232.25:64228 L6 Connection from 81.16.232.25:64228
81.16.232.25:64228 L6 uri_to_file uri_translation translate: /
81.16.232.25:64228 L7 uri_to_file uri_translation Translated  to 
(request uri: /, path info: )
A processor needs source document path at
/usr/lib/perl5/site_perl/5.8.3/i686-linux-ld/AxKit2/Processor.pm line
38.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218528416 (LWP 27532)]
0x00e3a92c in Perl_leave_scope () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
(gdb) bt
#0  0x00e3a92c in Perl_leave_scope () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#1  0x00e38e61 in Perl_pop_scope () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#2  0x00dc9a63 in S_my_exit_jump () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#3  0x00dc9912 in Perl_my_failure_exit () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#4  0x00e3e371 in Perl_die_where () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#5  0x00e084d6 in Perl_vdie () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#6  0x00e088b9 in Perl_die () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#7  0x00e455d4 in Perl_pp_die () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#8  0x00e16431 in Perl_runops_standard () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#9  0x00dc5fac in S_call_body () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#10 0x00dc5edd in Perl_call_sv () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#11 0x00e086cf in Perl_vdie () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#12 0x00e088b9 in Perl_die () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#13 0x00e455d4 in Perl_pp_die () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#14 0x00e16431 in Perl_runops_standard () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#15 0x00dc55a5 in S_run_body () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#16 0x00dc5356 in perl_run () from
/usr/lib/perl5/5.8.3/i686-linux-ld/CORE/libperl.so
#17 0x08049213 in main ()
(gdb) 






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2 seg fault

2006-11-28 Thread john1
On 27 Nov 2006 at 11:14, Also Sprach Matt Sergeant:

 On 27-Nov-06, at 4:19 AM, [EMAIL PROTECTED] wrote:
 
  All,
 
  I'm getting the error below when someone enters
  http://domain.dom:8000
 
  59.44.58.37:4992 L6 uri_to_file uri_translation translate: /
  59.44.58.37:4992 L7 uri_to_file uri_translation Translated  to   
  (request
  uri: /, path info: )
  A processor needs source document path at
  /usr/lib/perl5/site_perl/5.8.3/i686-linux-ld/AxKit2/Processor.pm line
  38.
  Segmentation fault
 
 Can you run it under gdb and get a stack trace?

How do I do that?

fwiw, I get the same error but without a seg fault on my slack laptop. 
(The above is a RH box)

John
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ax2 seg fault

2006-11-28 Thread john1
On 28 Nov 2006 at 11:16, Also Sprach Matt Sergeant:

 You may have seen the news lately about the rise in spam volumes -  
 well it's my day job to deal with that, and thus lack of axkit  
 activity :-(

Heh, I thought you were going to say it was your contribution to stop 
the email flood, the lack of posts :)

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ax2 seg fault

2006-11-27 Thread john1
All,

I'm getting the error below when someone enters 
http://domain.dom:8000

59.44.58.37:4992 L6 uri_to_file uri_translation translate: /
59.44.58.37:4992 L7 uri_to_file uri_translation Translated  to  (request
uri: /, path info: )
A processor needs source document path at
/usr/lib/perl5/site_perl/5.8.3/i686-linux-ld/AxKit2/Processor.pm line
38.
Segmentation fault

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



IE Bug in parse_post_param

2006-11-15 Thread john1
Any news on the fix to allow IE to post params?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hook_xmlresponse question

2006-11-02 Thread john1
On 2 Nov 2006 at 13:49, Also Sprach Robin Berjon:

 On Oct 31, 2006, at 10:35, [EMAIL PROTECTED] wrote:
  If that's the case you should create elements with createElementNS
  ('http://www.w3.org/1999/xhtml', 'div').
 
  Does it matter if I don't?
 
 Yes, never, *never*, ever mix up

 That's  a yes then? :)

 namespace-aware and non-namespace- 
 aware methods in the same context. You will shoot yourself in the  
 foot. For simplicity (and sanity) it's best to just never use the non- 
 NS variants, they were mistakes and should be deprecated.

I don't have a namespace for the xml generated in my app.
I've had a look at the namespace options and there doesn't seem to 
be a way to set the default NS for nodes I create, which could make
the code very ugly to look at, it being littered with an NS text.
Having said that, I could make it a constant.

The reason for the does it matter was that in my case, I find all the 
elements for a NS do a get first child and then a get next sibling
and then add a node. I have no idea if the get child and sibling are 
NS aware, but as all the nodes are from the xslt they have the same 
NS anyway. The node I add didn't have a NS but still worked in the 
browser. I've now changed the add node to use the NS.

Thanks.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ax2 seg fault with particular url

2006-11-01 Thread john1
I get the below error when I enter
http://darkstar:8000
instead of the set up uri which is
http://darkstar:8000/fred

It's running on a RH box. It does error, but without the seg fault on 
my slack laptop...

81.6.252.25:64083 L6 Connection from 81.6.252.25:64083
81.6.252.25:64083 L6 uri_to_file uri_translation translate: /
81.6.252.25:64083 L7 uri_to_file uri_translation Translated  to 
(request uri: /, path info: )
A processor needs source document path at
/usr/lib/perl5/site_perl/5.8.3/i686-linux-ld/AxKit2/Processor.pm line
38.
Segmentation fault

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hook_xmlresponse question

2006-10-31 Thread john1
On 30 Oct 2006 at 19:02, Also Sprach Robin Berjon:
 On Oct 30, 2006, at 17:53, [EMAIL PROTECTED] wrote:
  On 30 Oct 2006 at 16:42, Also Sprach Robin Berjon:
 Is there any chance that in the DOM you create you use createElement 
 ('div') to create elements but that in the XSLT there is a namespace  
 declaration binding http://www.w3.org/1999/xhtml to the default  
 namespace?

Spot on!
 
 If that's the case you should create elements with createElementNS 
 ('http://www.w3.org/1999/xhtml', 'div').

Does it matter if I don't?
 
 which'll get body elements in the right namespace. Or if you're  
 confident enough, match in any namespace with either
 
$doc-getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'body');

Fixed it! Thanks!

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



hook_xmlresponse question

2006-10-30 Thread john1
I thought I'd modify the xml, just before it gets sent to the browser.

$out-input seems to contain the xml that's sent to the browser.
(It has all the correct fields in there when I run $out-input-toFile())
Now to mess about with the xml I have put a dummy div as the last 
child of the body
So, in theory, I can get the body tag and run lastChild on it. ie

my $root = $out-input-getElementsByTagName('body')-
get_node(1);

But it doesn't return anything. his makes the server fall over with a 
plugin error, $root being undefined.
If I change 'body' with 'div' (there are plenty of divs) it returns a value.

I am using getElementsByTagName elsewhere in my code and it 
works perfectly; but this is against a $dom that I build, not one that 
has been through xslt.

Any ideas?

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



POST params problem

2006-10-30 Thread john1
A new one this time.
If I have a form that doesn't send any parameters, the server hangs.
I found this out through having a form that only had checkboxes on 
it, none of which were checked. There is a workaround, hide a text 
field on the form.
Of course, that won't be used by people wanting to mount a DOS 
attack.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hook_xmlresponse question

2006-10-30 Thread john1
On 30 Oct 2006 at 15:29, Also Sprach Robin Berjon:
 
 On Oct 30, 2006, at 15:06, [EMAIL PROTECTED] wrote:
  my $root = $out-input-getElementsByTagName('body')-get_node(1);
 
  But it doesn't return anything. his makes the server fall over with a
  plugin error, $root being undefined.
  If I change 'body' with 'div' (there are plenty of divs) it returns  
  a value.
 
 Is there any chance that get_node(0) returns something? Have you  
 tried to dump the NodeList you get to see if it contains anything?

Well, the docs say that the node list starts from 1 not 0. But I have 
tried it :) The above code is used elsewhere, even the get_node(1)
for a single unique node in my DOM. This works.

It's the getelementsbytagname that's failing.
When I try to get the body tag the node list is empty.
Bizarrely enough, when I try with the div tag, of which there are 
several, the nodelist contains only the one Element object.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hook_xmlresponse question

2006-10-30 Thread john1
On 30 Oct 2006 at 16:42, Also Sprach Robin Berjon:

 On Oct 30, 2006, at 16:08, [EMAIL PROTECTED] wrote:

  The above code is used elsewhere, even the get_node(1)
  for a single unique node in my DOM. This works.
 
  It's the getelementsbytagname that's failing.
 
 It may be a long shot but you should try dumping namespaceURI,  
 localName and tagName for body and the divs that match. A number of  
 implementations are a bit fuzzy on what they match on for non- 
 namespaced methods. The NS variant may work better, and failing that  
 you can match on //*:body.

It is a long shot in so far as I have no idea how to do that!
The getelementsbytagname does work on the dom I create, it 
doesn't seem to work on the dom that is returned after it has gone
through the stylesheet transforms (3 of them).

I will try any method on the dodgy dom if you tell me what they are.
fwiw, toFile does work and all is present and correct in the output 
file...

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Fwd) Re: Bug in parse_post_param

2006-10-27 Thread john1
Matt,

 Sorry John,
 
 My wife had an accident while skating (fell backwards and fractured  
 her skull) last week so I've had no free time to look into this at  
 all. Sorry.

My apologies matt, the email wasn't a dig at yourself. The second 
attempt thing was because my first didn't appear in the mail list 
archives, so I thought it hadn't got through. I would never be so 
churlish as to pester someone that does something for free.

What is it with you two anyway? She's breaking her head and you 
run around eating wasps. Some people just aren't cut out for fitness 
training...

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



(Fwd) Re: Bug in parse_post_param

2006-10-26 Thread john1
2nd go at this, I sent it on the 25th but it aint in the archive yet...

--- Forwarded message follows ---
Matt,

  There appears to be a bug in parse_post_param plugin.
 
  It works for firefox but not for IE5.5 and IE6.
  I've tracked it down to IE setting the $$bref 2 bytes too long.
  So it's probably a CR/LF thing.
 
 Yeah there's vague mention of this in the perlbal source. I'll dig  
 into it.

Any news on this please?

John

--- End of forwarded message ---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in parse_post_param

2006-10-25 Thread john1
Matt,

  There appears to be a bug in parse_post_param plugin.
 
  It works for firefox but not for IE5.5 and IE6.
  I've tracked it down to IE setting the $$bref 2 bytes too long.
  So it's probably a CR/LF thing.
 
 Yeah there's vague mention of this in the perlbal source. I'll dig  
 into it.

Any news on this please?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using methods in one plugin from another

2006-10-13 Thread john1
I thought I'd move some code from my plugin and put it into its own 
plugin. However, the methods in the new plugin need to be used by
the first plugin. How do I go about doing this?
I presume I need to somehow put the new plugins object ref into 
$plugin...

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using methods in one plugin from another

2006-10-13 Thread john1
On 13 Oct 2006 at 10:53, Also Sprach Matt Sergeant:

 On 13-Oct-06, at 7:39 AM, [EMAIL PROTECTED] wrote:
 
  I thought I'd move some code from my plugin and put it into its own
  plugin. However, the methods in the new plugin need to be used by
  the first plugin. How do I go about doing this?
  I presume I need to somehow put the new plugins object ref into
  $plugin...
 
 Could you write a separate perl module and use it in both?

Ah, yes. I'll give it a go.
I was thinking more in the lines of an actual plugin though. ie
set up in the config file and all that. With access to the AxKit2 object 
etc.
I am writing a few methods for xml caching and I thought if it got 
more configurable etc I would put it in its own plugin so others could 
use it...

John






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Saving xml object to cache

2006-10-11 Thread john1
Is it possible?
I get all sorts of errors saving a XML::LibXML::Element to cache.
I get similar when I try using storable on it first.
Version of XML::LibXML is 1.57 iirc. I am unable to upgrade because 
it will break my Axkit 1 set up. (If it makes a difference.)

Below is the code that breaks, if someone could confirm it for me 
please?

#! /usr/bin/perl -w 

use strict;
use diagnostics;

use XML::LibXML;
use Storable qw( freeze thaw );
use Data::Dumper;
use Devel::Peek;

my $node = XML::LibXML::Element-new('foobar');

#my $serial = freeze \$node;

#my $a = thaw($serial);

#print Dump($a);

#print Dumper($a);
use Cache::MemoryCache;
my $cache = new Cache::MemoryCache( { 'default_expires_in' = 
600 } );

$cache-set('fred', $node);
my $a = $cache-get('fred');




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: parse_post_param problem

2006-10-06 Thread john1
Jörg,

  http://domain.dom:8000/foo/?fire=hot
 
  Is the above a valid url? the / before the ? looks wrong.

 It's a perfectly valid URL. If you don't want to upgrade, that's the easiest
 way to go.

Oh I don't mind upgrading. The problem I have with the dodgy looking url is 
that it
would break my app if the user edited it. Which I don't want.

  What I've done to get round my problem is to have a
  fixup hook. If the request is a POST, I save the params to cache.
  If it's a get and we aren't about to redirect, i save the params to the
  client param api.
  Is this a valid way to do it? (the best way?)

 I strongly suggest to upgrade, or if you don't want to, to use URLs ending
 with / where needed. Both variants are much better than a caching solution.

Ok, I'll dig out the svn stuff and d/l it now.

Thank you for your time.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: parse_post_param problem

2006-10-06 Thread john1
On 5 Oct 2006 at 15:03, Also Sprach Matt Sergeant:

 I think what happens with AxKit1 is it suppresses Apache's internal  
 mod_dir mechanism that forces the redirect (when used with SetHandler  
 axkit). This should probably be considered an AxKit1 bug :-)

heh.
I've had a look at my pre sawa code ie pure axkit and I have some 
manual redirects in there.
I had forgotten what a pita web programming is. I can't wait to see 
how my mozilla css looks in IE6...

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: xml_response question

2006-10-06 Thread john1
On 5 Oct 2006 at 17:30, Also Sprach Jörg Walter:

 You can use multiple location blocks, the first match is used:

 Location \.(gif|css|jpg|png)$
... whatever normal files should get
 /Location

 Location /your_app/
... your webapp code ...
 /Location

Ok, I've got the latest code.
the physical directory is /tmp/AxKit2-1.1/emap/webroot
The location (as shown below) is /fred. (Conf file at the end)

The css is still hitting my xml_response hook.
The href to the css in the html does _not_ have any path associated
with it. ie it's just login.css.

Any thoughts?

# Copyright 2001-2006 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
# See the License for the specific language governing permissions
and
# limitations under the License.
#

Pluginlogging/warn
LogLevel  LOGDEBUG

Plugin request_log
RequestLog access_log


Plugin  error_xml
ErrorStylesheet demo/error.xsl
StackTrace On

Plugin fast_mime_map
Plugin parse_post_data

Server

Port   8000

Plugin uri_to_file
Plugin serve_file

DirectoryIndex index.xml

Location \.(gif|css|jpg|png)$
#DocumentRootemap/webroot
/Location

Location /fred
Plugin   cachecache
CacheModule  Memory
# ten megabytes (ish)
CacheSize1000
CacheNamespace emap
CacheExpiresIn 300
DocumentRootemap/webroot
PluginDir emap/plugins
Plugin emap.pm
ShowParams 1
/Location

/Server

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: xml_response question

2006-10-06 Thread john1
wrt to the Location thing not seeming to work (probably user error).

Here's my log file.

127.0.0.1:48426 L6 Connection from 127.0.0.1:48426
127.0.0.1:48426 L6 uri_to_file uri_translation translate: /fred/
127.0.0.1:48426 L7 uri_to_file uri_translation Translated / to 
/tmp/AxKit2-1.1/emap/webroot (request uri: /fred/, path info: )
127.0.0.1:48426 L7 emap_2epm fixup HOOK FIXUP, METHOD: GET
127.0.0.1:48426 L7 emap_2epm fixup uri_params_save: yes params:
127.0.0.1:48426 L7 emap_2epm fixup uri_params_save: DONE.
127.0.0.1:48426 L7 emap_2epm xmlresponse xml_response FILE: 
/tmp/AxKit2-1.1/emap/webroot
127.0.0.1:48426 L7 emap_2epm xmlresponse State: login
127.0.0.1:48426 L7 emap_2epm xmlresponse Serving up an xml response
127.0.0.1:48426 L6 Transformer::XSLT(emap/stylesheets/menu.xsl) running
127.0.0.1:48426 L6 Transformer::XSLT(emap/stylesheets/login.xsl) running
127.0.0.1:48426 L6 Transformer::XSLT(emap/stylesheets/common.xsl) running
127.0.0.1:48426 L7 Response sent
127.0.0.1:48426 L6 uri_to_file uri_translation translate: /fred/login.css
127.0.0.1:48426 L7 uri_to_file uri_translation Translated fred/login.css 
to fred (request uri: /fred, path info: /login.css)
127.0.0.1:48426 L6 serve_file response Serving file: fred
127.0.0.1:48426 L7 Response sent
127.0.0.1:48427 L6 Connection from 127.0.0.1:48427
127.0.0.1:48427 L6 uri_to_file uri_translation translate: /fred/sawanook.gif
127.0.0.1:48427 L7 uri_to_file uri_translation Translated 
fred/sawanook.gif to fred (request uri: /fred, path info: /sawanook.gif)
127.0.0.1:48427 L6 serve_file response Serving file: fred
127.0.0.1:48427 L7 Response sent



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: uri to file strangeness

2006-10-06 Thread john1
On 4 Oct 2006 at 15:22, Also Sprach Jörg Walter:

 To get Apache-like behaviour, add one directive to each Location-block:
 Path 

Doesn't work. Below is the error:

[EMAIL PROTECTED]:/tmp/AxKit2-1.1$ ./axkit -c emap/axkit.conf
L7 request_log register_hook: response_sent = hook_response_sent
L7 error_xml register_hook: error = hook_error
L7 fast_mime_map register_hook: mime_map = hook_mime_map
L7 parse_post_data register_hook: body_data = hook_body_data
L7 uri_to_file register_hook: uri_translation = hook_uri_translation
L7 uri_to_file register_hook: fixup = hook_fixup
L7 serve_file register_hook: write_body_data = hook_write_body_data
L7 serve_file register_hook: response = hook_response1
L7 serve_file register_hook: response = hook_response2
Can only appear inside Location at lib/AxKit2/Connection.pm line 503,
$fh line 44.


John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug in parse_post_param

2006-10-06 Thread john1
Lo,

There appears to be a bug in parse_post_param plugin.

It works for firefox but not for IE5.5 and IE6.
I've tracked it down to IE setting the $$bref 2 bytes too long.
So it's probably a CR/LF thing.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: parse_post_param problem

2006-10-05 Thread john1
On 4 Oct 2006 at 16:38, Also Sprach Jörg Walter:

 On Wednesday, 04. October 2006 16:18, [EMAIL PROTECTED] wrote:
  Well, I eventually found how to do it, but I now have a problem
 
  The log below is from when the submit button is pressed. As one can see,
  the params username and passwordname are put into the clients param api
  but then are promptly forgot about due to a redirect. Is this expected
  behaviour?

 It's the problem of all redirects. Apache is no different.

When I have similar code in my Axkit1 with SAWA app, the post
params are available to me. I also notice that in the plugin code the
post params are put into the client param API, which would seem a
little pointless if they are to be discarded.

 The solution is to
 try the just discussed way of suppressing the redirects, or to /-terminate
 the URL right from the start.

Could you tell me the title of thelist thread that has the redirect
suppression in please?
How do I go about / terminating the URL?

Would best practise be to cache the params?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



File upload with single process

2006-10-05 Thread john1
As the Axkit daemon is single process, how is it envisaged to handle
a file upload that takes a long time?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: uri to file strangeness

2006-10-05 Thread john1
On 4 Oct 2006 at 15:22, Also Sprach Jörg Walter:

 Locations are usually interpreted as directories. This stems from a

 To get Apache-like behaviour, add one directive to each Location-block:
 Path 

Ax2 chokes with this directive.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: parse_post_param problem

2006-10-05 Thread john1
On 4 Oct 2006 at 16:38, Also Sprach Jörg Walter:

 It's the problem of all redirects. Apache is no different. The solution is to
 try the just discussed way of suppressing the redirects, or to /-terminate
 the URL right from the start.

I can't work out how to suppress a redirect. I have managed to get
a / terminate though.

A redirect seems to happen when the url is

http://domain.dom:8000/foo?fire=hot

and gives

http://domain.dom:8000/foo/?fire=hot

Is the above a valid url? the / before the ? looks wrong.

In the above case a redirect is a waste of time, isn't it?

What I've done to get round my problem is to have a
fixup hook. If the request is a POST, I save the params to cache.
If it's a get and we aren't about to redirect, i save the params to the
client param api.
Is this a valid way to do it? (the best way?)

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



xml_response question

2006-10-05 Thread john1
At the moment I have a line in xml_response that checks the request
for ending in css, gif etc so as to return DECLINE and not try and put 
them thrugh a stylesheet.
Is there an inbuilt way of doing this(ie separating ordinary files from 
xml) or shuld Iwrite a config directive to do it? Something along the 
lines of
IgnoreFiles gif css jpg

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



uri to file strangeness

2006-10-04 Thread john1
Lo all, 

There's a bit of a difference as outlined below. 
It doesn't seem to be causing problems tho. 
Any url seems to have a / put on the end for some reason. 
fred is set up in axkit.conf as a location. 

AxKit2: 
Entering 
http://localhost:8000/fred 
gives 
http://localhost:8000/fred/ 


A form with action of 
/fred?rose=state*start 
gives 
http://localhost:8000/fred/?rose=state*start 

Axkit1 
http://localhost:8000/fred 
gives 
http://localhost:8000/fred 

A form with action of 
/fred?rose=state*start 
gives 
http://localhost:8000/fred?rose=state*start 


John 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



parse_post_param problem

2006-10-04 Thread john1

Well, I eventually found how to do it, but I now have a problem

The log below is from when the submit button is pressed. As one can see,
the params username and passwordname are put into the clients param api
but then are promptly forgot about due to a redirect. Is this expected 
behaviour?


127.0.0.1:55882 L6 Connection from 127.0.0.1:55882
127.0.0.1:55882 L7 emap_2epm post_read_request
127.0.0.1:55882 L7 emap_2epm post_read_request uri_params_save: yes 
params: state*start
127.0.0.1:55882 L7 emap_2epm post_read_request Saving ARG: state VAL: start
127.0.0.1:55882 L7 emap_2epm post_read_request uri_params_save: DONE. start
127.0.0.1:55882 L7 parse_post_data body_data parse_post_data $VAR1 = [
  'rose',
  'state',
  'username',
  'passwordname'
];

127.0.0.1:55882 L6 uri_to_file uri_translation translate: 
/emap?rose=state*start
127.0.0.1:55882 L7 uri_to_file uri_translation Translated  to 
/tmp/AxKit2-1.1/emap/webroot (request uri: /emap?rose=state*start, path 
info: )
127.0.0.1:55882 L6 uri_to_file fixup redirect to /emap/?rose=state*start
127.0.0.1:55882 L7 Response sent
127.0.0.1:55883 L6 Connection from 127.0.0.1:55883
127.0.0.1:55883 L7 emap_2epm post_read_request
127.0.0.1:55883 L7 emap_2epm post_read_request uri_params_save: yes 
params: state*start
127.0.0.1:55883 L7 emap_2epm post_read_request Saving ARG: state VAL: start
127.0.0.1:55883 L7 emap_2epm post_read_request uri_params_save: DONE. start
127.0.0.1:55883 L6 uri_to_file uri_translation translate: 
/emap/?rose=state*start
127.0.0.1:55883 L7 uri_to_file uri_translation Translated / to 
/tmp/AxKit2-1.1/emap/webroot (request uri: /emap/?rose=state*start, path 
info: )
127.0.0.1:55883 L7 emap_2epm xmlresponse xml_response args $VAR1 = [
  'rose',
  'state'
];

127.0.0.1:55883 L7 emap_2epm xmlresponse State: start
127.0.0.1:55883 L7 emap_2epm xmlresponse state_start params $VAR1 = [
  'rose',
  'state'
];

127.0.0.1:55883 L7 emap_2epm xmlresponse Serving up a file
127.0.0.1:55883 L6 Transformer::XSLT(emap/stylesheets/menu.xsl) running
127.0.0.1:55883 L6 Transformer::XSLT(emap/stylesheets/start.xsl) running
127.0.0.1:55883 L6 Transformer::XSLT(emap/stylesheets/common.xsl) running
127.0.0.1:55883 L7 Response sent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: uri to file strangeness

2006-10-04 Thread john1
On 4 Oct 2006 at 15:22, Also Sprach Jörg Walter:

 On Wednesday, 04. October 2006 12:31, [EMAIL PROTECTED] wrote:

  There's a bit of a difference as outlined below.
  It doesn't seem to be causing problems tho.
  Any url seems to have a / put on the end for some reason.
  fred is set up in axkit.conf as a location.

 because any URL starting with /baz will do path lookups beginngin
 with /foo/bar again. This is by design, because it allows you to easily
 share a common web data root among all web applications (which is expected to
 be the common case).

Hmm, I spend a lot of time keeping apps and users away from one
another!

 To get Apache-like behaviour, add one directive to each Location-block:
 Path 

Thanks I'll give it a go.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



POST params

2006-10-03 Thread john1
Lo all,

Axkit2.

How does one get at the params from a form using the POST 
method?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Temporary data storage

2006-09-18 Thread john1
On 18 Sep 2006 at 7:51, Also Sprach Matt Sergeant:

 On 17 Sep 2006, at 12:26, [EMAIL PROTECTED] wrote:
 
  When a request comes in the uri params are encrypted so I have to
  decrypt them and parse them.
  eg
  localhost:8000/emap?rose=encrypted string
 
  Where can I put the parameters? Should I
  1) Have a my %hash in the plugin?
  2) store a hashref in notes
  3) something else?
 
 Define temporary. Do you need it to live throughout the entire request 
 (i.e. have another plugin/hook pick up the data) or just temporary to 
 one hook?

Well my app is going in the one plugin. The only hook I have (up to 
now) is xmlresponse. So I want to share it across methods in the 
plugin. But not between plugins.

I presume that %hash for in the plugin and notes if sharing between 
plugins?

John

--

Santa Claus wears a Red Suit,
He must be a communist.
And a beard and long hair,
Must be a pacifist.

What's in that pipe that he's smoking?
-- Arlo Guthrie



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Temporary data storage

2006-09-18 Thread john1
 The second is to put it in the $client object's notes field - this is  
 a per-request storage location:

Ok, I think I'll go with the notes. It's a bit of future proofing for when I 
have multiple plugins...

Thanks.

john

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Temporary data storage

2006-09-18 Thread john1
 Why not decrypt the values and store them in $self-client-param? After that 
 you could use param() as if they were not encypted.

Well mainly because I didn't think of it! I'll look into it...

Thanks

john


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Temporary data storage

2006-09-17 Thread john1
Lo All,

When a request comes in the uri params are encrypted so I have to 
decrypt them and parse them.
eg
localhost:8000/emap?rose=encrypted string

Where can I put the parameters? Should I
1) Have a my %hash in the plugin?
2) store a hashref in notes
3) something else?

John
--

First Rule of History:
History doesn't repeat itself -- historians merely repeat each
other.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axkit2 Caching

2006-09-14 Thread john1
On 13 Sep 2006 at 14:20, Also Sprach Matt Sergeant:

 [EMAIL PROTECTED] wrote:
  Is the Cache::Cache stuff in there for us to roll our own caching of 
  html pages or does Axkit2 have that inbuilt?
 
 I'm looking for feedback on caching. I got fantastic performance when I 
 benchmarked doing XSLT without caching (just caching the stylesheet 
 forever),

How does one cache the xslt stylesheets at server start time?
 
 I suppose it's a chicken and egg problem - maybe you don't want to try 
 AxKit2 if it doesn't have the same caching system as AxKit1,

I do want to try it. I have a new app to write in two weeks and I'm not
a fantastic perl hacker. I learnt 2 new things from Utils.pm for eg :)

 or maybe if 
 you tried it you'd like the new system. Either way, speak up and we'll 
 see what should be done.

I think I prefer manual caching. All my stuff is DB based which can't 
be cached anyway.

John
--

It is better never to have been born.  But who among us has such 
luck?
One in a million, perhaps.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



continuations

2006-09-14 Thread john1
Reading the docs, I've come to the continuation section.

Does it only apply to disk stuff or could I write something that 
handled long database queries, for example?

John

--

Monday, n.:
In Christian countries, the day after the baseball game.
-- Ambrose Bierce, ''The Devil's Dictionary''



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Axkit2, sawa

2006-09-12 Thread john1
Lo all,

I'm about to start a new project. I'm currently using SAWA and axkit, 
but I'm really only using SAWA for the style choosing and for parsing 
the client uri.

The question is, do I need SAWA with Axkit2?

John

--

''Here at the Phone Company, we serve all kinds of people; from
Presidents and Kings to the scum of the earth ...''



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-09 Thread john1
On 8 Aug 2006 at 12:43, Also Sprach Matt Sergeant:

 On 8-Aug-06, at 12:19 PM, [EMAIL PROTECTED] wrote:
 
  Is Danga::Socket  faster than opening a fifo pipe for reading and
  immediately  forking when something is read, given that the
  processing is fairly long winded after the read?
 
 This is quite on-topic I think. The answer is it's much faster.  
 There's a huge overhead in forking, and it just doesn't scale.

I presume that there is an event loop. When an event happens and 
the processing of that event takes, for example, five minutes, what 
happens when another event happens? I would imagine it gets 
processed straight away,but I have no idea how, what's the 
mechanism? threads? Or are multiple server daemons set up and 
the request passed to them, like apache does?

btw, how does one download axkit2?
I have a new app to write using ajax etc in about 3 weeks and 
would like to use it if poss. Assuming the current paradigm for axkit2 
is whats going to be decided upon of course.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-09 Thread john1
On 9 Aug 2006 at 8:37, Also Sprach Matt Sergeant:

 On 9-Aug-06, at 8:25 AM, [EMAIL PROTECTED] wrote:
 
  I presume that there is an event loop. When an event happens and
  the processing of that event takes, for example, five minutes, what
  happens when another event happens?
 
 It's blocked until you re-enter the event loop. Obviously that's bad,  
 so I'll be investigating ways you can do long running stuff. It'll be  
 some API along the lines of:
 
$self-do_slow(sub { ... });
return CONTINUATION;
 
 And when that's done (bearing in mind it'll be in a separate process  
 so you'll need to arrange for a way for data to be returned) the  
 continuation will pick up again at the next plugin in the chain.

Leaving plugins to one side for the moment...

In my particular scenario:

The server sits there listening for a request. This request
has to go to a db, retrieve lots of data, generate the xml etc
and eventually pass back html. Let's say that the retrieval of data 
takes about 5 mins.
If 100 users put in a request at the same time, the server blocks to
service to first user, how does it service the other users without 
forking or passing them on to other daemons ot threads?
(I have never used threads and have little idea about them)

Would I be correct in thinking that the mod_perlish speed you 
can achieve is due to the one instance of perl that is running the 
httpd and app?
So rather than the perl httpd running my perl app, in effect my perl 
app has an httpd embedded in it?

 (don't worry about the gritty details - I've done this sort of thing  
 for qpsmtpd already so it's just a SMOP and documenting it)

SMOP?
 
  btw, how does one download axkit2?
 At the moment it's SVN only. I can put a snapshot up somewhere if you  
 like.

Thank you, but I've sussed it out. Well the d/l at least. The up and 
running may take some time, I'm a perl Makefile.PL wallah :)

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-09 Thread john1
On 9 Aug 2006 at 10:35, Also Sprach Matt Sergeant:

 On 9-Aug-06, at 9:47 AM, [EMAIL PROTECTED] wrote:
 
  The server sits there listening for a request. This request
  has to go to a db, retrieve lots of data, generate the xml etc
  and eventually pass back html. Let's say that the retrieval of data
  takes about 5 mins.
  If 100 users put in a request at the same time, the server blocks to
  service to first user, how does it service the other users without
  forking or passing them on to other daemons ot threads?
  (I have never used threads and have little idea about them)
 
 So rather than answer this, I'll throw the question back to you - how  
 do you currently cope with a system that expects 100 concurrent users  
 requesting pages that take 5 minutes to generate?

The only similar thing I have is a daemon that sits and blocks on a 
pipe waiting for requests from a process that monitors directories.
So I don't lose requests (assuming I could, not sure if it's possible)
as soon as I get a request I fork and let the child handle the request 
without waiting for it and the parent goes back to listening on the 
pipe.
When there are a lot of requests it slows the system down 
somewhat :) I wrote it about 3 years ago when learnin perl so I am 
more than happy to explore better methods than perlIO teaches.

I presume the way to go would be to have the Danga stuff handle the
request in a listener and have it pass on the request to 1 of N other 
daemons, like apache does now. Probably.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-08 Thread john1
On 8 Aug 2006 at 9:53, Also Sprach Matt Sergeant:

 I'm not quite sure what you're looking for here.

Personally my use of axkit is for webapps, pure perl using sawa.
No taglibs at all. (what drugs induced taglibs?!!)
I think the only benefit of apache/mod_perl would be performance
and all the mod_* stuff, ssl etc. Having said that I would imagine that 
the axkit2 httpd isn't a replacement for apache, just a replacement 
for apache that axkit uses.

John
--

''I don't have any solution but I certainly admire the problem.''
-- Ashleigh Brilliant



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-08 Thread john1
On 8 Aug 2006 at 9:45, Also Sprach Matt Sergeant:

 But also after spending 7 years working with mod_perl I think I've  
 decided I don't like it all that much :-)

Why not?
 
 Did I state that? I think I've stated in other places that this httpd  
 will be good enough for many places to deploy on. In fact in many  
 ways it's more scalable than Apache (uses epoll/kqueue for  
 asynchronous I/O).

What perl libs?
IO::Epoll
Sys::SysCall
Event::Lib
IO::KQueue 
or
Event ?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxKit2 - a status update

2006-08-08 Thread john1
On 8 Aug 2006 at 11:16, Also Sprach Matt Sergeant: 

 On 8-Aug-06, at 10:40 AM, [EMAIL PROTECTED] wrote: 
  
  What perl libs? 
  
 Danga::Socket (used by perlbal and qpsmtpd), 

Why not perlbal? I presume it doesn't do things that you want axkit2  
to do, but what? 

 which uses IO::KQueue   
 for kqueue, and Sys::Syscall for epoll. 

At the risk of being OT... 

Is Danga::Socket  faster than opening a fifo pipe for reading and  
immediately  forking when something is read, given that the  
processing is fairly long winded after the read? 

John 


--

Disclaimer: ''These opinions are my own, though for a small fee they 
be
yours too.''
-- Dave Haynie



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Simplifying AxStyleName

2005-12-28 Thread john1
Lo,

I'm using Axkit with SAWA. Below is an extract from my httpd.conf.
What I'd like to do is to generate the AxAddProcessor chain in my perl code.
This would remove a large number of AxStyleName entries. Is this possible?
If so could someone point me in the right direction please?

AxStyleName show_1
AxAddProcessor text/xsl /tmvtest/styles/menu.xsl
AxAddProcessor text/xsl /tmvtest/styles/show_1.xsl
AxAddProcessor text/xsl /tmvtest/styles/common.xsl
/AxStyleName
AxStyleName show_2
AxAddProcessor text/xsl /tmvtest/styles/menu.xsl
AxAddProcessor text/xsl /tmvtest/styles/show_2.xsl
AxAddProcessor text/xsl /tmvtest/styles/common.xsl
/AxStyleName
AxStyleName show_3
AxAddProcessor text/xsl /tmvtest/styles/menu.xsl
AxAddProcessor text/xsl /tmvtest/styles/show_3.xsl
AxAddProcessor text/xsl /tmvtest/styles/common.xsl
/AxStyleName

John
--

Don't knock President Fillmore.  He kept us out of Vietnam.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Slow response time

2005-10-21 Thread john1
Lo all,

I have a page that is generated from data in a db. The users are 
complaining that it takes from 30s to 60s to load the page.
Now I have put logging into apache and from the start of the request 
to the end (of my code) takes about 14s. Which means the 
bottleneck is either in AxKit or a net one. How can I log the start and 
finish time of the AxKit pipeline? I have come up with turning the 
trace on and looking at the timestamps on the intermediate files, but 
that isn't ideal. I'd rather it went to the apache log. There is only the 
one transform the xml goes through. 

Any ideas?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



that redirect thing

2005-10-11 Thread john1
for the archives...

the SAWA object has a redirect method.

John
--

$100 invested at 7% interest for 100 years will become $100,000, at
which time it will be worth absolutely nothing.
-- Lazarus Long, ''Time Enough for Love''



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirecting

2005-10-10 Thread john1
AxKit + SAWA.

Lo all,

Apologies for the vague subject but I'm not sure how to phrase it. 
Here's what I want to happen, hopefully someone can give me a 
clue...

I have a page with a url of http://some_document. On this page is a 
link http://processed_document. When the user selects the link I go 
to a db and do some processing and return the same page, at most 
one field may have changed. This is all well and good. However, if 
the user selects an other link and then presses the browsers back 
button they get http://process_document which does the db 
processing again, which is not what I want.

In short I want a user on http://some_document to select a link 
somewhere else and for that link to come up in the browser as 
http://some_document. 
Is this doable via Axkit, SAWA or should I be looking at Apache?
I have access to the Apache::Request object if that helps...

Thx

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: xpathscript basics... and the exit signal Segmentation fault (11)

2005-05-05 Thread john1
On 5 May 2005 at 10:05, Also Sprach [EMAIL PROTECTED]:

 I want to use xpathscript to develop some taglibs to hide some of the 
 messy xsp stuff I have been doing.

This seems to be turning into a mess for you.
Why not just write perl modules to generate xml?
Have a look at SAWA, it is _very_ good.

 child pid 89672 exit signal Segmentation fault (11)
 
 Any ideas about this one? I read somewhere something about expat...??

You need to compile apache with this:

CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
CFLAGS_SHLIB=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
EAPI_MM=/usr/local/src/mm-1.3.0 \
./configure --with-layout=Slackware \
--enable-module=most \
--disable-module=auth_dbm \
--enable-module=auth_db \
--enable-shared=auth_db \
--enable-shared=max \
--enable-shared=ssl \
--disable-rule=EXPAT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Installation on RHEL3

2005-05-04 Thread john1
On 4 May 2005 at 8:16, Also Sprach Kjetil Kjernsmo:

 On tirsdag 03 mai 2005, 13:53, Martin Oldfield wrote:
  I've got to install AxKit on an RHEL3 box. 

  Are there, by chance, a set of .rpms around ? 
 
 The problem is really that RHEL3 ships with Apache2 only. We're not 

I too had the joy of installing RH.
You may care to have a look at the perl RH comes with. I had to 
compile it as it had threads enabled.

John
--

Going to church does not make a person religious, nor does going to
school make a person educated, any more than going to a garage 
makes a
person a car.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ESQL and secure connections

2005-05-03 Thread john1
Tom,

 When useing ESQL (via AxKit::XSP::ESQL) to connect to a 
MySQL datadase, I 
 have the connection details hard coded into the xsp page (username, 
 password etc.) This seems unsecure. I don't like the thought of having my 
 MySQL username and password hardcoded into the page. Is there some way I 
 can store these details elsewhere (preferably encryped) and reference then 
 from the xsp somehow?

I wouldn't have thought so. Any keys etc held in the xsp are just as 
open as the password would be.
What I would do is nail the permissions of the mysql user down to 
the bare minimum and only allow access to the db from the 
localhost.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TEST and LIVE servers

2005-05-03 Thread john1
Lo all,

I currently have an application (AxKit + SAWA) setup as test. 
However I now need to move it to a live environment. I can change 
the urls and the db it points at but where I come unstuck is with my 
perl modules. Ideally I want to be able to copy files from the test area 
to live without editing the package details. I _think_ it might involve 
changing INC or somesuch. I was hoping that there might be a httpd 
conf option either for AxKit or SAWA. Would use lib do the job.
Any pointers/clue much appreciated...

John

--

Why did the Roman Empire collapse?  What is the Latin for office
automation?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TEST and LIVE servers

2005-05-03 Thread john1
Tom,

 That's a mod-perl question ;-).

Heh, well I realise that now I know the answer :)
 
 You can set the PERL5LIB in your httpd.conf. See the mod_perl1-docs for
 more information.
 
 You can also use a startup.pl:

Thanks for that.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ESQL and secure connections

2005-05-03 Thread john1
On 3 May 2005 at 9:21, Also Sprach Michael Nachbaur:

 On May 3, 2005, at 3:48 AM, [EMAIL PROTECTED] wrote:

  can store these details elsewhere (preferably encryped) and reference 
  then
  from the xsp somehow?
 
 I'm not sure how MySQL functions, but I know with PostgreSQL it can 
 read in its connection details from environment variables.  So I have 
 entries in my Apache configuration (which is readable only by root) 
 that look like the following:

I have
PerlAddVar DBIconfig blahblah

and reference them from within perl. I've never used xsp so can't 
comment on it.
Are environment vars considered safe?
My httpd.conf isn't root only readable. I always meant to test that, but 
stuff got in the way...

John
--
First B2B Limited
Tapton Park Innovation Centre
Brimington Road, Tapton
Chesterfield S41 0TZ
Telephone: +44 (0)1246 224994 Fax: +44 (0)1246 550296


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SAWA

2005-03-09 Thread john1
On 8 Mar 2005 at 9:59, Also Sprach Michael Nachbaur:

 Kip Hampton.  He's doing some seriously wicked voodoo with SAWA at the 
 moment that makes my head spin...

Oooh.

Examples please.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



slightly OT...

2005-02-22 Thread john1
Lo all,

This is slightly OT, perhaps. Anyway, in one of my apps I have
three xslt docs. One does a bar along the top and the menu down 
the side, another does the main content in the middle of the screen
and the final one renders it all as html.

I have been asked to find a tool that allows painting of the main 
content part and for this to generate the xslt.

Is there such a thing?

How do you all do it?

The software preferably should be open source and linux.

Personally I create the screen using an html editor then edit the xslt 
by hand...

Thx 

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SAWA

2005-02-14 Thread john1
Michael,

That is a _very_ slick looking site. Excellent.
How long did it take from start to current state?
ie design, graphics, coding.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unicode libxml strangeness

2005-02-14 Thread john1
Vaclav,

 On Wednesday 09 February 2005 16:05, [EMAIL PROTECTED] 
wrote:
  When the code below is run the xml is not well formed.
  To be more precise, the output via toString isn't well formed, the
  output via toFile _is_ well formed.
  What seems to happening is that toString is decoding the utf string
  \x{C3}\x{84} for some reason. toFile does not do this.
 IMHO STDOUT does it - when I change the binmode parameter to :utf8, I get 
 the same data on standard output as in the file (perl 5.8.0, libxml 2.6.16 on 
 Linux).

Yes, as it should, however, the output isn't set to :utf8 it's set to :raw. 
I don't set it to :utf8 since not all output is going to be utf8.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



unicode libxml strangeness

2005-02-09 Thread john1
Lo all,

I was having some trouble with my axkit app and have tracked it 
down to this.
I've googled for a solution/explanation and got about 4 pages ie 
nowhere.
When the code below is run the xml is not well formed.
To be more precise, the output via toString isn't well formed, the 
output via toFile _is_ well formed.
What seems to happening is that toString is decoding the utf string 
\x{C3}\x{84} for some reason. toFile does not do this.
This is either a bug, a feature or, as is more likely, my lack of 
understanding.
If someone could be so kind as to point me in the right direction it
would be appreciated.

John



#!/usr/bin/perl -w

use strict;
use diagnostics;
use XML::LibXML;
use Encode qw (encode encode_utf8 decode_utf8 is_utf8 from_to 
_utf8_on);

binmode(STDOUT,:raw);

my $data = *\x{C3}\x{84}*;

my $dom = XML::LibXML::Document-createDocument('1.0', 'utf-8');

my $node = $dom-createElement('MSG');

my $text = $dom-createTextNode( $data );
$node-addChild($text);

print is_utf8($data);

$dom-setDocumentElement( $node );

my $aa = $dom-toString(0);

print $aa,\n;

$dom-toFile('aa',0);


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unicode libxml strangeness

2005-02-09 Thread john1
Michael,

 I'm sorry to say that while I can't provide you with a solution, I can
 at least verify that something is going wrong with the unicode strings.

Good, at least it isn't me then.

   However, in my tests (Mac OS 10.3.7 and libxml 2.2.6 with XML::LibXML
 1.58) I am getting well-formed XML in both output.

I will try 2.2.6 and see what happens.

Using your example,
 I have verified that while toFile properly displays:

 ?xml version=1.0 encoding=utf-8?
 MSG*Ä*/MSG

A hexdump should show two bytes between the asterisks, C3 and
84.

 when I changed your code to print the result of toString to a file, I
 got

 ?xml version=1.0 encoding=utf-8?
 MSG*?*/MSG

toString decodes the utf8 to hex C4.

 What versions of Perl and XML::LibXML/libxml2 are you running?  (Note:
 I'm very much a noob when it comes to unicode)

libxml 2.5.11
XML::LibXML 1.57

I have just upgraded to libxml 2.6.17 and XML::LibXML 1.58.
It still breaks.
It isn't a major problem, I will either have to use toFH with
*STDOUT or write my own toString. As it happens I will have
to do the latter anyway because of legacy code that sort of
reads xml :)
I am curious as to what causes it tho, I do so hate loose ends.

Thx for your time.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unicode libxml strangeness

2005-02-09 Thread john1
Michael,

 I'm sorry to say that while I can't provide you with a solution, I can
 at least verify that something is going wrong with the unicode strings.

Good, at least it isn't me then.

   However, in my tests (Mac OS 10.3.7 and libxml 2.2.6 with XML::LibXML
 1.58) I am getting well-formed XML in both output.

I will try 2.2.6 and see what happens.

Using your example,
 I have verified that while toFile properly displays:

 ?xml version=1.0 encoding=utf-8?
 MSG*Ä*/MSG

A hexdump should show two bytes between the asterisks, C3 and
84.

 when I changed your code to print the result of toString to a file, I
 got

 ?xml version=1.0 encoding=utf-8?
 MSG*?*/MSG

toString decodes the utf8 to hex C4.

 What versions of Perl and XML::LibXML/libxml2 are you running?  (Note:
 I'm very much a noob when it comes to unicode)

libxml 2.5.11
XML::LibXML 1.57

I have just upgraded to libxml 2.6.17 and XML::LibXML 1.58.
It still breaks.
It isn't a major problem, I will either have to use toFH with
*STDOUT or write my own toString. As it happens I will have
to do the latter anyway because of legacy code that sort of
reads xml :)
I am curious as to what causes it tho, I do so hate loose ends.

Thx for your time.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: SAWA

2004-11-12 Thread john1
Could any SAWA ppl please contact me back channel?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SAWA + AxKit (was: Content provider or cgi)

2004-09-28 Thread john1
On 27 Sep 2004 at 23:44, Also Sprach Kip Hampton:

 [EMAIL PROTECTED] wrote:

  Ah, I had a look at that, once I'd found it, (it's not on CPAN), and it made
  my eyes bleed :)
  Tho as you recommend it I'll look into it some more.
 
 I'm curious, what about it made your eyes bleed? I realize that the docs 
 on the sourceforge site are, um, less than helpful and clear and I'm in 
 the process of doing new ones. Is that what turned you away?

My current problem is not knowing what I want. My other problem is that I have to 
provide an app in about a week :)
I haven't turned away as such. In fact I'll be using it.

 Two things have kept me from putting SAWA on CPAN and/or generally 
 beating the drum about it at every available opportunity: 1) the lack of 
 good, complete  docs and 2) the risk of adding to the confusion for Perl 
 n00bs with Yet Another Webapp Framework.

I am a sort of perl n00b, only just over a year. I am deffo a web app n00b though.
I don't have the time to try each module for a week to see if it does what I want
it to, so I investigate via the web etc and ask on here. I wouldn't have heard of 
sawa if it wasn't for your book. But your recomendation is more than good enough 
for me.

 I could really go on and on here, but that's enough of a sales pitch, 

It worked :)

 Anyway, thanks for buying The Book :-) and I meant what I said about 
 helping you get up to speed it you find that SAWA is something that 
 you're interested in for generating dynamic content under AxKit.

Well, I currently have a problem with the example in the book. The code I 
downloaded is different to that in the book... And it doesn't work.
However, I _will_ get it working. Time to RTFM.
I will no doubt take you up on your offer, thanks for that, but I'll do you the 
courtesy of understanding as much as poss on my own first.
In fact, when I get the moviename stuff working, I'll add on another screen, 
comment it fully and let you have it all back for the site.

Thanks for your time.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Content providers...

2004-09-28 Thread john1
On 27 Sep 2004 at 22:21, Also Sprach David Nolan:

 --On Monday, September 27, 2004 9:13 AM +0100 [EMAIL PROTECTED] wrote:
 
  My current app has, say, 10 screens.
 
snip

  I've left out a *lot* of details here, including most of the error 
 detection and evil-user protection.  If you're interested in a full example 
 I can provide you a pointer to my code.

Yes please.

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxNoCache...

2004-06-15 Thread john1
On 14 Jun 2004 at 11:38, Also Sprach David Nolan:

 
 
 --On Monday, June 14, 2004 3:27 PM +0100 [EMAIL PROTECTED] wrote:
 
  Should AxNoCache be on or off for a production server?

 Is your content very dynamic?  If so, it may be less useful.  If you never 
 serve the exact same content twice, caching the content is actually a waste 
 of time.

It is totally dynamic.

 If you're primarily doing a web-application (which is what I do with 
 AxKit), you probably want caching off, because you may want the data source 
 to be queried again, as there may be side effects generated by the act of 
 viewing fetching a particular URL.

Ah ok.
AxNoCache yes it is then...
Thx.

 the first query by re-writing your XSLT/XSP.  For example, if your XML is 
 large and you're doing a lot of searching through it in your XSLT, using 
 xslt:key may vastly improve your performance.

Oh, never heard of it.
I'll have a look into it tho.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AxNoCache...

2004-06-15 Thread john1
On 15 Jun 2004 at 6:35, Also Sprach David Nolan:

 
 
 --On Tuesday, June 15, 2004 7:09 AM +0100 [EMAIL PROTECTED] wrote:

 Basically xsl:key (I mis-remembered the prefix before...) pre-creates an 
 index on the table, 

 Proper application of xsl:key can be very useful.  One of our (non-AxKit) 
 translations is taking flat database dumps with approximately 10,000 nodes 
 and converting them to a structured format, based on the structure of our 
 database, with approximately 145,000 nodes.  Using xsltproc (which is 
 slower than Saxon, but more widely available) that translation takes 30-40 
 seconds.  Without keys it was taking over 10 minutes.

Hmmm. Well I have approx 800 tags and each tag has at least 30 
attributes, so I'll see what happens.

Thanks for your time.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Strange IE/html problem SOLVED

2004-06-14 Thread john1
Lo all,

Thanks to all.
I finally cracked it.
My perlscripts were returning each line of xml with a LF.
This added up to a lot of LF before the html started. I removed these 
(put in to pretty up the xml for my debug) and hey presto, IE stopped 
choking.

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AxNoCache...

2004-06-14 Thread john1
Lo all,

Should AxNoCache be on or off for a production server?
While I'm at it, what other settings make for a fast production server?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Strange IE/html problem

2004-06-10 Thread john1
Lo all,

I'm generating xml via a script and putting it through axkit to 
generate html. It works fine.
The html is just a table with a number of fields per row and a check 
box at the end of the row (nunno if this is relevant).
Anyhow, here's the thing, when I have more than 205 rows, IE 
doesn't render, it just shows html.
If there are 205 or less, it renders perfectly.
Mozilla and firefox do not have this problem.

Does anyone have any idea where I might start looking?

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redefined subroutine errors in apache log

2004-05-07 Thread john1
Lo all,

I've got a load of 
Subroutine Apache::send_http_header redefined at 
blahblah Apache/RegistryFilter.pm line 49
send cgi_header also gives this.
I've googled and only found a solution for the axkit 1.62
warning in the log that needed commenting out.

The system is set up such that perl scripts get data from mysql and 
generate xml. There are no xsp tags. Every script has use warnings, 
diagnostics and strict.
How to stop the error log from getting flooded?
There does seem to be a bit of a clue in the log where it says:
to suppress this warning say
{
no warnings 'redefine';
eval sub name { ... };
}

but I am usure of the implications.
Is this a known problem? If so, how to get round it?

Thx

john


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Web app 101

2004-03-16 Thread john1
I have a form.
The user enters data, presses the button.
This gets passed to a url
localhost/script.pl?a=1b=2
etc.
script.pl now has a choice, depending on the vars a and b.
If it decides to send a list of products, how do I make the url in the 
browser change from
localhost/script.pl?a=1b=2
Or is this, by and large, a pointless thing to try and I should just 
make my script names non descript, so to speak?

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Web app 101

2004-03-16 Thread john1
On 16 Mar 2004 at 13:22, Also Sprach fess:

 
 I'm not sure I understand your question,
 if you're trying to change the location in the url bar of the browser,
 you have to redirect the browser to another location.

That's the one.

 There's a lot of different ways to get a redirection out, depending on 
 what type of environment you're in,
 
 in a CGI context your script just needs to return:
 
Location: http://new/location/product_list.html

Good. My problem was that I wanted the cgi as xml source and page 
logic. Now I have a cgi that can make the browser go to another
script that is the xml source.
It also solves all my problems with wanting to use httpd.conf
as the style setter.

 hope that's of help.  but somehow I think I misinterpreted your 
 question.

That is fantastic, _exactly_ what I wanted.
Thank you very much for your time.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >