cookie info during perltranshandler

2004-07-26 Thread john z
is it possible to access cookie and other request state info during 
perltranshandler phase. also, how do i find what methods and objects are 
available for transhandler. i tried to use lookupmethod and did not come up 
with a list. (i did search faq and docs but did not spot much)

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Re: Method Handler not working

2004-07-26 Thread MARTIN MOSS
--- Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Fri,
2004-07-23 at 18:12, MARTIN MOSS wrote:
> > My question is, If you don't have a PerlModule
> > statement or a use My::Module, or a require or a
> > +My::Module statement  so it looks like this
> > 
> > #PerlModule My:Module
> > 
> > set-handler PerlScript
> > PerlHandler My::Module 
> > 
> > 
> > But the module My::Module is on the Include path
> for
> > apache (hmm or is that the apache user), What
> exactly
> > happens?
> 
> mod_perl tries to load it at request time.  There
> are two reasons why
> this is bad.  The first is that it doesn't allow for
> copy-on-write
> shared memory.  You want to load it before the fork,
> and this doesn't do
> that.  The second is that it doesn't know about the
> method prototyping
> and thus your handler is not called as a method.
> 
> So, load the module first.  You can do it in any
> number of ways
> (startup.pl is common).  I think this will fix your
> problem.
> 
> - Perrin

I have a little note to add, It seems that under
freeBSD the above bad method does seem to work ok (or
at least gives that illusion),  But on Redhat, it
doesn't. Anybody have any ideas why this is?

Marty







___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://www.allnewmessenger.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



200 OK error with Text::Template

2004-07-26 Thread Garrison Hoffman
I'm attempting to use Text::Template w/ mp2.  The following code
generates no error in the log, produces the expected output but also
tacks on the 200 OK The server encountered an internal error...

Is this an issue with Text::Template or am I doing something wrong?

package Codefix::ttdemo;
use strict;
use warnings;
use Text::Template;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile => qw(OK);

sub handler {
   my $r = shift;
   my $filename = '/var/www/test';
   my $template = Text::Template->new(DELIMITERS => [''], SOURCE
=> "$filename") or die "Couldn't construct template:
$Text::Template::ERROR";
   my %vars = (filename => "$filename");
   $r->content_type('text/html');
   my $result = $template->fill_in(HASH => \%vars);
   if (defined $result) { print "$result\n"; }
   else { die "Couldn't fill in template: $Text::Template::ERROR" }
}

1;

-- 
-
 Garrison Hoffman, Technology Consultant
 (718) 210-3445   http://codefix.net
-


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: 200 OK error with Text::Template

2004-07-26 Thread Garrison Hoffman
On Mon, 2004-07-26 at 13:25, Randy Kobes wrote:

> Does it help to have
>return Apache::OK;
> as the last line in the handler? (you might also want to
> return Apache::SERVER_ERROR, and log the
> $Text::Template::ERROR, if that case arose).

It does indeed.  Can someone explain what's happening here (my other
scripts don't require return Apache::OK;) or point me to some
documentation I should have read?

Thanks for your help.

-gh
-- 
-
 Garrison Hoffman, Technology Consultant
 (718) 210-3445   http://codefix.net
-


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: 200 OK error with Text::Template

2004-07-26 Thread Randy Kobes
On Mon, 26 Jul 2004, Garrison Hoffman wrote:

> I'm attempting to use Text::Template w/ mp2.  The following code
> generates no error in the log, produces the expected output but also
> tacks on the 200 OK The server encountered an internal error...
>
> Is this an issue with Text::Template or am I doing something wrong?
>
> package Codefix::ttdemo;
> use strict;
> use warnings;
> use Text::Template;
> use Apache::RequestRec ();
> use Apache::RequestIO ();
> use Apache::Const -compile => qw(OK);
>
> sub handler {
>my $r = shift;
>my $filename = '/var/www/test';
>my $template = Text::Template->new(DELIMITERS => [''], SOURCE
> => "$filename") or die "Couldn't construct template:
> $Text::Template::ERROR";
>my %vars = (filename => "$filename");
>$r->content_type('text/html');
>my $result = $template->fill_in(HASH => \%vars);
>if (defined $result) { print "$result\n"; }
>else { die "Couldn't fill in template: $Text::Template::ERROR" }
> }
>
> 1;

Does it help to have
   return Apache::OK;
as the last line in the handler? (you might also want to
return Apache::SERVER_ERROR, and log the
$Text::Template::ERROR, if that case arose).

-- 
best regards,
randy

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: 200 OK error with Text::Template

