Re: mod_perl developers cookbook... a kitchen hand asks... doh!

2002-03-24 Thread Per Einar Ellefsen

At 01:23 25.03.2002, Issac Goldstand wrote:

>>You must have taken this subroutine out of context. There are a certain 
>>number of things which must appear for an Apache handler to work:
>>
>>package Apache::Whatever;
>>
>>You need to have that line to uniquely identify your module. If you use 
>>the name Apache::Whatever, your handler must be named Whatever.pm and be 
>>placed in your @INC search path under Apache/
>>This is probably the reason for your number 2 problem: you must have used 
>>the same package name twice. Or not used a package name at all.
>
>
>Actually, this isn't true.. You don't *have* to use the Apache 
>namespace...  You can just as easily call it Foo::Bar if you'd like... I 
>don't mean to come across as being an extremist on this issue, but we were 
>all newbies once, and I know that as a newbie, *I* would take anything 
>written here as the "authorative" answer, so I didn't want anyone here to 
>be misled...

Yes, sorry, I didn't want to make it appear like you had to use the 
Apache:: namespace. In the Cookbook for example they use the Cookbook:: 
namespace, and you could just as well use Jeff::.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]




Re: Apache::DBI or What ?

2002-03-24 Thread Andrew Ho

Hello,

CH>What would be ideal is if the database would allow you to change the
CH>user on the current connection.  I know PostgreSQL will allow this using
CH>the command line interface psql tool (just do \connect 
CH>), but I'm not sure if you can do this using DBI.
CH>
CH>Does anyone know if any datbases support this sort of thing?

This occurred to me in the case of Oracle (one of my co-workers was facing
a very similar problem in the preliminary stages of one of his designs),
and I actually had asked our DBAs about this (since the Oracle SQL*Plus
also allows you to change users). As I suspected (from the similar
"connect" terminology), our DBAs confirmed that Oracle just does a
disconnect and reconnect under the hood. I would bet the psql client does
the same thing.

I don't have a PostgreSQL installation handy at the moment, but I seem to
recall it has a statement logger similar to MySQL's... if you have it
handy, you could try the \connect from psql and see if it results in a
disconnect and reconnect.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--




Re: mod_perl training companies?

2002-03-24 Thread Stas Bekman

Steven Lembark wrote:
> 
> 
> http://www.stonehenge.com/
> 
> http://www.stonehenge.com/perltraining/

Steven, They don't give mod_perl courses, at least I couldn't find any.


__
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




Re: mod_perl developers cookbook... a kitchen hand asks... doh!

2002-03-24 Thread Issac Goldstand

>
> You must have taken this subroutine out of context. There are a 
> certain number of things which must appear for an Apache handler to work:
>
> package Apache::Whatever;
>
> You need to have that line to uniquely identify your module. If you 
> use the name Apache::Whatever, your handler must be named Whatever.pm 
> and be placed in your @INC search path under Apache/
> This is probably the reason for your number 2 problem: you must have 
> used the same package name twice. Or not used a package name at all.


Actually, this isn't true.. You don't *have* to use the Apache 
namespace...  You can just as easily call it Foo::Bar if you'd like... 
 I don't mean to come across as being an extremist on this issue, but we 
were all newbies once, and I know that as a newbie, *I* would take 
anything written here as the "authorative" answer, so I didn't want 
anyone here to be misled...

   Issac




Re: Can't open perl script " -spi.bak"

2002-03-24 Thread Issac Goldstand

Garth Winter Webb wrote:

