Re: Apache::Template for modperl 2

2008-06-27 Thread Fred Moyer

Geoffrey Young wrote:


Fred Moyer wrote:
The port to mod_perl 2 looks straightforward, if I can scrape up some 
extra tuits this weekend I might take run at that.


google should have turned up this:

http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-Template-2.00_01.tar.gz 


Sorry for missing that, I looked on CPAN and then got caught up in 
reading through the source, my bad.


there was quite a bit of conversation about it on the TT list at the 
time, as well as some chatter here.


--Geoff


Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-27 Thread Perrin Harkins
On Fri, Jun 27, 2008 at 5:51 AM, Tobias Kremer <[EMAIL PROTECTED]> wrote:
> Now if I could just get rid of those annoying random "Commands out of sync" 
> and
> "Lost connection to MySQL server during query" errors that happen once in a
> while ...

Those generally mean that you timed out (set MySQL's timeouts longer)
or did something incorrectly with forking.

- Perrin


Re: Apache::Template for modperl 2

2008-06-27 Thread Perrin Harkins
On Fri, Jun 27, 2008 at 3:28 AM, Senthil V <[EMAIL PROTECTED]> wrote:
> I am trying to install Apache::Template for Apache 2.2.8.

If you look in the archives you'll see that this has been discussed
many times.  My general advice is to use something more flexible, like
CGI::Application with its TT plugin.

- Perrin


Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
Torsten,

I created a bug. Bug number is
45297

Thank you very much for your help

2008/6/27, Torsten Foertsch <[EMAIL PROTECTED]>:
>
> On Fri 27 Jun 2008, titetluc titetluc wrote:
> > Would it be rather a wrong httpd configuration: my requirement is very
> > common (calling a response handler for an index.html and access the
> r->user
> > information). I may misconfigure Apache 
> >
> > BTW, how can I verify if it is a bug ? Which apache mailing list do I
> have
> > to use ?
>
>
> On the apache httpd website http://httpd.apache.org you'll find
> instructions
> how to file a bug.
>
> I have verified it without mod_perl with apache 2.2.9:
>
> DirectoryIndex index.shtml
> Options Includes Indexes
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
>
> 
>
> Require valid-user
> AuthType basic
>
> AuthName "Something very secret"
> AuthUserFile /path/to/htpasswd
> 
>
> My index.shtml reads:
>
> 
> 
> Hello 
> 
> 
> 
> 
> 
>
> If /index.shtml is requested all works normal. If only / is requested I get
> the password prompt. Then it shows the page but the REMOTE_USER variable is
> unset. This variable is r->user.
>
> File the bug then send its number to the list. I'll fill in the details. In
> your bug description you can reference this thread:
>
>   http://www.gossamer-threads.com/lists/modperl/modperl/97533
>
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: [EMAIL PROTECTED]
>


Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
2008/6/27, Rolf Schaufelberger <[EMAIL PROTECTED]>:
>
> Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc:
>
> > > > sub set_user {
> > > > my ($self, $r) = @_;
>
>
>
> Shouldn't that be
>
>   sub set_user  :method {
>  my ($self, $r) = @_;
>
> When you use $r as second argument ?



I am not a mod_perl specialist, but declaring the method without the :method
attribute works correctly. According to
http://perl.apache.org/docs/2.0/user/coding/coding.html#Method_Handlers, the
:method attribute is not required


--
>
> Rolf Schaufelberger
>


RE: Segfault when connecting during Apache startup with Apache::DBI

2008-06-27 Thread Brian Gaber
On AIX 5.2 I am using Perl 5.8.0, MySQL 5.0.51a, Apache 2.2.28, mod_perl
2.04, DBI 1.604 and DBD 4.0007 and it all works good.

--Brian

-Original Message-
From: Tobias Kremer [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 27, 2008 5:51 AM
To: modperl@perl.apache.org
Subject: Re: Segfault when connecting during Apache startup with
Apache::DBI

Quoting Tobias Kremer <[EMAIL PROTECTED]>:

> On 25.06.2008, at 20:58, Amiri Barksdale wrote:
> > I had big trouble with DBD::mysql 4.007. I didn't get rid of my 
> > segfault problem running mod_perl 1.31 until I went back to 4.004.
>
> Thanx. It really looks a lot like my problem:
>
> http://bugs.mysql.com/bug.php?id=36810
>
> I'll try reverting to an earlier version of DBD::mysql.

The latest DBD::mysql really seems to be the culprit. Even on a freshly
installed Ubuntu 8.04 with the stock Perl 5.8.8 but self-compiled MySQL
5.0.51a, Apache 1.3.41, mod_perl 1.30, DBI 1.605 and DBD 4.0007 I'm
getting segmentation faults. After installing DBD 4.0004 everything
works fine. Of course, I made sure that the correct MySQL library was
linked.

I can't understand what 4.0007 is still doing on CPAN as the most recent
version. But maybe this still is an Ubuntu and/or MP1 related thing -
even with most components rolled by myself ...

Now if I could just get rid of those annoying random "Commands out of
sync" and "Lost connection to MySQL server during query" errors that
happen once in a while ...

--Tobias


Re: [MP2]mod_perl and index.html

2008-06-27 Thread Rolf Schaufelberger
Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc:
> > > sub set_user {
> > >     my ($self, $r) = @_;


Shouldn't that be 

 sub set_user  :method {
 my ($self, $r) = @_;

When you use $r as second argument ?

-- 
Rolf Schaufelberger


Re: [MP2]mod_perl and index.html

2008-06-27 Thread Torsten Foertsch
On Fri 27 Jun 2008, titetluc titetluc wrote:
> Would it be rather a wrong httpd configuration: my requirement is very
> common (calling a response handler for an index.html and access the r->user
> information). I may misconfigure Apache 
>
> BTW, how can I verify if it is a bug ? Which apache mailing list do I have
> to use ?

On the apache httpd website http://httpd.apache.org you'll find instructions 
how to file a bug.

I have verified it without mod_perl with apache 2.2.9:

DirectoryIndex index.shtml
Options Includes Indexes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


Require valid-user
AuthType basic
AuthName "Something very secret"
AuthUserFile /path/to/htpasswd


My index.shtml reads:



Hello 






If /index.shtml is requested all works normal. If only / is requested I get 
the password prompt. Then it shows the page but the REMOTE_USER variable is 
unset. This variable is r->user.

File the bug then send its number to the list. I'll fill in the details. In 
your bug description you can reference this thread:

  http://www.gossamer-threads.com/lists/modperl/modperl/97533

Torsten

--
Need professional mod_perl support?
Just hire me: [EMAIL PROTECTED]


Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-27 Thread Tobias Kremer
Quoting Tobias Kremer <[EMAIL PROTECTED]>:

> On 25.06.2008, at 20:58, Amiri Barksdale wrote:
> > I had big trouble with DBD::mysql 4.007. I didn't get rid of my
> > segfault problem running mod_perl 1.31 until I went back to 4.004.
>
> Thanx. It really looks a lot like my problem:
>
> http://bugs.mysql.com/bug.php?id=36810
>
> I'll try reverting to an earlier version of DBD::mysql.

The latest DBD::mysql really seems to be the culprit. Even on a freshly
installed Ubuntu 8.04 with the stock Perl 5.8.8 but self-compiled MySQL
5.0.51a, Apache 1.3.41, mod_perl 1.30, DBI 1.605 and DBD 4.0007 I'm getting
segmentation faults. After installing DBD 4.0004 everything works fine. Of
course, I made sure that the correct MySQL library was linked.

I can't understand what 4.0007 is still doing on CPAN as the most recent
version. But maybe this still is an Ubuntu and/or MP1 related thing - even with
most components rolled by myself ...

Now if I could just get rid of those annoying random "Commands out of sync" and
"Lost connection to MySQL server during query" errors that happen once in a
while ...

--Tobias


Re: [MP2]mod_perl and index.html

2008-06-27 Thread titetluc titetluc
2008/6/26, Torsten Foertsch <[EMAIL PROTECTED]>:
>
> On Thu 26 Jun 2008, titetluc titetluc wrote:
> > In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
> > understand why $r->main AND $r->prev are not defined (intuitively,
> $r->prev
> > should be defined)
>
>
> I'd expect $r->user to be set, not $r->prev->user nor $r->main->user. But
> I'd
> expect $r->prev to be set because $r is the result of an internal redirect.
> But I am not sure what exactly ap_internal_fast_redirect does.
>
> Oh my, I found it. ap_internal_fast_redirect isn't exactly an internal
> redirect. Instead it overrides the current request with a subreq. Look at
> modules/http/http_request.c. There is a comment that says something about
> that function:
>
> /* XXX: Is this function is so bogus and fragile that we deep-6 it? */
> AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
>
> And yes, it forgets about $r->user at least in apache 2.2.6. Maybe you
> file a
> bug for apache?


Would it be rather a wrong httpd configuration: my requirement is very
common (calling a response handler for an index.html and access the r->user
information). I may misconfigure Apache 

BTW, how can I verify if it is a bug ? Which apache mailing list do I have
to use ?


You can check in the AuthenHandler for $r->main. If it is true you can set
> $r->user as well as $r->main->user.
>
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: [EMAIL PROTECTED]
>


Re: Apache::Template for modperl 2

2008-06-27 Thread Fred Moyer

Senthil V wrote:

Hi All,

I am trying to install Apache::Template for Apache 2.2.8. 
Whether the porting of Apache::Template is done for modperl  2.
If its done, plz let me know from where i can get the source.


I just took a look at Apache::Template, and it is only for mod_perl 
version 1.


The port to mod_perl 2 looks straightforward, if I can scrape up some 
extra tuits this weekend I might take run at that.





Thanks in advance,
Senthil



--
Red Hot Penguin Consulting LLC
mod_perl/PostgreSQL consulting and implementation
http://www.redhotpenguin.com/


Apache::Template for modperl 2

2008-06-27 Thread Senthil V
Hi All,

I am trying to install Apache::Template for Apache 2.2.8.
Whether the porting of Apache::Template is done for modperl  2.
If its done, plz let me know from where i can get the source.

Thanks in advance,
Senthil