2004-07-26 Thread Stas Bekman
Garrison Hoffman wrote:
On Mon, 2004-07-26 at 13:25, Randy Kobes wrote:

Does it help to have
  return Apache::OK;
as the last line in the handler? (you might also want to
return Apache::SERVER_ERROR, and log the
$Text::Template::ERROR, if that case arose).

It does indeed.  Can someone explain what's happening here (my other
scripts don't require return Apache::OK;) or point me to some
documentation I should have read?
Thanks for your help.
All handlers require a return status. You can read more about this here:
http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_
http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values
In Perl if you don't have an explicit return() call in a subroutine, the 
result of the last expression is used as a return value. so your other 
subs had happened to work if they were returning an Apache::OK (whose 
int value is 0).

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


[ANNOUNCE] Gestinanna 0.02

2004-07-26 Thread James G Smith
I am happy to announce the next release of the Gestinanna application
framework.

This release consists of the following packages on CPAN:

  Apache::Gestinanna 0.03
  Gestinanna 0.02
  Gestinanna::POF 0.07
  Gestinanna::POF::Repository 0.04

Gestinanna provides an XML-based language for creating web
applications in the Model-View-Controller pattern.  It uses Template
Toolkit to provide views, eXtensible State Machines (XSM) to provide
controllers, and Perl modules to provide the models via extensions to
XSM (taglibs).

The distribution comes with support for Template Toolkit, XSM,
documents, portal-like pages, XSLT, and workflows.  For an example of
a set of applications and a workflow definition, see the listserv
list request application package that comes with the Gestinanna
distribution. (Listserv is a registered trademark of its owner.)

This framework is considered ALPHA software.  It will have bugs.  It
probably won't pass all its tests.  Please let me know what problems
you run into.  I can help you work around them or even fix them in
the next release.