>On Fri, 2002-03-22 at 12:57, Robert Landrum wrote:
>
>>>That's is very weird, because this code doesn't seem to work:
>>>
>>>perl -e 'system("perl", " -e1") == 0 or die "oops"'
>>>
>>Actually, that's not all that weird.  Most shells take care of 
>>stripping out garbage before setting the argument list.  Since 
>>system(LIST) doesn't use the shell, it's passing perl the literal " 
>>-e1" which perl won't recognize as a command line option (and 
>>correctly so in my opinion).
>>
>
>Actually this isn't standard behavior.  I can't think of a situation
>where I would want to use system to concatanate a string for me rather
>than interpreting the string as an argument and act accordingly.  If you
>check 'perldoc -f system', this is exactly what system is supposed to do
>when given a program name and a list of arguments, so it looks like
>'systetm' may be buggy in the win32 version of perl
>
>G
>
I think so too.  I,m no Perl guru, but I know from my personal 
experiance that it works fine under unix and cygwin, but I _always_ have 
had to manually do this under normal Win32 (I know, I know, I never 
submitted a patch...  I guess the reason was because I never [finally] 
compiled mod_perl for Win32 and had enough strength left to diff the 
Makefiles... :-(  )

  Issac





Re: AddModule mod_perl.c

2002-03-24 Thread John Kolvereid

Hi Per,
   I get the msg:
  'The document contained no data'
when I try to load my home.html from my server using
my browser.  When I comment out the AddModule
mod_perl.c
then my home page appears.

   I am including my httpd for any advise:

relevant portions of httpd.conf
---

LoadModule ssl_module libexec/libssl.so
LoadModule php4_modulelibexec/libphp4.so
LoadModule webapp_module  libexec/mod_webapp.so
LoadModule perl_modulelibexec/libperl.so



  Include conf/mod_perl.conf




ClearModuleList
#AddModule mod_perl.c

mod_perl.conf
-
conf/mod_perl.pl
PerlFreshRestart On


  SetHandler  perl-script
  PerlHandler Apache::Hello


Alias /perl/ /home/httpd/perl/
PerlModule Apache::Registry

  SetHandler  perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On
  Options ExecCGI


/home/httpd/perl/hello.pl
-
#!/usr/local/perl

print "Content-type: text/html\n\n";

print <
Mod_perl




Mod-Perl

END

Also, when I try to load the page /odin/perl/hello.pl
(/odin is my server) the page displays as text only,
not as an html page.

Any advice would be greatly appreciated.  Thanks.

John Kolvereid


--- Per Einar Ellefsen <[EMAIL PROTECTED]> wrote:
> At 23:31 24.03.2002, John Kolvereid wrote:
> >Hi Dan,
> >   You are correct when you refer to
> >'this somewhat convoluted load/clear/add'
> >My httpd.conf has
> > LoadModule perl_module  libexec/libperl.so
> > AddModule mod_perl.c
> >When I leave alone and check the error_log, Apache
> AND
> >mod_perl are loaded.  However, I cannot view any
> web
> >pages; instead I get the msg:
> >'The document contained no data'
> >(what document I do not know)
> >
> >When I comment out the AddModule I can view all my
> web
> >pages, but the error_log claims that only Apache is
> 
> What do you mean by 'view all your web pages'? What
> are these web pages: 
> perl programs, or static content?
> 
> >loaded - mod_perl is not.  This may be fine, it may
> be
> >a DSO (I don't know) but I cannot view a .pl file
> as
> >outlined in Apache Modules w/ Perl & C, pp 41-45. 
> It
> >displays text only, as if the Options ExCGI were
> not
> >present.
> >
> >I am trying to pay close attention to the guide
> and
> >all the other literature on the subject. 
> Obviously,
> >it the installation works correctly the first time,
> >then it is understandable,  otherwise, (I think) it
> is
> >very confusing.
> 
> There must be something wrong with your
> configuration: could you please 
> post your httpd.conf here so taht we can see if
> you're doing anything wrong?
> (only post the most relevant parts, so as not to get
> a too large entry, but 
> please post *all* the relevant parts, as there might
> be some small detail 
> making it fail).
> 
> >--- Dan Riley <[EMAIL PROTECTED]> wrote:
> > > Ged Haywood <[EMAIL PROTECTED]>
> writes:
> > > > > According to the mod_perl Reference Guide
> the
> > > line
> > > > >  AddModule mod_perl.c
> > > > > should be added to my httpd.conf, otherwise
> > > mod_perl
> > > > > is not activated.
> > > >
> > > > I think you'd better have a more careful look
> at
> > > that Guide.  You only
> > > > need that in your config if you have mod_perl
> > > built as a DSO (Dynamic
> > > > Shared Object) which means that Apache starts
> > > without trhe mod_perl
> > > > module and then loads it later when it reads
> the
> > > line
> > > >
> > > >   AddModule mod_perl.c
> > > >
> > > > in httpd.conf.
> > >
> > > I think you've confused LoadModule and
> AddModule.
> > > If you follow the
> > > recommended apache configuration, which does all
> the
> > > LoadModules
> > > followed by a ClearModuleList and a bunch of
> > > AddModules, you don't
> > > need the LoadModule for mod_perl (since it is
> built
> > > in), but you do
> > > need the AddModule since *all* the module
> entries
> > > get cleared by the
> > > ClearModuleList.
> > >
> > > I believe the point of this somewhat convoluted
> > > load/clear/add
> > > procedure is for the static modules to end up in
> the
> > > right spots in
> > > the module list relative to all the DSOs, rather
> > > than all bunched up
> > > at one end, since the order does matter (a lot).
> > > --
> > > Dan Riley
> > > [EMAIL PROTECTED]
> > >  "Mr. Ellison is presently the sole member of
> the
> > > Plan Committee.  The
> > >   Plan Committee did not meet during fiscal year
> > > 2001, and during that
> > >same period, acted 46 times by unanimous
> > > written consent."
> >
> >
> >__
> >Do You Yahoo!?
> >Yahoo! Movies - coverage of the 74th Academy
> Awards®
> >http://movies.yahoo.com/
> 
> -- 
> Per Einar Ellefsen
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: AddModule mod_perl.c

2002-03-24 Thread Per Einar Ellefsen

At 23:31 24.03.2002, John Kolvereid wrote:
>Hi Dan,
>   You are correct when you refer to
>'this somewhat convoluted load/clear/add'
>My httpd.conf has
> LoadModule perl_module  libexec/libperl.so
> AddModule mod_perl.c
>When I leave alone and check the error_log, Apache AND
>mod_perl are loaded.  However, I cannot view any web
>pages; instead I get the msg:
>'The document contained no data'
>(what document I do not know)
>
>When I comment out the AddModule I can view all my web
>pages, but the error_log claims that only Apache is

What do you mean by 'view all your web pages'? What are these web pages: 
perl programs, or static content?

>loaded - mod_perl is not.  This may be fine, it may be
>a DSO (I don't know) but I cannot view a .pl file as
>outlined in Apache Modules w/ Perl & C, pp 41-45.  It
>displays text only, as if the Options ExCGI were not
>present.
>
>I am trying to pay close attention to the guide and
>all the other literature on the subject.  Obviously,
>it the installation works correctly the first time,
>then it is understandable,  otherwise, (I think) it is
>very confusing.

There must be something wrong with your configuration: could you please 
post your httpd.conf here so taht we can see if you're doing anything wrong?
(only post the most relevant parts, so as not to get a too large entry, but 
please post *all* the relevant parts, as there might be some small detail 
making it fail).

>--- Dan Riley <[EMAIL PROTECTED]> wrote:
> > Ged Haywood <[EMAIL PROTECTED]> writes:
> > > > According to the mod_perl Reference Guide the
> > line
> > > >  AddModule mod_perl.c
> > > > should be added to my httpd.conf, otherwise
> > mod_perl
> > > > is not activated.
> > >
> > > I think you'd better have a more careful look at
> > that Guide.  You only
> > > need that in your config if you have mod_perl
> > built as a DSO (Dynamic
> > > Shared Object) which means that Apache starts
> > without trhe mod_perl
> > > module and then loads it later when it reads the
> > line
> > >
> > >   AddModule mod_perl.c
> > >
> > > in httpd.conf.
> >
> > I think you've confused LoadModule and AddModule.
> > If you follow the
> > recommended apache configuration, which does all the
> > LoadModules
> > followed by a ClearModuleList and a bunch of
> > AddModules, you don't
> > need the LoadModule for mod_perl (since it is built
> > in), but you do
> > need the AddModule since *all* the module entries
> > get cleared by the
> > ClearModuleList.
> >
> > I believe the point of this somewhat convoluted
> > load/clear/add
> > procedure is for the static modules to end up in the
> > right spots in
> > the module list relative to all the DSOs, rather
> > than all bunched up
> > at one end, since the order does matter (a lot).
> > --
> > Dan Riley
> > [EMAIL PROTECTED]
> >  "Mr. Ellison is presently the sole member of the
> > Plan Committee.  The
> >   Plan Committee did not meet during fiscal year
> > 2001, and during that
> >same period, acted 46 times by unanimous
> > written consent."
>
>
>__
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>http://movies.yahoo.com/

-- 
Per Einar Ellefsen
[EMAIL PROTECTED]




Re: AddModule mod_perl.c

2002-03-24 Thread John Kolvereid

Hi Dan,
  You are correct when you refer to
   'this somewhat convoluted load/clear/add'
My httpd.conf has
LoadModule perl_module  libexec/libperl.so
AddModule mod_perl.c
When I leave alone and check the error_log, Apache AND
mod_perl are loaded.  However, I cannot view any web
pages; instead I get the msg:
   'The document contained no data'
(what document I do not know)

When I comment out the AddModule I can view all my web
pages, but the error_log claims that only Apache is
loaded - mod_perl is not.  This may be fine, it may be
a DSO (I don't know) but I cannot view a .pl file as
outlined in Apache Modules w/ Perl & C, pp 41-45.  It
displays text only, as if the Options ExCGI were not
present.

   I am trying to pay close attention to the guide and
all the other literature on the subject.  Obviously,
it the installation works correctly the first time,
then it is understandable,  otherwise, (I think) it is
very confusing.

   John Kolvereid
 
--- Dan Riley <[EMAIL PROTECTED]> wrote:
> Ged Haywood <[EMAIL PROTECTED]> writes:
> > > According to the mod_perl Reference Guide the
> line
> > >  AddModule mod_perl.c
> > > should be added to my httpd.conf, otherwise
> mod_perl
> > > is not activated.
> > 
> > I think you'd better have a more careful look at
> that Guide.  You only
> > need that in your config if you have mod_perl
> built as a DSO (Dynamic
> > Shared Object) which means that Apache starts
> without trhe mod_perl
> > module and then loads it later when it reads the
> line
> > 
> >   AddModule mod_perl.c
> > 
> > in httpd.conf.
> 
> I think you've confused LoadModule and AddModule. 
> If you follow the
> recommended apache configuration, which does all the
> LoadModules
> followed by a ClearModuleList and a bunch of
> AddModules, you don't
> need the LoadModule for mod_perl (since it is built
> in), but you do
> need the AddModule since *all* the module entries
> get cleared by the
> ClearModuleList.
> 
> I believe the point of this somewhat convoluted
> load/clear/add
> procedure is for the static modules to end up in the
> right spots in
> the module list relative to all the DSOs, rather
> than all bunched up
> at one end, since the order does matter (a lot).
> -- 
> Dan Riley
> [EMAIL PROTECTED]
>  "Mr. Ellison is presently the sole member of the
> Plan Committee.  The
>   Plan Committee did not meet during fiscal year
> 2001, and during that
>same period, acted 46 times by unanimous
> written consent."


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: Apache::DBI or What ?

2002-03-24 Thread Cees Hek

On Fri, 2002-03-22 at 11:42, Andrew Ho wrote:
> Hello,
> 
> EF>I will have many different users, users as in database users. So am I
> EF>just screwed and won't be able to keep connections open?
> 
> Do you mean users as in actual RDBMS level users? In other words, when you
> say database users you mean different username/passwords used from, say,
> a command-line SQL client?
> 
> If your answer is yes then indeed, this is exactly the situation the Guide
> is talking about--you're screwed and probably shouldn't keep connections
> open. You'll have to incur a connect on each HTTP request.

What would be ideal is if the database would allow you to change the
user on the current connection.  I know PostgreSQL will allow this using
the command line interface psql tool (just do \connect 
), but I'm not sure if you can do this using DBI.

If this was possible, then you could always connect to DBI using the
same username/password so Apache::DBI gives you a cached connection, and
then once you have the connection, you can change to the user you want.

Does anyone know if any datbases support this sort of thing?

Cees

> EF>I am using Postgress, I am wondering how big DBs deal with this sort of
> EF>thing. I am also wondering what the actual overhead is in starting the
> EF>connection and if there is anything that I could to to limit that
> EF>without validating a specific user.
> 
> In large DB projects where you expect high levels of concurrency I haven't
> heard of anybody using RDBMS-level users for authentication purposes.
> 
> Humbly,
> 
> Andrew
> 
> --
> Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
> Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
> Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
> --
> 





Re: the Guide

2002-03-24 Thread Perrin Harkins

>  Wouldn't it thus be simpler and more convenient
> for 1st times like myself if the guide download were
> simply the already created html pages which appear
> online.

Frankly, hardly anyone does that.  Most people refer to the guide
on-line.  I've used mod_perl for years, referred to the guide
frequently, and never downloaded it.  If you have to work over a slow
link I can understand why you might want a local copy, but a quick wget
command can mirror it all for you pretty easilly.

People usually only download the CPAN package if they're planning to do
some hacking on it.  Mentioning the module dependency in the text next
to the download link is probably a good idea, and offering a .tgz of all
the generated HTML files as well as the PDF, but I think you may be the
first to request such a thing.

>  It's hard enough to install mod_perl itself.  Why
> add an extra burden for the manual also.

There is plenty of documentation on building and working with mod_perl
included in the standard mod_perl package.  The guide is in addition to
that documentation.

- Perrin




Re: Performace...

2002-03-24 Thread Ed Grimm

On Sun, 24 Mar 2002, Kee Hinckley wrote:
> At 2:27 PM -0500 3/23/02, Geoffrey Young wrote:
>>
>>you might be interested in Joshua Chamas' ongoing benchmark project:
>>
>>[EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/sercrerdprou/[EMAIL PROTECTED]
>>http://www.chamas.com/bench/
>>
>>he has the results from a benchmark of Apache::Registry and plain 
>>handlers, as well as comparisons between HTML::Mason, Embperl, and 
>>other templating engines.
> 
> Although there are lots of qualifiers on those benchmarks, I consider 
> them rather dangerous anyway.  They are "Hello World" benchmarks, in 
> which startup time completely dominates the time. The things that 

That explains why Embperl did so poorly compared to PHP, yet when we
replaced our PHP pages with Embperl, our benchmarks using real user
queries, sending the same queries through the old and new pages, the new
pages showed a 50% performance boost.

Note: that gain was enough to saturate our test network.  Our purpose
for the benchmark was to determine if it was an improvement or not, not
to determine the exact improvement, so we don't really know what the
real gain was.  The same machines do several other tasks, and our
monitoring at the time of change was not very sophisticated, so we only
really know it was a big win.  Something on the order of 37 load issues
the week before the change, most of which were fairly obviously web
overload, and two the week after (those two being very obviously
associated with other services the boxes are running.)

Ed




Re: Cookies and IE in mod_perl

2002-03-24 Thread Balazs Rauznitz

On Sun, Mar 24, 2002 at 01:44:51PM -0500, Jesse and Rebecca Stay wrote:
> I've determined that it isn't the redirect causing the cookies not to be set. 
>  If I take out the redirect, and just try to set a cookie w/o a redirect, it 
> still doesn't set the cookies in IE.  Does M$ have any docs on how IE6 
> handles cookies that I can look this up on?

http://www.microsoft.com/presspass/press/2001/mar01/PrivacyToolsIEfs.asp

Balazs



Re: Cookies and IE in mod_perl

2002-03-24 Thread Michael Robinton



On Sat, 23 Mar 2002, Jesse and Rebecca Stay wrote:

> Ok - I got rid of the Apache::Cookie stuff, and am now doing things manually,
> but it still doesn't generate a cookie in IE.  It still works in Netscape.  I
> get a redirect, but no cookie.  Here is my code:
>
> my $r = Apache->request;
>
> $r->content_type('text/html');
> $r->err_headers_out->add('Set-Cookie' => 'userSession=test;
> domain=.hainesfamily.org; path=/; expires=Mon, 25-Mar-2002 03:30:43 GMT');
> $r->headers_out->add(Location => $redir);
> $r->status(REDIRECT);
> $r->send_http_header;
>
> my $headers_out = $r->headers_out;
> foreach (keys %$headers_out) {
> warn "$_=$headers_out->{$_}";
> }
>
> return OK;

I think this should be
  return 302;





Re: AddModule mod_perl.c

2002-03-24 Thread Dan Riley

Ged Haywood <[EMAIL PROTECTED]> writes:
> > According to the mod_perl Reference Guide the line
> >  AddModule mod_perl.c
> > should be added to my httpd.conf, otherwise mod_perl
> > is not activated.
> 
> I think you'd better have a more careful look at that Guide.  You only
> need that in your config if you have mod_perl built as a DSO (Dynamic
> Shared Object) which means that Apache starts without trhe mod_perl
> module and then loads it later when it reads the line
> 
>   AddModule mod_perl.c
> 
> in httpd.conf.

I think you've confused LoadModule and AddModule.  If you follow the
recommended apache configuration, which does all the LoadModules
followed by a ClearModuleList and a bunch of AddModules, you don't
need the LoadModule for mod_perl (since it is built in), but you do
need the AddModule since *all* the module entries get cleared by the
ClearModuleList.

I believe the point of this somewhat convoluted load/clear/add
procedure is for the static modules to end up in the right spots in
the module list relative to all the DSOs, rather than all bunched up
at one end, since the order does matter (a lot).
-- 
Dan Riley [EMAIL PROTECTED]
 "Mr. Ellison is presently the sole member of the Plan Committee.  The
  Plan Committee did not meet during fiscal year 2001, and during that
   same period, acted 46 times by unanimous written consent."



Re: Cookies and IE in mod_perl

2002-03-24 Thread Jesse and Rebecca Stay

I've determined that it isn't the redirect causing the cookies not to be set. 
 If I take out the redirect, and just try to set a cookie w/o a redirect, it 
still doesn't set the cookies in IE.  Does M$ have any docs on how IE6 
handles cookies that I can look this up on?

On Saturday 23 March 2002 11:48 pm, Cees Hek wrote:
> Some browsers don't accept cookies sent allong with a redirect header.
> A simple workaround is to leave your cookie in the header, but move the
> redirect to a META HTTP-EQUIV tag in a blank HTML document.
>
> I'm not sure if IE 6.0 suffers from this but I suspect that this is your
> problem.  So this isn't really a mod_perl problem, but likely a browser
> problem.
>
> Also, if you want to see exactly what headers your apache server is
> sending out, or headers your client is sending in, have a look at
> Apache::DumpHeaders.  It saves putting those warn statements in your
> code.
>
> Cees
>
> On Sun, 2002-03-24 at 14:44, Jesse and Rebecca Stay wrote:
> > Ok - I got rid of the Apache::Cookie stuff, and am now doing things
> > manually, but it still doesn't generate a cookie in IE.  It still works
> > in Netscape.  I get a redirect, but no cookie.  Here is my code:
> >
> > my $r = Apache->request;
> >
> > $r->content_type('text/html');
> > $r->err_headers_out->add('Set-Cookie' => 'userSession=test;
> > domain=.hainesfamily.org; path=/; expires=Mon, 25-Mar-2002 03:30:43
> > GMT'); $r->headers_out->add(Location => $redir);
> > $r->status(REDIRECT);
> > $r->send_http_header;
> >
> > my $headers_out = $r->headers_out;
> > foreach (keys %$headers_out) {
> > warn "$_=$headers_out->{$_}";
> > }
> >
> > return OK;
> >
> > The warn produces the following:
> >
> > Set-Cookie=userSession=test; domain=.domain.org; path=/; expires=Mon,
> > 25-Mar-2002 03:30:43 GMT at /path/to/script.pm line 326.
> > Location=/r/common/loginWelcome at /path/to/script.pm line 326.
> > Connection=close at /path/to/script.pm line 326.
> > Transfer-Encoding=chunked at /path/to/script.pm line 326.
> > Content-Type=text/html at /path/to/script.pm line 326.
> >
> > Am I doing something wrong???
> >
> > -Jesse Stay
> >
> > On Saturday 23 March 2002 06:43 pm, Eric Frazier wrote:
> > > Strong suggestion. Look at an existing cookie that works in IE
> > > whatever, copy it, then look at the header that Apache::Cookie is
> > > making. This oop cookie crap really bugs me since a cookie is just a
> > > stupid header line, not that big of a deal to parse, or write by hand.
> > > Abscraction is for things that make good objects and that are HARD,
> > > cookies in my opinon don't fit into that category.
> > > I strongly bet it has to do with the expire date, also look at the
> > > docs, and the code itself under the expires sub. I haven't done e com
> > > crap for a while now, but I had lots of trouble getting IE to get it
> > > right. Remember Netscape invented the cookie, then IE had to go and
> > > tweak with it.
> > >
> > >
> > > Eric
> > >
> > > At 09:21 PM 3/23/02 -0500, Jesse and Rebecca Stay wrote:
> > > >I guess in particular, does anyone know of any known issues with
> > > >Apache::Cookie and IE6.0 (or any other versions)?
> > > >
> > > >On Saturday 23 March 2002 07:09 pm, Jesse and Rebecca Stay wrote:
> > > >> Here is the code I use (in this particular case it is being used
> > > >> with a redirect, but it doesn't work in any case.):
> > > >>
> > > >>
> > > >>my $cookieContent = Apache::Cookie->new(
> > > >>  $r,
> > > >>  -name=> 'userSession',
> > > >>  -value   => $cookieValue,
> > > >>  -expires => '+365d');
> > > >>
> > > >>$cookieContent->bake();
> > > >>
> > > >> $r->headers_out->set(Location => $redir);
> > > >> $r->status(REDIRECT);
> > > >> $r->send_http_header;
> > > >> return OK;
> > > >>
> > > >> I tried expires => '+1Y', but that didn't work either.  Adding the
> > > >> domain doesn't do anything either.
> > > >>
> > > >> On Saturday 23 March 2002 06:44 pm, Frank Wiles wrote:
> > > >> > On Sat, 23 Mar 2002 18:52:14 -0500 Jesse and Rebecca Stay
> > > >>
> > > >> <[EMAIL PROTECTED]> wrote:
> > > >> > > Has anyone had any issues in getting cookies to work with IE
> > > >> > > using mod_perl? I have tried using both CGI::Cookie and
> > > >> > > Apache::Cookie, and in both instances it works just fine under
> > > >> > > Netscape, but on IE it doesn't even try to set the cookie.  Any
> > > >> > > ideas?
> > > >> >
> > > >> >What are you expire times on your cookies? We ran into a
> > > >> > situation where I work that all of the Windows machines were in
> > > >> > the wrong time zone and with a 2 hour expire, IE would not set the
> > > >> > cookie because it thought it was already expired.  Netscape would
> > > >> > however set the cookie anyway.
> > > >> >
> > > >> >This may not be your problem, but it may be something to think
> > 

Re: mod_perl training companies?

2002-03-24 Thread Steven Lembark



http://www.stonehenge.com/

http://www.stonehenge.com/perltraining/

--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582



Re: AddModule mod_perl.c

2002-03-24 Thread John Kolvereid

Hi Richard,
  It worked.  Thanks.
 John Kolvereid
--- Richard Dice <[EMAIL PROTECTED]> wrote:
> >   I know the guide is posted on line.  I would
> like to
> > get a copy on my server to save on traffic. 
> Moreover,
> > I don't want a PDF copy - not as friendly (to me).
> >   Exactly what is
> >  Pod::HtmlPsPdf
> > and how (and why) do I install it.  Thanks.
> 
> This is a module, available off of CPAN:
> 
>
http://www.cpan.org/modules/by-module/Pod/Pod-HtmlPsPdf-0.04.tar.gz
> 
> (Written by Stas, in fact!)
> 
> It allows you to create HTML, Ps (Postscript) and
> PDF documents given POD.
> 
> What is POD (or Pod)?  "Plain Old Documentation". 
> This is the native
> documentation format for Perl modules.  For any perl
> module you have
> installed on your system, you can read its
> documentation by the
> "perldoc MODULENAME" command.  The perldoc command
> will scan the module
> for its included POD, and then render the POD for
> your reading pleasure.
> 
> --
> 
> What is CPAN?
> 
> CPAN is the Comprehensive Perl Archive Network.  It
> is a vast collection
> of user-contributed Perl modules that cover a vast
> array of common (and
> not so common) tasks that you might wish to cover. 
> It will simplify
> your life greatly.
> 
> There is an installation procedure that you can
> follow that will allow
> you to take a module off of CPAN and put it on your
> computer.  There
> is documentation available on the CPAN web site,
> http://www.cpan.org/
> that you can read and learn and therefore allow you
> to install the
> modules.  (Usually it's not difficult to install a
> module -- you should
> usually be able to do it in 5 command lines, or less
> if you don't mind
> stringing a bunch of them together with "&&" logical
> joiners.)
> 
> There is a module available on CPAN called "CPAN"
> that, if you already
> have it installed on your system, can greatly ease
> your task of installing
> modules off of CPAN.  If you have it installed, I
> suggest you use it.
> If you don't have it installed, I suggest you
> install it and then use it
> to install all future modules.
> 
> --
> 
> How can you tell if you nave module Foo::Bar::Baz
> installed?
> 
>  perl -MFoo::Bar::Baz -e 'print
> "$Foo::Bar::Baz::VERSION\n";'
> 
> If you have the module installed, this command will
> tell you the version
> of the module you have installed.  If you don't have
> it installed, then
> it'll spew out a few lines regarding how
> Foo::Bar::Baz can't be found
> within the Perl module include path of your system.
> (called @INC)
> 
> Note that some CPAN modules -- *including*
> Pod::HtmlPsPdf" -- have
> *dependancies*.  Sometimes these dependancies are
> other Perl modules.
> (if so, then the CPAN module can automatically
> follow the depedancies
> and install the modules that are depended-upon and
> install them).
> Sometimes the dependancies depend on you having
> other *non* Perl programs
> (or libraries) installed on your system  If you try
> to install a Perl
> module that has one of these kinds of dependancies
> and you don't have
> the thing that is depended upon on your system, then
> the module
> installation attempt will fail and you will have to
> go and install
> that thing first before you try installing your Perl
> module again.
> *Pay attention* to what the installation error
> report says -- it should
> provide you with the information (or at least the
> clues) you need in
> order to successfully install the module.
> 
> --
> 
> How do you install pieces of software that aren't
> Perl that the
> random CPAN module that you're trying to install
> might need?
> 
> That depends on your operating system.  I use Debian
> GNU/Linux.
> Lots of people use RedHat based Linux systems.  And
> then there's
> Solaris.  And other Unices.  And (gasp!) Windows
> OSes.  Each one
> has a different way to approach this problem.
> 
> It also depends on the program / library in
> question.
> 
> I'll have to let you work on this part yourself for
> now, at least
> until you've put in a few hours of trying on your
> own and you can
> come back with a few specific questions. (i.e.  "I
> need to install
> the following, I tried doing the following, it
> didn't work, and
> here's the error message I'm getting.  My system
> setup is the following.
> What's going on?")
> 
> --
> 
> Another useful piece of information -- you can read
> the POD of a module
> without it already being installed on your machine! 
> You do this by
> going to www.cpan.org and looking info re: CPAN
> module documentation.
> There are several selections along these lines --
> pick one, check it out,
> see if it gives you what you want, and if not then
> check out another
> one.  Rinse, lather, repeat...
> 
> I suggest you check out the Pod::HtmlPsPdf
> documentation online using
> this technique.  Here's a direct URL, just because
> I'm such a nice
> guy...
>
http://theoryx5.

Re: AddModule mod_perl.c

2002-03-24 Thread Richard Dice

>   I know the guide is posted on line.  I would like to
> get a copy on my server to save on traffic.  Moreover,
> I don't want a PDF copy - not as friendly (to me).
>   Exactly what is
>  Pod::HtmlPsPdf
> and how (and why) do I install it.  Thanks.

This is a module, available off of CPAN:
 http://www.cpan.org/modules/by-module/Pod/Pod-HtmlPsPdf-0.04.tar.gz

(Written by Stas, in fact!)

It allows you to create HTML, Ps (Postscript) and PDF documents given POD.

What is POD (or Pod)?  "Plain Old Documentation".  This is the native
documentation format for Perl modules.  For any perl module you have
installed on your system, you can read its documentation by the
"perldoc MODULENAME" command.  The perldoc command will scan the module
for its included POD, and then render the POD for your reading pleasure.

--

What is CPAN?

CPAN is the Comprehensive Perl Archive Network.  It is a vast collection
of user-contributed Perl modules that cover a vast array of common (and
not so common) tasks that you might wish to cover.  It will simplify
your life greatly.

There is an installation procedure that you can follow that will allow
you to take a module off of CPAN and put it on your computer.  There
is documentation available on the CPAN web site, http://www.cpan.org/
that you can read and learn and therefore allow you to install the
modules.  (Usually it's not difficult to install a module -- you should
usually be able to do it in 5 command lines, or less if you don't mind
stringing a bunch of them together with "&&" logical joiners.)

There is a module available on CPAN called "CPAN" that, if you already
have it installed on your system, can greatly ease your task of installing
modules off of CPAN.  If you have it installed, I suggest you use it.
If you don't have it installed, I suggest you install it and then use it
to install all future modules.

--

How can you tell if you nave module Foo::Bar::Baz installed?

 perl -MFoo::Bar::Baz -e 'print "$Foo::Bar::Baz::VERSION\n";'

If you have the module installed, this command will tell you the version
of the module you have installed.  If you don't have it installed, then
it'll spew out a few lines regarding how Foo::Bar::Baz can't be found
within the Perl module include path of your system. (called @INC)

Note that some CPAN modules -- *including* Pod::HtmlPsPdf" -- have
*dependancies*.  Sometimes these dependancies are other Perl modules.
(if so, then the CPAN module can automatically follow the depedancies
and install the modules that are depended-upon and install them).
Sometimes the dependancies depend on you having other *non* Perl programs
(or libraries) installed on your system  If you try to install a Perl
module that has one of these kinds of dependancies and you don't have
the thing that is depended upon on your system, then the module
installation attempt will fail and you will have to go and install
that thing first before you try installing your Perl module again.
*Pay attention* to what the installation error report says -- it should
provide you with the information (or at least the clues) you need in
order to successfully install the module.

--

How do you install pieces of software that aren't Perl that the
random CPAN module that you're trying to install might need?

That depends on your operating system.  I use Debian GNU/Linux.
Lots of people use RedHat based Linux systems.  And then there's
Solaris.  And other Unices.  And (gasp!) Windows OSes.  Each one
has a different way to approach this problem.

It also depends on the program / library in question.

I'll have to let you work on this part yourself for now, at least
until you've put in a few hours of trying on your own and you can
come back with a few specific questions. (i.e.  "I need to install
the following, I tried doing the following, it didn't work, and
here's the error message I'm getting.  My system setup is the following.
What's going on?")

--

Another useful piece of information -- you can read the POD of a module
without it already being installed on your machine!  You do this by
going to www.cpan.org and looking info re: CPAN module documentation.
There are several selections along these lines -- pick one, check it out,
see if it gives you what you want, and if not then check out another
one.  Rinse, lather, repeat...

I suggest you check out the Pod::HtmlPsPdf documentation online using
this technique.  Here's a direct URL, just because I'm such a nice
guy...
http://theoryx5.uwinnipeg.ca/CPAN/data/Pod-HtmlPsPdf/Pod/HtmlPsPdf.html

--

Why am I going into so much detail?

Because it seems like you haven't done this kind of thing before.
Note that the mod_perl installation itself (if you aren't using some
packaged module like an RPM or DEB or something like that) includes
a bunch of outside dependancies.

You'll always be faced with challenges when it comes to administe

the Guide

2002-03-24 Thread John Kolvereid

 I recently downloaded the mod_perl Guide and
tried to install it.  Problem is that it would not
install properly because the file:
 pod2hpp
was missing.  After trying other versions I kept
getting the same error.  Then I checked google.com.  I
am not the only one w/ this problem.
 I conclude that the guide is built from the PODs
(Plain Old Documents). pod2hpp is thus needed to
convert the pods to html. The online guide is no doubt
created the same way. 
 Wouldn't it thus be simpler and more convenient
for 1st times like myself if the guide download were
simply the already created html pages which appear
online.  Naturally they would be compressed.  Then one
would only have to uncompress them instead of building
them.
 It's hard enough to install mod_perl itself.  Why
add an extra burden for the manual also.

 Thanks.

   John Kolvereid

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: AddModule mod_perl.c

2002-03-24 Thread John Kolvereid

Hi Stas,
  I know the guide is posted on line.  I would like to
get a copy on my server to save on traffic.  Moreover,
I don't want a PDF copy - not as friendly (to me).
  Exactly what is
 Pod::HtmlPsPdf
and how (and why) do I install it.  Thanks.

  John Kolvereid

--- Stas Bekman <[EMAIL PROTECTED]> wrote:
> John Kolvereid wrote:
> > Unbelievable - Not only cannot I install and
> configure
> > mod_perl, I can't even load the "guide".  I
> downloaded
> > Apache-mod_perl_guide-1.31 and untarred it. Then
> like
> > the instructions dictate I entered
> > perl Makefile.PL - ran ok
> > make install
> > The last instruction choked because it couldn't
> exec
> > "pod2hpp".
> >   So I say "ok" it's the version.  I try 1.30. 
> The
> > same. Then I read the readme on their web site. 
> It
> > says to get the latest POD sources.  I download 
> >guide-cvs-snapshot_200203241203_tar.gz and
> untar
> > it.
> > Once again, the same: "pod2hpp" does not exist.
> > 
> >   Not sure the view is worth the climb.
> 
> Huh? The guide is all here:
> http://perl.apache.org/guide.
> You can even grab it as a pdf.
> 
> To build it from sources you need to install
> Pod::HtmlPsPdf.
> 
> If you were looking closely at the output when you
> run 'perl 
> Makefile.PL' it should have told you that you are
> missing the prerequisite.
> 
> 
> >   John Kolvereid
> > 
> > 
> > --- Ged Haywood <[EMAIL PROTECTED]>
> wrote:
> > 
> >>Hi there,
> >>
> >>On Sat, 23 Mar 2002, John Kolvereid wrote:
> >>
> >>
> >>>Which Guide?  Please advise.
> >>
> >>http://perl.apache.org/guide
> >>
> >>
> >>Did you read any of the other documentation? 
> Please
> >>let me know why
> >>you did not know about the Guide, we have
> obviously
> >>failed you.
> >>
> >>73,
> >>Ged.
> >>
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy
> Awards®
> > http://movies.yahoo.com/
> 
> 
> 
> -- 
> 
> 
>
__
> 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
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: AddModule mod_perl.c

2002-03-24 Thread Stas Bekman

John Kolvereid wrote:
> Unbelievable - Not only cannot I install and configure
> mod_perl, I can't even load the "guide".  I downloaded
> Apache-mod_perl_guide-1.31 and untarred it. Then like
> the instructions dictate I entered
> perl Makefile.PL - ran ok
> make install
> The last instruction choked because it couldn't exec
> "pod2hpp".
>   So I say "ok" it's the version.  I try 1.30.  The
> same. Then I read the readme on their web site.  It
> says to get the latest POD sources.  I download 
>guide-cvs-snapshot_200203241203_tar.gz and untar
> it.
> Once again, the same: "pod2hpp" does not exist.
> 
>   Not sure the view is worth the climb.

Huh? The guide is all here:
http://perl.apache.org/guide.
You can even grab it as a pdf.

To build it from sources you need to install Pod::HtmlPsPdf.

If you were looking closely at the output when you run 'perl 
Makefile.PL' it should have told you that you are missing the prerequisite.


>   John Kolvereid
> 
> 
> --- Ged Haywood <[EMAIL PROTECTED]> wrote:
> 
>>Hi there,
>>
>>On Sat, 23 Mar 2002, John Kolvereid wrote:
>>
>>
>>>Which Guide?  Please advise.
>>
>>http://perl.apache.org/guide
>>
>>
>>Did you read any of the other documentation?  Please
>>let me know why
>>you did not know about the Guide, we have obviously
>>failed you.
>>
>>73,
>>Ged.
>>
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/



-- 


__
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




Re: Performace...

2002-03-24 Thread Kee Hinckley

At 2:27 PM -0500 3/23/02, Geoffrey Young wrote:
>
>you might be interested in Joshua Chamas' ongoing benchmark project:
>
>[EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/sercrerdprou/[EMAIL PROTECTED]
>http://www.chamas.com/bench/
>
>he has the results from a benchmark of Apache::Registry and plain 
>handlers, as well as comparisons between HTML::Mason, Embperl, and 
>other templating engines.

Although there are lots of qualifiers on those benchmarks, I consider 
them rather dangerous anyway.  They are "Hello World" benchmarks, in 
which startup time completely dominates the time. The things that 
distinguish more sophisticated solutions from basic CGI or even 
modules are elements such as caching, pre-compiling and other 
techniques directly aimed at improving real-world performance.  Hello 
World isn't going to show those at all.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED]

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



Re: AddModule mod_perl.c

2002-03-24 Thread John Kolvereid

Unbelievable - Not only cannot I install and configure
mod_perl, I can't even load the "guide".  I downloaded
Apache-mod_perl_guide-1.31 and untarred it. Then like
the instructions dictate I entered
perl Makefile.PL - ran ok
make install
The last instruction choked because it couldn't exec
"pod2hpp".
  So I say "ok" it's the version.  I try 1.30.  The
same. Then I read the readme on their web site.  It
says to get the latest POD sources.  I download 
   guide-cvs-snapshot_200203241203_tar.gz and untar
it.
Once again, the same: "pod2hpp" does not exist.

  Not sure the view is worth the climb.

  John Kolvereid


--- Ged Haywood <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> On Sat, 23 Mar 2002, John Kolvereid wrote:
> 
> > Which Guide?  Please advise.
> 
> http://perl.apache.org/guide
> 
> 
> Did you read any of the other documentation?  Please
> let me know why
> you did not know about the Guide, we have obviously
> failed you.
> 
> 73,
> Ged.
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



Re: mod_perl training companies?

2002-03-24 Thread Miroslav Madzarevic


A young, startup company of 15 local people (believers) is doing traning and 
development on mod_perl, web and system administration (Linux). We are 
located in Yugoslavia, Belgrade but we also work with people and companies 
from other countries (Canada, Germany, Cyprus, USA). Much of our expirience 
comes from this mailing list, perl books and jobs we've worked on abroad. We 
got a lot from open source community and we're giving it back. 

Prices are very low since our country living standard is very low and there 
are not many perl jobs around here, unfortunatelly.
We respect all the clients we have. 

Our biggest accomplishment is in progress, since we've given a chance of 
assisting in moving old cgi-bin applications to mod-perl for 
www.cleverform.com (British company, rewiewed in January's edition of PC 
Magazine). I hope in time to come you'll be able to put this site in Powered 
by mod-perl section.

You can reach us at http://www.modperldev.com (a website we're making to 
serve open community).

-- 
Best regards,

Miroslav Madzarevic, Senior Perl Programmer
[EMAIL PROTECTED]
Mod Perl Development  - http://www.modperldev.com
Telephone: +381 64 1193 501
ICQ: 15880893
jamph

$_=",,.,,.,,,.,,,.,,,..,,.,,,.,.,,,";
s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=;tr/~`'"^/0-4/;map{$o
.=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__
`~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~




Re: Be carefull with apache 1.3.24

2002-03-24 Thread Ged Haywood

Hi Pedro,

On Sun, 24 Mar 2002, Pedro Melo Cunha wrote:

[snip,snip]
> Looking at the change log, they mention a bug that multiple set-cookie's
> will fail (only the last one will be sent to the client, the proxy will
> "eat" the others). And it was true... The problem is that 1.3.24 final
> also has that bug: only the last set-cookie will reach your browser.
> 
> This was a show-stopper for my application. So I sat down, read the
> proxy code, and made a patch to solve the bug. [snip]
> 
> Anyway, I attached here. Maybe someone here can push it into apache for
> the next release, and in the meantime you can use it, if you want.
> 
> I also attach a cgi that set's two cookies, to demonstrate the problem.


Pedro, thanks a real bunch!  You just saved me a load of work!

If we ever meet, I'll buy you a beer, I promise!

73,
Ged.




Re: AddModule mod_perl.c

2002-03-24 Thread Ged Haywood

Hi there,

On Sat, 23 Mar 2002, John Kolvereid wrote:

> Which Guide?  Please advise.

http://perl.apache.org/guide


Did you read any of the other documentation?  Please let me know why
you did not know about the Guide, we have obviously failed you.

73,
Ged.