A list of changes since 0.01 follows:

 o Basic workflow support.  See the listserv package for an example.

 o Added a package system.  Shell support is not complete, but
   sufficient for installing a package.

 o Moved sample pages into packages installable via the package system.

 o Added site configuration single inheritance.

 o Extensive unit tests in the low-level modules.  Not yet complete.

 o Split state machine XML schema into two namespaces: state machine
   and scripting.

 o shell tool may be configured not to use a pager.

 o Added `site clone' command to the shell.  Both cloning and creating
   a site will now create a site configuration as well.

 o Added `site config' command to the shell to edit an existing site's
   configuration.  The resulting configuration must be parsable by
   XML::LibXML.

 o The `site uri add' command now takes an argument to indicate the
   object type the URI refers to.

 o Gestinanna::Request::get_url added to resolve an object to a url
   (for use by Apache::AxKit::Provider::Gestinanna).

 o Alzabo naming routine updated for Alzabo 0.82.

 o Namespace handlers for XSM scripts are now configurable on a per-
   site basis.

 o Namespaces can be specified for namespace handlers, overriding the
   default.  This is useful for using different handlers that offer
   the same interface but work with different backends.

 o Configuration information specific to a content handler type is now
   enclosed in a  tag.
--
James Smith <[EMAIL PROTECTED]>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: 200 OK error with Text::Template

2004-07-26 Thread Garrison Hoffman
On Mon, 2004-07-26 at 14:52, Stas Bekman wrote:

> All handlers require a return status. You can read more about this here:
> http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_
> http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values
> 
> In Perl if you don't have an explicit return() call in a subroutine, the 
> result of the last expression is used as a return value. so your other 
> subs had happened to work if they were returning an Apache::OK (whose 
> int value is 0).

That makes complete sense (Thank You), but I'm still a bit unclear as to
why another mp2 script, ending in a print statement, does not exhibit
this- although I suppose I should just put in a proper return value and
move on.

Thanks again to all who replied.

-- 
-
 Garrison Hoffman, Technology Consultant
 (718) 210-3445   http://codefix.net
-


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: 200 OK error with Text::Template

2004-07-26 Thread Stas Bekman
Garrison Hoffman wrote:
On Mon, 2004-07-26 at 14:52, Stas Bekman wrote:

All handlers require a return status. You can read more about this here:
http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_
http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values
In Perl if you don't have an explicit return() call in a subroutine, the 
result of the last expression is used as a return value. so your other 
subs had happened to work if they were returning an Apache::OK (whose 
int value is 0).

That makes complete sense (Thank You), but I'm still a bit unclear as to
why another mp2 script, ending in a print statement, does not exhibit
this- 
Because your print call has returned a sensible value, which happened to 
be something that Apache was happy with. Check what was this value

  before:
 print "fpp";
  }
  after:
 my $ret = print "fpp";
 warn "print returned $ret\n";
 return Apache::OK;
  }
although I suppose I should just put in a proper return value and
move on.
well, it's important to understand why that worked too.
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cookie info during perltranshandler

2004-07-26 Thread Stas Bekman
john z wrote:
is it possible to access cookie and other request state info during 
perltranshandler phase. also, how do i find what methods and objects are 
available for transhandler. i tried to use lookupmethod and did not come 
up with a list. (i did search faq and docs but did not spot much)
I suppose you are talking about mod_perl 2.0. The answer is yes for 
cookies, since Cookie is an HTTP header, which is available started from
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlPostReadRequestHandler

What methods are you after?
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


mod perl installation problem

2004-07-26 Thread geoff rainey
Hello,

I am having trouble with an installation of mod_perl.

Perl version is 5.8.0
Apache 1.3.31
mod_perl 1.28

Error is when I am running make test, the following occurs -
===
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...not ok
server failed to start! (please examine t/logs/error_log) at t/TEST line
95.
make: *** [run_tests] Error 255

===
The following is in the error log:

[Tue Jul 27 10:39:42 2004] [error] [client 127.0.0.1] (13)Permission
denied: access to /test.html failed because search permissions are
missing on a component of the path
===

Regards,
Geoff Rainey.



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



JOB: Experienced MODPERL developer for Chicago

2004-07-26 Thread Evan Hecht
Large Financial Firm looking for Strong Perl Programmers and will pay
top dollar.  Must have experience with Oracle or Sybase (preferred).  
Financial experience a plus...  Relocation packages for out of
towners...

Requirements:
1. HEAVY RECENT WORK EXPERIENCE WITH PERL SCRIPTING 
-Must have written custom PERL from scratch
-Must explain the use of PERL in your resume (type of app, used with
what, its purpose, volume, etc)
-Please be specific and thorough in description of PERL use
2. WORK EXPERIENCE WITH RELATIONAL DATABASES
- SYBASE (pref) or Oracle
3. Financial experience a big plus

Will pay top dollar for top notch skills...

Qualified candidates,please send resumes to [EMAIL PROTECTED]

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: mod perl installation problem

2004-07-26 Thread Stas Bekman
geoff rainey wrote:
Hello,
I am having trouble with an installation of mod_perl.
Perl version is 5.8.0
Apache 1.3.31
mod_perl 1.28
Error is when I am running make test, the following occurs -
===
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...not ok
server failed to start! (please examine t/logs/error_log) at t/TEST line
95.
make: *** [run_tests] Error 255
===
The following is in the error log:
[Tue Jul 27 10:39:42 2004] [error] [client 127.0.0.1] (13)Permission
denied: access to /test.html failed because search permissions are
missing on a component of the path
===
Probably move the whole thing into a different location, like /tmp and 
try again. It's not an installation problem, but the 'make test' one - 
you probably try to run it off /root, which won't work since Apache runs 
as a different user (e.g. nobody).

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod perl installation problem

2004-07-26 Thread geoff rainey
Excellent, you were correct. I have tried various different compilation
configurations to no avail over the last day or so, and am worn out over
it. Of course, it was something very trivial!

Kind regards,
Geoff.


On Tue, 2004-07-27 at 17:57, Stas Bekman wrote:
> geoff rainey wrote:
> > Hello,
> > 
> > I am having trouble with an installation of mod_perl.
> > 
> > Perl version is 5.8.0
> > Apache 1.3.31
> > mod_perl 1.28
> > 
> > Error is when I am running make test, the following occurs -
> > ===
> > httpd listening on port 8529
> > will write error_log to: t/logs/error_log
> > letting apache warm up...\c
> > done
> > /usr/bin/perl t/TEST 0
> > still waiting for server to warm up...not ok
> > server failed to start! (please examine t/logs/error_log) at t/TEST line
> > 95.
> > make: *** [run_tests] Error 255
> > 
> > ===
> > The following is in the error log:
> > 
> > [Tue Jul 27 10:39:42 2004] [error] [client 127.0.0.1] (13)Permission
> > denied: access to /test.html failed because search permissions are
> > missing on a component of the path
> > ===
> 
> Probably move the whole thing into a different location, like /tmp and 
> try again. It's not an installation problem, but the 'make test' one - 
> you probably try to run it off /root, which won't work since Apache runs 
> as a different user (e.g. nobody).
-- 
Geoff Rainey,
UNIX systems consultant,
Datacom Systems LTD
DDI 308 4345
Mob 0274 856 892


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html