Re: DBIx::Recordset and Select with $order

2002-03-05 Thread Gerald Richter

>
> In my perldoc DBIx::Recorset there is:
>
> *set = DBIx::Recordset -> Select (\%params, $fields, $order)
> $set -> Select (\%params, $fields, $order)
> $set -> Select ($where, $fields, $order)
>Selects records from the recordsets table(s).
> [...]
>order:  comma separated list of fieldnames to sort on
>
> *set = DBIx::Recordset -> Search (\%params)
> [nothing with $order here]
>
> So the Documentation is *very* wrong. :)

No, according to that documentation your example has to be written as

*set = DBIx::Recordset->Select(
{'!DataSource' => $dsn,
'!Table'  => 'config',
'!Username'   => $user,
'!Password'   => $pass}, undef, 'id');

again, order is the third parameter to Select and _not_ a part of the
parameter hash.

> (Yes, in the Examples Part $order is only used with Search, but i dont
> look there very often. :) )
>
It's mentioned under "Search parameters", as I wrote in my privious mail:

  Search parameters

$start
First row to fetch. The row specified here will appear as index 0 in the
data array.
[..]

   $order
   Fieldname(s) for ordering (ORDER BY) (must be comma-separated, could
   also contain USING)

Since Search (and other methods) can take the same parameters, the parameter
are grouped together in the documentation by type.

Hopefully it's more clear now

Gerald

P.S. You asked on the embperl mailing list, but answered on the modperl
list. I CC it to both...

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: here is a good modperl question on perlmonk

2002-03-05 Thread Medi Montaseri


 
Stuart Frew wrote:
Greeting,
Ideally you would have linux( or what ever) on every developers machine
but sometimes you don't get the choice.
Oh "the choice" is easyjust come in on a weekend and install
linux on your box. Don't tell IT. That's all.
 
Cheers
 
On Wed, 2002-03-06 at 13:40, Medi Montaseri wrote:
I  don't agree
with virtual hosts setup for mod_perl folks. What if
someone mess up the configuration
file. If you want a central person
to change them, then you are
limitting the developer.
The Linux-on-developers-box proposition
also goes to include a
database instance for the developer
to crash 50 times a day
It is the ultimate object oriented
programmer methodology...
Stuart Frew wrote:
Greetings,
Depending on the number of developers
and how often they change, virtual hosts are good.
Set up a sub-domain for each
developer, ie jim.my-company.co.nz.
Then they can configure there
local setup to there hearts content, seperate CVS/document tree, also get
separate logs.
Cheers
On Wed, 2002-03-06 at 12:02,
Gunther Birznieks wrote:

Philippe Chiasson had a really nice talk on setting up developer teams on 
mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
are interested in the details.

Later,
   Gunther

At 07:43 AM 3/6/2002, Medi Montaseri wrote:
>Caller wirtes
>
> > we've just migrated our 80K line pure perl web application to 
> mod_perl...ah...
> > so much aster... can anyone advise on their experiences for setting up
> > apache/mod_perl for team development? up till now, we've all been running
> > our own copy of sources out of our home directories, and running a 
> separate
> > apache instance for each developer seems like overkill
>
>Source Control or Revision Control will always be there, no matter if you 
>work
>out of one box or many boxes. Further I don't see anything different about 
>mod_perl
>vs C++. There are all source codes.
>
>My suggestion would be to install a Linux on your developer's PC and keep
>with the distributed model. Now everyone can use a common web tree and
>at integeration, bring all of them to a staging box, QC it and ship it to 
>production.
>
>Caller can also buy some content management software like Interwoven's 
>TeamSite
>product that provides a virtual workarea, for about $300,000.  Its always 
>Make or Buy.
>Isn't it.
>
>clayton cottingham wrote:
>>thought someone might like to have a gander at this:
>>http://perlmonks.org/?node_id=146303
>>look forward to seeing your replies!!
>
>--
>-
>Medi Montaseri   [EMAIL PROTECTED]
>Unix Distributed Systems 
>Engineer    HTTP://www.CyberShell.com
>CyberShell Engineering
>-

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/









-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems Engineer    HTTP://www.CyberShell.com
CyberShell Engineering
-




Cheers 


Stuart Frew 
IT Manager 
The New Zealand Revolution
[EMAIL PROTECTED]
DDI +64-9-918 7664
FAX+64-9-307 7032
http://www.nzr.co.nz




-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems Engineer    HTTP://www.CyberShell.com
CyberShell Engineering
-
 


Re: Breaks in mod_perl, works in Perl

2002-03-05 Thread Stas Bekman

Mark Hazen wrote:
> I am hoping there is a someone brilliant on this list that can help me.  A
> little while ago, I posted to clp.perl asking how I can capture the trace
> output from DBI into a variable.  Since DBI is an external process, I
> couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
> module called IO::Capture (see below).  It works amazingly well in standard
> Perl.  Here is a sample script:
> 
> use IO::Capture;
> $capturer = IO::Capture->new(\*STDERR);

Doesn't IO::Scalar do the same?
http://perl.apache.org/guide/porting.html#Redirecting_STDOUT_into_a_Scalar

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: mod_perl training companies?

2002-03-05 Thread Stas Bekman

Rich Bowen wrote:
> On Tue, 5 Mar 2002, Stas Bekman wrote:
> 
> 
>>I'm compiling a list of companies giving mod_perl training for our new
>>mod_perl site. Currently I have only:
>>
>>http://training.gbdirect.co.uk/courses/linux/customized_and_bespoke.html
>>
>>If you know of other companies please send me the URL of the page
>>advertising the mod_perl courses.
>>
> 
> My company, Cooper McGregor does a mod_perl training course. Our
> training page is located at http://coopermcgregor.com/training/  The
> course outline for the mod_perl course should be put up there today,
> since, for some reason, the web site guy did not have a copy of it
> before.

Thanks Rich!
I also forgot to ask you to tell me the covered regions. e.g. London 
only, UK only, Europe, World Wide... to help potential customers 
minimize their research efforts.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: DBIx::Recordset and Select with $order

2002-03-05 Thread Joerg Jaspert

"Gerald Richter" <[EMAIL PROTECTED]> writes:

>> But in perldoc DBIx::Recordset its documented that only Select works with
>> order.
> It only works with Search. $order is listed below the heading "Search
> parameters", while Select has an extra parameter (the third one) for order.
> Anyway it's better to use Search, because Select is very limited.

In my perldoc DBIx::Recorset there is:

*set = DBIx::Recordset -> Select (\%params, $fields, $order)
$set -> Select (\%params, $fields, $order)
$set -> Select ($where, $fields, $order)
   Selects records from the recordsets table(s).
[...]
   order:  comma separated list of fieldnames to sort on

*set = DBIx::Recordset -> Search (\%params)
[nothing with $order here]

So the Documentation is *very* wrong. :)
(Yes, in the Examples Part $order is only used with Search, but i dont
look there very often. :) )

-- 
begin  OjE-ist-scheisse.txt
bye, Joerg
Registered Linux User #97793 @ http://counter.li.org
end



Re: here is a good modperl question on perlmonk

2002-03-05 Thread Andrew Ho

Hello,

PL>One other tip... write a small script (or modify apachectl) to start
PL>apache with a port number matched to your unix UID.  This keeps
PL>developers from using clashing port numbers.
PL>
PL>  httpd -c "Port $UID" -c "Listen $UID"

At Tellme we find it easiest to run multiple Apaches, one per developer.
We share the same base Perl and Perl modules; we develop modules with
Makefile.PL's and use "use blib" in our included personal httpd.pl's to
get to our own versions of library code.

We run our Apaches on a shared box, because our production infrastructure
is pretty different from a userland Linux box. We just run on multiple
ports, by default we use our telephone extensions for the port number--so
we don't have any conflicts between users. If there are problems with
load, lower MinServers/MaxServers/StartServers/MaxClients.

The individual configs and logs go into our home directories, the only
caveat for our setup is that our homedirs are mounted over NFS so we have
to explicitly specify a Lockfile on local disk.

We usually go one up on Paul's suggestion and just put a personal copy of
apachectl into our personal bin directories (perhaps renamed "myapache")
and just change some paths and add a -f when running Apache to make it
find the right config file.

We find that this works great for development, and lets us still depend on
the same Perl/Apache builds we use on production.

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: here is a good modperl question on perlmonk

2002-03-05 Thread Stuart Frew




Greeting,



Yup, I agree but I meant virtual hosts on the development box, not production.



Ideally you would have linux( or what ever) on every developers machine but sometimes you don't get the choice.



Cheers





On Wed, 2002-03-06 at 13:40, Medi Montaseri wrote:

I  don't agree with virtual hosts setup for mod_perl folks. What if 

someone mess up the configuration file. If you want a central person 

to change them, then you are limitting the developer. 



The Linux-on-developers-box proposition also goes to include a 

database instance for the developer to crash 50 times a day 



It is the ultimate object oriented programmer methodology... 



Stuart Frew wrote: 

Greetings, 



Depending on the number of developers and how often they change, virtual hosts are good. 



Set up a sub-domain for each developer, ie jim.my-company.co.nz. 

Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs. 



Cheers 



On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote: 

Philippe Chiasson had a really nice talk on setting up developer teams on 
mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
are interested in the details.

Later,
   Gunther

At 07:43 AM 3/6/2002, Medi Montaseri wrote:
>Caller wirtes
>
> > we've just migrated our 80K line pure perl web application to 
> mod_perl...ah...
> > so much aster... can anyone advise on their experiences for setting up
> > apache/mod_perl for team development? up till now, we've all been running
> > our own copy of sources out of our home directories, and running a 
> separate
> > apache instance for each developer seems like overkill
>
>Source Control or Revision Control will always be there, no matter if you 
>work
>out of one box or many boxes. Further I don't see anything different about 
>mod_perl
>vs C++. There are all source codes.
>
>My suggestion would be to install a Linux on your developer's PC and keep
>with the distributed model. Now everyone can use a common web tree and
>at integeration, bring all of them to a staging box, QC it and ship it to 
>production.
>
>Caller can also buy some content management software like Interwoven's 
>TeamSite
>product that provides a virtual workarea, for about $300,000.  Its always 
>Make or Buy.
>Isn't it.
>
>clayton cottingham wrote:
>>thought someone might like to have a gander at this:
>>http://perlmonks.org/?node_id=146303
>>look forward to seeing your replies!!
>
>--
>-
>Medi Montaseri   [EMAIL PROTECTED]
>Unix Distributed Systems 
>Engineer    HTTP://www.CyberShell.com
>CyberShell Engineering
>-

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/










-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems Engineer    HTTP://www.CyberShell.com
CyberShell Engineering
-
 




Cheers 





Stuart Frew 

IT Manager 

The New Zealand Revolution

[EMAIL PROTECTED]

DDI +64-9-918 7664

FAX+64-9-307 7032

http://www.nzr.co.nz










Re: here is a good modperl question on perlmonk

2002-03-05 Thread Dave Rolsky

On Tue, 5 Mar 2002, Medi Montaseri wrote:

> True...but I'm thinking full control to the developer. Developer can now
> mis-configure httpd.conf as much as he/she wants and all the paths;
> virtual or not are consistant, instead of a dev path vs production path

Right, every developer can run their own Apache daemon, each on a
different port, mess with httpd.conf, etc.  Whether or not those Apache
daemons run on individual workstations or a central dev box is not a big
issue.


-dave

/*==
www.urth.org
we await the New Sun
==*/




Re: here is a good modperl question on perlmonk

2002-03-05 Thread Medi Montaseri


I  don't agree with virtual hosts setup for mod_perl folks. What if
someone mess up the configuration file. If you want a central person
to change them, then you are limitting the developer.
The Linux-on-developers-box proposition also goes to include a
database instance for the developer to crash 50 times a day
It is the ultimate object oriented programmer methodology...
Stuart Frew wrote:
Greetings,
Depending on the number of developers and how often they change, virtual
hosts are good.
Set up a sub-domain for each developer, ie jim.my-company.co.nz.
Then they can configure there local setup to there hearts content,
seperate CVS/document tree, also get separate logs.
Cheers
On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote:

Philippe Chiasson had a really nice talk on setting up developer teams on 
mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
are interested in the details.

Later,
   Gunther

At 07:43 AM 3/6/2002, Medi Montaseri wrote:
>Caller wirtes
>
> > we've just migrated our 80K line pure perl web application to 
> mod_perl...ah...
> > so much aster... can anyone advise on their experiences for setting up
> > apache/mod_perl for team development? up till now, we've all been running
> > our own copy of sources out of our home directories, and running a 
> separate
> > apache instance for each developer seems like overkill
>
>Source Control or Revision Control will always be there, no matter if you 
>work
>out of one box or many boxes. Further I don't see anything different about 
>mod_perl
>vs C++. There are all source codes.
>
>My suggestion would be to install a Linux on your developer's PC and keep
>with the distributed model. Now everyone can use a common web tree and
>at integeration, bring all of them to a staging box, QC it and ship it to 
>production.
>
>Caller can also buy some content management software like Interwoven's 
>TeamSite
>product that provides a virtual workarea, for about $300,000.  Its always 
>Make or Buy.
>Isn't it.
>
>clayton cottingham wrote:
>>thought someone might like to have a gander at this:
>>http://perlmonks.org/?node_id=146303
>>look forward to seeing your replies!!
>
>--
>-
>Medi Montaseri   [EMAIL PROTECTED]
>Unix Distributed Systems 
>Engineer    HTTP://www.CyberShell.com
>CyberShell Engineering
>-

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/









-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems Engineer    HTTP://www.CyberShell.com
CyberShell Engineering
-
 


Re: here is a good modperl question on perlmonk

2002-03-05 Thread Medi Montaseri

True...but I'm thinking full control to the developer. Developer can now
mis-configure httpd.conf as much as he/she wants and all the paths;
virtual or not are consistant, instead of a dev path vs production path

I had a chance to work with Interwoven TeamSite and this very issue or
virtual path was a pain, I had to add aditional checks in teh code to deal
with that

Dave Rolsky wrote:

> On Tue, 5 Mar 2002, Medi Montaseri wrote:
>
> > My suggestion would be to install a Linux on your developer's PC and
> > keep with the distributed model. Now everyone can use a common web tree
> > and at integeration, bring all of them to a staging box, QC it and ship
> > it to production.
>
> Giving everyone their own Apache daemon, which uses their checked out tree
> of code, on a central dev server is really not a problem either.
>
> -dave
>
> /*==
> www.urth.org
> we await the New Sun
> ==*/

--
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems EngineerHTTP://www.CyberShell.com
CyberShell Engineering
-






Re: here is a good modperl question on perlmonk

2002-03-05 Thread Stuart Frew




Greetings,



Depending on the number of developers and how often they change, virtual hosts are good.



Set up a sub-domain for each developer, ie jim.my-company.co.nz.

Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs.



Cheers 



On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote:

Philippe Chiasson had a really nice talk on setting up developer teams on 
mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
are interested in the details.

Later,
   Gunther

At 07:43 AM 3/6/2002, Medi Montaseri wrote:
>Caller wirtes
>
> > we've just migrated our 80K line pure perl web application to 
> mod_perl...ah...
> > so much aster... can anyone advise on their experiences for setting up
> > apache/mod_perl for team development? up till now, we've all been running
> > our own copy of sources out of our home directories, and running a 
> separate
> > apache instance for each developer seems like overkill
>
>Source Control or Revision Control will always be there, no matter if you 
>work
>out of one box or many boxes. Further I don't see anything different about 
>mod_perl
>vs C++. There are all source codes.
>
>My suggestion would be to install a Linux on your developer's PC and keep
>with the distributed model. Now everyone can use a common web tree and
>at integeration, bring all of them to a staging box, QC it and ship it to 
>production.
>
>Caller can also buy some content management software like Interwoven's 
>TeamSite
>product that provides a virtual workarea, for about $300,000.  Its always 
>Make or Buy.
>Isn't it.
>
>clayton cottingham wrote:
>>thought someone might like to have a gander at this:
>>http://perlmonks.org/?node_id=146303
>>look forward to seeing your replies!!
>
>--
>-
>Medi Montaseri   [EMAIL PROTECTED]
>Unix Distributed Systems 
>EngineerHTTP://www.CyberShell.com
>CyberShell Engineering
>-

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/
















Re: here is a good modperl question on perlmonk

2002-03-05 Thread Valerio_Valdez Paolini


On Wed, 6 Mar 2002, Gunther Birznieks wrote:

> Philippe Chiasson had a really nice talk on setting up developer teams on 
> mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
> may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
> are interested in the details.

http://gozer.ectoplasm.org/Conferences/ApacheCon2001US/DevEnv/handouts/rel_html/

Bye, Valerio





Re: here is a good modperl question on perlmonk

2002-03-05 Thread Perrin Harkins

Medi Montaseri wrote:
> Caller can also buy some content management software like Interwoven's 
> TeamSite
> product that provides a virtual workarea, for about $300,000.

It's so easy and effective to run mod_perl on developers' personal 
machines, I think there's no excuse not to do it.

At eToys we also set up a special server for HTML template coders to 
work on.  It had a virtual host for each coder, and each of them used 
their own docroot which they synched with a shared CVS repository using 
WinCVS.  They accessed files over a Samba share, so it was seamless for 
them.

This was pretty effective, and provided almost exactly the same thing 
that Interwoven sells.  Interwoven does add some workflow tools, but 
most people I've talked to don't seem to use them.  Maybe if they did 
get used that would provide more value.

- Perrin




Re: here is a good modperl question on perlmonk

2002-03-05 Thread Gunther Birznieks

Philippe Chiasson had a really nice talk on setting up developer teams on 
mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You 
may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you 
are interested in the details.

Later,
   Gunther

At 07:43 AM 3/6/2002, Medi Montaseri wrote:
>Caller wirtes
>
> > we've just migrated our 80K line pure perl web application to 
> mod_perl...ah...
> > so much aster... can anyone advise on their experiences for setting up
> > apache/mod_perl for team development? up till now, we've all been running
> > our own copy of sources out of our home directories, and running a 
> separate
> > apache instance for each developer seems like overkill
>
>Source Control or Revision Control will always be there, no matter if you 
>work
>out of one box or many boxes. Further I don't see anything different about 
>mod_perl
>vs C++. There are all source codes.
>
>My suggestion would be to install a Linux on your developer's PC and keep
>with the distributed model. Now everyone can use a common web tree and
>at integeration, bring all of them to a staging box, QC it and ship it to 
>production.
>
>Caller can also buy some content management software like Interwoven's 
>TeamSite
>product that provides a virtual workarea, for about $300,000.  Its always 
>Make or Buy.
>Isn't it.
>
>clayton cottingham wrote:
>>thought someone might like to have a gander at this:
>>http://perlmonks.org/?node_id=146303
>>look forward to seeing your replies!!
>
>--
>-
>Medi Montaseri   [EMAIL PROTECTED]
>Unix Distributed Systems 
>EngineerHTTP://www.CyberShell.com
>CyberShell Engineering
>-

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/




Re: here is a good modperl question on perlmonk

2002-03-05 Thread Paul Lindner

On Tue, Mar 05, 2002 at 04:53:56PM -0600, Dave Rolsky wrote:
> On Tue, 5 Mar 2002, Medi Montaseri wrote:
> 
> > My suggestion would be to install a Linux on your developer's PC and
> > keep with the distributed model. Now everyone can use a common web tree
> > and at integeration, bring all of them to a staging box, QC it and ship
> > it to production.
> 
> Giving everyone their own Apache daemon, which uses their checked out tree
> of code, on a central dev server is really not a problem either.

One other tip... write a small script (or modify apachectl) to start
apache with a port number matched to your unix UID.  This keeps
developers from using clashing port numbers.

  httpd -c "Port $UID" -c "Listen $UID"

etc..

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: here is a good modperl question on perlmonk

2002-03-05 Thread Dave Rolsky

On Tue, 5 Mar 2002, Medi Montaseri wrote:

> My suggestion would be to install a Linux on your developer's PC and
> keep with the distributed model. Now everyone can use a common web tree
> and at integeration, bring all of them to a staging box, QC it and ship
> it to production.

Giving everyone their own Apache daemon, which uses their checked out tree
of code, on a central dev server is really not a problem either.


-dave

/*==
www.urth.org
we await the New Sun
==*/




Re: here is a good modperl question on perlmonk

2002-03-05 Thread Medi Montaseri


Caller wirtes
> we've just migrated our 80K line pure perl web application to mod_perl...ah...
> so much aster... can anyone advise on their experiences for setting
up
> apache/mod_perl for team development? up till now, we've all been
running
> our own copy of sources out of our home directories, and running
a separate
> apache instance for each developer seems like overkill
Source Control or Revision Control will always be there, no matter if
you work
out of one box or many boxes. Further I don't see anything different
about mod_perl
vs C++. There are all source codes.
My suggestion would be to install a Linux on your developer's PC and
keep
with the distributed model. Now everyone can use a common web tree
and
at integeration, bring all of them to a staging box, QC it and ship
it to production.
Caller can also buy some content management software like Interwoven's
TeamSite
product that provides a virtual workarea, for about $300,000. 
Its always Make or Buy.
Isn't it.
clayton cottingham wrote:
thought someone might like to have a gander at this:
http://perlmonks.org/?node_id=146303
look forward to seeing your replies!!

-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems Engineer    HTTP://www.CyberShell.com
CyberShell Engineering
-
 


Re: mod_perl training companies?

2002-03-05 Thread Rich Bowen

On Tue, 5 Mar 2002, Stas Bekman wrote:

> I'm compiling a list of companies giving mod_perl training for our new
> mod_perl site. Currently I have only:
>
> http://training.gbdirect.co.uk/courses/linux/customized_and_bespoke.html
>
> If you know of other companies please send me the URL of the page
> advertising the mod_perl courses.

My company, Cooper McGregor does a mod_perl training course. Our
training page is located at http://coopermcgregor.com/training/  The
course outline for the mod_perl course should be put up there today,
since, for some reason, the web site guy did not have a copy of it
before.

-- 
http://www.CooperMcGregor.com/
Apache Support and Training




RE: Breaks in mod_perl, works in Perl

2002-03-05 Thread Mark Hazen

Paul,

You are onto something here.  I used your method, and was able to get the
following:
DBI -> DBI->Apache::DBI::connect(DBI:mysql:db:localhost, username, ) DBI
<- connect= Apache::DBI::db=HASH(0x842d608)

into the variable.  But the full trace output is:
-> DBI->Apache::DBI::connect(DBI:mysql:db:localhost, username, )
<- FETCH= 'mysql' ('Name' from cache) at DBI.pm line 64
<- ping= 1 at DBI.pm line 112
<- STORE('RaiseError' 0 ...)= 1 at DBI.pm line 451
<- STORE('PrintError' 0 ...)= 1 at DBI.pm line 451
<- STORE('AutoCommit' 1 ...)= 1 at DBI.pm line 451

It also would disappear between requests.  In other words, as I reloaded the
script, about half the time, the variable would be completely blank, and
another half it would be what I mentioned above.

Thanks
Mark

-Original Message-
From: Paul Lindner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:41 PM
To: Mark Hazen
Cc: [EMAIL PROTECTED]
Subject: Re: Breaks in mod_perl, works in Perl


I'm not sure if this will work, but you might override DBI's notion of
a trace function.  If you look in DBI.pm you'll see this line:

  *trace_msg = \&DBD::_::common::trace_msg;

It appears that DBI uses the trace_msg function in the bowels of DBD
to actually do the printing.  Now, you can very likely override this
with something else..  Perhaps something like this:

use DBI;
.
my $output;
my $oldhandle;
sub capture {
  $output .= join('', @_);
}

*DBI::trace_msg = \&capture;

$dbh = .
# etc...


In an ideal world you could just subclass DBI and redefine the trace
message, alas DBI uses this construct quite often:

  DBI->trace_msg(...)



On Tue, Mar 05, 2002 at 01:14:11PM -0700, Mark Hazen wrote:
> I am hoping there is a someone brilliant on this list that can help me.  A
> little while ago, I posted to clp.perl asking how I can capture the trace
> output from DBI into a variable.  Since DBI is an external process, I
> couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
> module called IO::Capture (see below).  It works amazingly well in
standard
> Perl.  Here is a sample script:
>
> use IO::Capture;
> $capturer = IO::Capture->new(\*STDERR);
>
> use DBI;
> $dbh = DBI->connect ("DBI:mysql:test:localhost", "username", "password", {
> RaiseError => 0, PrintError => 0 });
>
> DBI->trace( 1 );
>
> $sth = $dbh->prepare (qq{
>  CREATE TABLE IF NOT EXISTS test_table
>  (
> a CHAR(15) NOT NULL,
> b INT UNSIGNED NOT NULL
>  )
>  });
> $sth->execute ();
> $sth->finish ();
>
> $dbh->disconnect ();
>
> $text = $capturer->capture;
>
> print qq{
> Output is:
> $text
> };
>
>
>
> The problem is that once I try this script through mod_perl, it hangs the
> child process infinitely.  And then on subsequent requests, it has to
create
> a new process.  This eventually results in the whole machine spiraling
down
> because hundreds of Apache children are hung.  What I am hoping is that
> someone will spot something that neither Ben nor I have been able to spot.
> The module appears after my name.
>
> Thanks for any help you can provide.
> Mark
>
>
> package IO::Capture;
> use strict;
> use warnings;
> use Symbol qw(gensym);
>
> sub new {
>(my ($class, $filehandle) = @_) == 2
>or croak("Usage: IO::Capture->new(\$filehandle)");
>if( ref $filehandle or ref \$filehandle eq "GLOB" ) {
>   $filehandle = \*$filehandle; # this is a sort of typecast.
>} else {
>   $filehandle = caller() . "::" . $filehandle
>   unless $filehandle =~ /::/ or
>   $filehandle =~ /^STD(?:IN|OUT|ERR)\z/;
>   no strict 'refs';
>   $filehandle = \*$filehandle;
>}
>defined(fileno $filehandle)
>or croak("Argument to IO::Capture->new has no fileno()");
>my $save = gensym;
>open $save, ">&".fileno($filehandle)
>   or die sprintf("Couldn't dup2(%s,%s): $!\n",
>  fileno($save),fileno($filehandle));
>my  ($getresponse, $sendresponse) = (gensym, gensym);
>pipe($getresponse, $sendresponse) or die "pipe: $!";
>my  ($readnew, $writenew) = (gensym, gensym);
>pipe($readnew, $writenew) or die "pipe: $!";
>open( $filehandle, ">&" . fileno($writenew) )
>   or die sprintf("Couldn't dup2(%s,%s): $!\n",
>  fileno($filehandle),fileno($writenew));
>close($writenew);
>defined( my $pid = fork ) or do {
>   my $err = $!;
>   unless( open $filehandle, ">&".fileno $save ) {
>  my $err2 = $!;
>  open STDERR, $^O =~ /win/i ? ">con" : ">/dev/tty"
>  if $filehandle == \*STDERR;
>  die "fork: $err, dup2: $err2";
>   }
>   die "fork: $err";
>};
># readnew, writenew, and sendresponse are automatically closed
># when we return here in the parent because they go out of scope,
># resulting in their their refcounts going to 0.
>return bless [$filehandle, $save, $getresponse, $pid], $class
>   if $pid;
>close($getresponse); # not used, so close it.
>close($wri

RE: Breaks in mod_perl, works in Perl

2002-03-05 Thread Mark Hazen

I am sorry for further confusion.  I am not creating tables a few hundred
times per minute.  I simply used a create table call to get some trace
output for my sample script.  Thinking that users may try the sample script,
there was a no way for me to know what tables might exist (that I could
select from).  So I used a CREATE TABLE.  Writing to memory, if done right,
shouldn't be a big deal.  Having the disk seek that often would flood my IO.

Thanks
Mark

-Original Message-
From: Robert Landrum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 2:14 PM
To: Mark Hazen; [EMAIL PROTECTED]
Subject: RE: Breaks in mod_perl, works in Perl


At 1:32 PM -0700 3/5/02, Mark Hazen wrote:
>I'm sorry I didn't explain an important component.  Since I am dealing with
>a few hundred requests per minute (this was got me onto mod_perl to begin
>with), then using DBI's ability to write to a file would vastly overwhelm
my
>system.


I don't get it You don't mind trying to create tables a few
hundred times per minute, but creating a file is too much overhead?

And writing to memory is going to really bog the system.

Maybe you shouldn't be asking "why doesn't my capture work", but "how
can I debug some production code I have"...

Just a thought,

Rob



--
When I used a Mac, they laughed because I had no command prompt. When
I used Linux, they laughed because I had no GUI.




RE: Breaks in mod_perl, works in Perl

2002-03-05 Thread Robert Landrum

At 1:32 PM -0700 3/5/02, Mark Hazen wrote:
>I'm sorry I didn't explain an important component.  Since I am dealing with
>a few hundred requests per minute (this was got me onto mod_perl to begin
>with), then using DBI's ability to write to a file would vastly overwhelm my
>system.


I don't get it You don't mind trying to create tables a few 
hundred times per minute, but creating a file is too much overhead?

And writing to memory is going to really bog the system.

Maybe you shouldn't be asking "why doesn't my capture work", but "how 
can I debug some production code I have"...

Just a thought,

Rob



--
When I used a Mac, they laughed because I had no command prompt. When 
I used Linux, they laughed because I had no GUI.  



Re: Breaks in mod_perl, works in Perl

2002-03-05 Thread Perrin Harkins

Mark Hazen wrote:
> I'm sorry I didn't explain an important component.  Since I am dealing with
> a few hundred requests per minute (this was got me onto mod_perl to begin
> with), then using DBI's ability to write to a file would vastly overwhelm my
> system.

Won't capturing that much data in RAM instantly send your system into swap?

Anyway, you can probably get this to work if you can ask DBI to send to 
a filehandle and then use your magic IO::Capture on that filehandle. 
You just can't use STDERR because it's already magic.

By the way, at one point we used this DBI trace stuff at eToys.  It was 
fairly light on a fast file system like ext2fs.  The trick to making it 
really light is to fix it so that only one child process per machine had 
tracing turned on, which you can do with a little fussing with a .pid 
file and a ChildInitHandler and ChildExitHandler.  If you just need to 
see some trace output, you can use this technique.  On the other hand, 
your debugging may require seeing trace from every active process in 
which case this won't help.

- Perrin




Re: Breaks in mod_perl, works in Perl

2002-03-05 Thread Paul Lindner

I'm not sure if this will work, but you might override DBI's notion of
a trace function.  If you look in DBI.pm you'll see this line:

  *trace_msg = \&DBD::_::common::trace_msg;

It appears that DBI uses the trace_msg function in the bowels of DBD
to actually do the printing.  Now, you can very likely override this
with something else..  Perhaps something like this:

use DBI;
.
my $output;
my $oldhandle;
sub capture {
  $output .= join('', @_);
}

*DBI::trace_msg = \&capture;

$dbh = .
# etc...


In an ideal world you could just subclass DBI and redefine the trace
message, alas DBI uses this construct quite often:

  DBI->trace_msg(...)



On Tue, Mar 05, 2002 at 01:14:11PM -0700, Mark Hazen wrote:
> I am hoping there is a someone brilliant on this list that can help me.  A
> little while ago, I posted to clp.perl asking how I can capture the trace
> output from DBI into a variable.  Since DBI is an external process, I
> couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
> module called IO::Capture (see below).  It works amazingly well in standard
> Perl.  Here is a sample script:
> 
> use IO::Capture;
> $capturer = IO::Capture->new(\*STDERR);
> 
> use DBI;
> $dbh = DBI->connect ("DBI:mysql:test:localhost", "username", "password", {
> RaiseError => 0, PrintError => 0 });
> 
> DBI->trace( 1 );
> 
> $sth = $dbh->prepare (qq{
>  CREATE TABLE IF NOT EXISTS test_table
>  (
> a CHAR(15) NOT NULL,
> b INT UNSIGNED NOT NULL
>  )
>  });
> $sth->execute ();
> $sth->finish ();
> 
> $dbh->disconnect ();
> 
> $text = $capturer->capture;
> 
> print qq{
> Output is:
> $text
> };
> 
> 
> 
> The problem is that once I try this script through mod_perl, it hangs the
> child process infinitely.  And then on subsequent requests, it has to create
> a new process.  This eventually results in the whole machine spiraling down
> because hundreds of Apache children are hung.  What I am hoping is that
> someone will spot something that neither Ben nor I have been able to spot.
> The module appears after my name.
> 
> Thanks for any help you can provide.
> Mark
> 
> 
> package IO::Capture;
> use strict;
> use warnings;
> use Symbol qw(gensym);
> 
> sub new {
>(my ($class, $filehandle) = @_) == 2
>or croak("Usage: IO::Capture->new(\$filehandle)");
>if( ref $filehandle or ref \$filehandle eq "GLOB" ) {
>   $filehandle = \*$filehandle; # this is a sort of typecast.
>} else {
>   $filehandle = caller() . "::" . $filehandle
>   unless $filehandle =~ /::/ or
>   $filehandle =~ /^STD(?:IN|OUT|ERR)\z/;
>   no strict 'refs';
>   $filehandle = \*$filehandle;
>}
>defined(fileno $filehandle)
>or croak("Argument to IO::Capture->new has no fileno()");
>my $save = gensym;
>open $save, ">&".fileno($filehandle)
>   or die sprintf("Couldn't dup2(%s,%s): $!\n",
>  fileno($save),fileno($filehandle));
>my  ($getresponse, $sendresponse) = (gensym, gensym);
>pipe($getresponse, $sendresponse) or die "pipe: $!";
>my  ($readnew, $writenew) = (gensym, gensym);
>pipe($readnew, $writenew) or die "pipe: $!";
>open( $filehandle, ">&" . fileno($writenew) )
>   or die sprintf("Couldn't dup2(%s,%s): $!\n",
>  fileno($filehandle),fileno($writenew));
>close($writenew);
>defined( my $pid = fork ) or do {
>   my $err = $!;
>   unless( open $filehandle, ">&".fileno $save ) {
>  my $err2 = $!;
>  open STDERR, $^O =~ /win/i ? ">con" : ">/dev/tty"
>  if $filehandle == \*STDERR;
>  die "fork: $err, dup2: $err2";
>   }
>   die "fork: $err";
>};
># readnew, writenew, and sendresponse are automatically closed
># when we return here in the parent because they go out of scope,
># resulting in their their refcounts going to 0.
>return bless [$filehandle, $save, $getresponse, $pid], $class
>   if $pid;
>close($getresponse); # not used, so close it.
>close($writenew); # MUST close this, or deadlock will occur!
># MUST close or re-open $filehandle, or deadlock will occur!
>$filehandle == \*STDERR and (
>   open STDERR, ">&".fileno $save or
>   open STDERR, $^O =~ /win/i ? ">con" : ">/dev/tty"
>) or close $filehandle;
>close $save; # not used from here on, so close it.
>my ($got, $n) = "";
>1 while $n = sysread $readnew, $got, 4096, length $got;
>die "sysread: $!" unless defined $n;
>print $sendresponse $got or die "print: $!";
>exit;
> }
> 
> sub capture {
>my $self = shift;
>my ($fh, $saved, $get, $pid) = splice @$self, 0;
>unless( open $fh, ">&" . fileno $saved ) {
>   open $fh, $^O =~ /win/i ? ">con" : ">/dev/tty"
>  if $fh == \*STDERR;
>   die "Couldn't restore filehandle: $!";
>} else { close $saved }
>my ($got, $n) = "";
>while($n = sysread $get, $got, 4096, length $got) {}
>defined($n) or die "sysread: $!";
>if( waitpid $pid, 0 ) {
> 

RE: Breaks in mod_perl, works in Perl

2002-03-05 Thread Mark Hazen

I'm sorry I didn't explain an important component.  Since I am dealing with
a few hundred requests per minute (this was got me onto mod_perl to begin
with), then using DBI's ability to write to a file would vastly overwhelm my
system.

Thanks
Mark

-Original Message-
From: Robert Landrum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:25 PM
To: Mark Hazen; [EMAIL PROTECTED]
Subject: Re: Breaks in mod_perl, works in Perl


At 1:14 PM -0700 3/5/02, Mark Hazen wrote:
>I am hoping there is a someone brilliant on this list that can help me.  A
>little while ago, I posted to clp.perl asking how I can capture the trace
>output from DBI into a variable.  Since DBI is an external process, I
>couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
>module called IO::Capture (see below).  It works amazingly well in standard
>Perl.  Here is a sample script:



Maybe I'm just crazy but wouldn't this be simpler?

use DBI;
$dbh = DBI->connect ("DBI:mysql:test:localhost", "username", "password", {
RaiseError => 0, PrintError => 0 });

$filename = "/tmp/dbi_".$$.time().rand(1).".trace";

DBI->trace( 1, $filename );

$sth = $dbh->prepare (qq{
  CREATE TABLE IF NOT EXISTS test_table
  (
 a CHAR(15) NOT NULL,
 b INT UNSIGNED NOT NULL
  )
  });
$sth->execute ();
$sth->finish ();

$dbh->disconnect ();


print qq{
Output is:
};

open(FILE,$filename);
print while();
close(FILE);

The problem with the module listed is that it does some filehandle
munging on what is already a munged filehandler.  Meaning, it looks
like a filehandle, but it's really just a hook into something apache
is going to use to output stuff to the error log.

Hope that helps...

Rob

--
When I used a Mac, they laughed because I had no command prompt. When
I used Linux, they laughed because I had no GUI.




Re: Breaks in mod_perl, works in Perl

2002-03-05 Thread Robert Landrum

At 1:14 PM -0700 3/5/02, Mark Hazen wrote:
>I am hoping there is a someone brilliant on this list that can help me.  A
>little while ago, I posted to clp.perl asking how I can capture the trace
>output from DBI into a variable.  Since DBI is an external process, I
>couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
>module called IO::Capture (see below).  It works amazingly well in standard
>Perl.  Here is a sample script:



Maybe I'm just crazy but wouldn't this be simpler?

use DBI;
$dbh = DBI->connect ("DBI:mysql:test:localhost", "username", "password", {
RaiseError => 0, PrintError => 0 });

$filename = "/tmp/dbi_".$$.time().rand(1).".trace";

DBI->trace( 1, $filename );

$sth = $dbh->prepare (qq{
  CREATE TABLE IF NOT EXISTS test_table
  (
 a CHAR(15) NOT NULL,
 b INT UNSIGNED NOT NULL
  )
  });
$sth->execute ();
$sth->finish ();

$dbh->disconnect ();


print qq{
Output is:
};

open(FILE,$filename);
print while();
close(FILE);

The problem with the module listed is that it does some filehandle 
munging on what is already a munged filehandler.  Meaning, it looks 
like a filehandle, but it's really just a hook into something apache 
is going to use to output stuff to the error log.

Hope that helps...

Rob

--
When I used a Mac, they laughed because I had no command prompt. When 
I used Linux, they laughed because I had no GUI.  



Breaks in mod_perl, works in Perl

2002-03-05 Thread Mark Hazen

I am hoping there is a someone brilliant on this list that can help me.  A
little while ago, I posted to clp.perl asking how I can capture the trace
output from DBI into a variable.  Since DBI is an external process, I
couldn't do it just by piping STDERR.  Benjamin Goldberg came up with a
module called IO::Capture (see below).  It works amazingly well in standard
Perl.  Here is a sample script:

use IO::Capture;
$capturer = IO::Capture->new(\*STDERR);

use DBI;
$dbh = DBI->connect ("DBI:mysql:test:localhost", "username", "password", {
RaiseError => 0, PrintError => 0 });

DBI->trace( 1 );

$sth = $dbh->prepare (qq{
 CREATE TABLE IF NOT EXISTS test_table
 (
a CHAR(15) NOT NULL,
b INT UNSIGNED NOT NULL
 )
 });
$sth->execute ();
$sth->finish ();

$dbh->disconnect ();

$text = $capturer->capture;

print qq{
Output is:
$text
};



The problem is that once I try this script through mod_perl, it hangs the
child process infinitely.  And then on subsequent requests, it has to create
a new process.  This eventually results in the whole machine spiraling down
because hundreds of Apache children are hung.  What I am hoping is that
someone will spot something that neither Ben nor I have been able to spot.
The module appears after my name.

Thanks for any help you can provide.
Mark


package IO::Capture;
use strict;
use warnings;
use Symbol qw(gensym);

sub new {
   (my ($class, $filehandle) = @_) == 2
   or croak("Usage: IO::Capture->new(\$filehandle)");
   if( ref $filehandle or ref \$filehandle eq "GLOB" ) {
  $filehandle = \*$filehandle; # this is a sort of typecast.
   } else {
  $filehandle = caller() . "::" . $filehandle
  unless $filehandle =~ /::/ or
  $filehandle =~ /^STD(?:IN|OUT|ERR)\z/;
  no strict 'refs';
  $filehandle = \*$filehandle;
   }
   defined(fileno $filehandle)
   or croak("Argument to IO::Capture->new has no fileno()");
   my $save = gensym;
   open $save, ">&".fileno($filehandle)
  or die sprintf("Couldn't dup2(%s,%s): $!\n",
 fileno($save),fileno($filehandle));
   my  ($getresponse, $sendresponse) = (gensym, gensym);
   pipe($getresponse, $sendresponse) or die "pipe: $!";
   my  ($readnew, $writenew) = (gensym, gensym);
   pipe($readnew, $writenew) or die "pipe: $!";
   open( $filehandle, ">&" . fileno($writenew) )
  or die sprintf("Couldn't dup2(%s,%s): $!\n",
 fileno($filehandle),fileno($writenew));
   close($writenew);
   defined( my $pid = fork ) or do {
  my $err = $!;
  unless( open $filehandle, ">&".fileno $save ) {
 my $err2 = $!;
 open STDERR, $^O =~ /win/i ? ">con" : ">/dev/tty"
 if $filehandle == \*STDERR;
 die "fork: $err, dup2: $err2";
  }
  die "fork: $err";
   };
   # readnew, writenew, and sendresponse are automatically closed
   # when we return here in the parent because they go out of scope,
   # resulting in their their refcounts going to 0.
   return bless [$filehandle, $save, $getresponse, $pid], $class
  if $pid;
   close($getresponse); # not used, so close it.
   close($writenew); # MUST close this, or deadlock will occur!
   # MUST close or re-open $filehandle, or deadlock will occur!
   $filehandle == \*STDERR and (
  open STDERR, ">&".fileno $save or
  open STDERR, $^O =~ /win/i ? ">con" : ">/dev/tty"
   ) or close $filehandle;
   close $save; # not used from here on, so close it.
   my ($got, $n) = "";
   1 while $n = sysread $readnew, $got, 4096, length $got;
   die "sysread: $!" unless defined $n;
   print $sendresponse $got or die "print: $!";
   exit;
}

sub capture {
   my $self = shift;
   my ($fh, $saved, $get, $pid) = splice @$self, 0;
   unless( open $fh, ">&" . fileno $saved ) {
  open $fh, $^O =~ /win/i ? ">con" : ">/dev/tty"
 if $fh == \*STDERR;
  die "Couldn't restore filehandle: $!";
   } else { close $saved }
   my ($got, $n) = "";
   while($n = sysread $get, $got, 4096, length $got) {}
   defined($n) or die "sysread: $!";
   if( waitpid $pid, 0 ) {
  warn sprintf "Child exited with code 0x%04X", $? if $?;
   } else { warn "waitpid: $!" } return $got;
}

# like using autouse.pm but even more lightweight.
sub croak {
   undef &croak;
   require Carp;
   *croak = \&Carp::croak;
   goto &croak;
}

1;
__END__
perl -MIO::Capture
   $x = IO::Capture->new(\*STDERR);
   print "now capturing\n";
   warn qq[captured ok\n];
   print "captured text 'captured ok' shouldn't have appeard\n";
   $y = $x->capture;
   print "capture didn't block\n";
   print $y;
   warn "Restored ok\n";
__END__
now capturing
captured text 'captured ok' shouldn't have appeard
capture didn't block
captured ok
Restored ok

perl -MIO::Capture
   $x = IO::Capture->new(\*STDERR);
   print "now capturing\n";
   system(q[perl -e "print STDERR qq[captured ok\n]"]);
   print "captured text 'captured ok' shouldn't have appeard\n";
   $y = $x->capture;
   print "capture didn't block\n";
   print $y;
   warn "Restored ok\n";
__END__
now ca

here is a good modperl question on perlmonk

2002-03-05 Thread clayton cottingham

thought someone might like to have a gander at this:
http://perlmonks.org/?node_id=146303
look forward to seeing your replies!!



RE: Multiple Location directives question

2002-03-05 Thread Rob Bloodgood

> Answering my own question, I stupidly forgot that I had a TransHandler up
> above mucking my URLs before the Location directives got a chance
> to try to match.  So my /foo location block was never seeing a /foo URL.
>
> Still, I'm glad to see that the old system of "post to a public list and
> then immediately find your dumb error" still works like a charm :)

Well, my response has just left the building, and the only thing I can think
of right now (about my hasty response) is something I once saw on FidoNet:

"Open mouth, insert foot, echo internationally."



L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;





RE: Multiple Location directives question

2002-03-05 Thread Rob Bloodgood

> >>What I want is for My::Foo to handle all URLs that start with "/foo",
> >>without any authentication of any kind.  Then I want the
> remaining URLs to
> >>be handled by My::Bar using its authentication handlers.
>
> Seems like it should work to me.
>
> > this may be one of those cases where "/" is handled as a special case.
>
> Or maybe it's because there is no actual document there?  Maybe
> installing a transhandler would help.
>
> PerlTransHandler  Apache::OK

A TransHandler?

> But this is just a stab in the dark really.

OK am I the only one who see this as a nesting issue? HIS config, arranged
logically, starts with

> >>
> >>  SetHandler perl-script
> >>  PerlHandler My::Bar
> >>
> >>  AuthName Bar
> >>  AuthType Basic
> >>  PerlAuthenHandler My::Auth::Bar
> >>  PerlAuthzHandler  My::Authz::Bar
> >>  require valid-user
> >>

OK, we have set ALL URL's (because Auth nests) to be under My::Auth*::Bar.
But below, we want to NOT be under THAT realm for /foo, so:

> >>
> >>  SetHandler perl-script
> >>  PerlHandler My::Foo
AuthName OK
  AuthType Basic
  PerlAuthenHandler Apache::Constants::OK
  PerlAuthzHandler  Apache::Constants::OK
> >>

We've now overriden the higher-level of auth.

I have NOT tested this... lemme know!

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;





Re: documentation for mod_auth_mysql

2002-03-05 Thread Vivek Khera

> "GB" == Grant Babb <[EMAIL PROTECTED]> writes:

GB> i am having no luck locating the documentation for
GB> mod_auth_mysql.  any help would be greatly appreciated.  thanks in
GB> advance- grant

mod_auth_mysql is not implemented in mod_perl, so I'm not sure why you
ask here.

anyway, my version of mod_auth_mysql is self-documented within the
source file.  there are some more instructions at
ftp://ftp.kcilink.com/pub

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Multiple Location directives question

2002-03-05 Thread John Siracusa

Answering my own question, I stupidly forgot that I had a TransHandler up
above mucking my URLs before the Location directives got a chance to try to
match.  So my /foo location block was never seeing a /foo URL.

Still, I'm glad to see that the old system of "post to a public list and
then immediately find your dumb error" still works like a charm :)

-John




Re: Multiple Location directives question

2002-03-05 Thread Perrin Harkins

Geoffrey Young wrote:
> John Siracusa wrote:
> 
>>I have something like:
>>
>>
>>  SetHandler perl-script
>>  PerlHandler My::Foo
>>
>>
>>
>>  SetHandler perl-script
>>  PerlHandler My::Bar
>>
>>  AuthName Bar
>>  AuthType Basic
>>  PerlAuthenHandler My::Auth::Bar
>>  PerlAuthzHandler  My::Authz::Bar
>>  require valid-user
>>
>>
>>What I want is for My::Foo to handle all URLs that start with "/foo",
>>without any authentication of any kind.  Then I want the remaining URLs to
>>be handled by My::Bar using its authentication handlers.

Seems like it should work to me.

> this may be one of those cases where "/" is handled as a special case.

Or maybe it's because there is no actual document there?  Maybe 
installing a transhandler would help.

PerlTransHandler  Apache::OK

But this is just a stab in the dark really.

- Perrin




Re: Multiple Location directives question

2002-03-05 Thread John Siracusa

On 3/5/02 11:58 AM, Geoffrey Young wrote:
> you might want to set up
> 
> /foo
> 
> and 
> 
> /bar 
> 
> then use mod_rewrite or something to map !/foo to /bar

Ug, there has to be another way... :-/

-John




Re: Apache::DB patch

2002-03-05 Thread Stas Bekman

Enrico Sorcinelli wrote:

>>>
>>>2) I use the ptkdb 'File' menu command "Close Window and Run" (but I've added this 
>in the button bar) instead of "Run". In this case at the end of code, the debugger 
>won't hang and the window will closed. Note that if there are breakpoint, the window 
>will be closed and re-opened and all breakpoint are maintained (it is more convenient 
>to use 'Close Window and Run' only after last breakpoint).
>>>
>>Cool! Any chance you can submit a patch to the author of ptkdb so we can 
>>all benefit from this trick? CC'ing mod_perl list will be useful too.
>>
> 
> I've attached the patch to this e-mail. Also I will submit to the author asap.
> Note: the patch only add a short cut for "Close Window and Run" as "Run and Exit" in 
>main button bar (type 'patch -p0 < Devel-ptkdb-1.1074-patch' in the same dir of 
>Devel/ptkdb.pm)

Thanks Enrico!

Can you please email me/list the outcome of this submission to the 
author of ptkdb. If nothing happens I'll simply include the patch in the 
guide, but I really hope that the module gets fixed.

>>I wish someone with perl/Tk knowledge could solve the hanging problem.
>>
>>
> 
> I wish me too!
> After a brief ptkdb.pm code analysis, I've seen that the debugger seems to hang, 
>after last 'Run' command, in Tk::DoOneEvent(0) call (main_loop sub, line 2922).

Any mod_perl/Tk gurus to look at the problem?


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Multiple Location directives question

2002-03-05 Thread Geoffrey Young

John Siracusa wrote:
> 
> I have something like:
> 
> 
>   SetHandler perl-script
>   PerlHandler My::Foo
> 
> 
> 
>   SetHandler perl-script
>   PerlHandler My::Bar
> 
>   AuthName Bar
>   AuthType Basic
>   PerlAuthenHandler My::Auth::Bar
>   PerlAuthzHandler  My::Authz::Bar
>   require valid-user
> 
> 
> What I want is for My::Foo to handle all URLs that start with "/foo",
> without any authentication of any kind.  Then I want the remaining URLs to
> be handled by My::Bar using its authentication handlers.
> 
> What I get is that My::Bar handles everything.  Changing the order of the
> Location directives doesn't seem to help.  The Apache docs say that Location
> directives are "done simultaneously", whatever that means.

this may be one of those cases where "/" is handled as a special case.  as I've said 
before, it
seems people who set up / seem to get into trouble, but I never have a clear picture 
as to why
(other than this nagging feeling, like a splinter in my mind)...

you might want to set up 

/foo

and 

/bar 

then use mod_rewrite or something to map !/foo to /bar

HTH

--Geoff



Multiple Location directives question

2002-03-05 Thread John Siracusa

I have something like:


  SetHandler perl-script
  PerlHandler My::Foo



  SetHandler perl-script
  PerlHandler My::Bar

  AuthName Bar
  AuthType Basic
  PerlAuthenHandler My::Auth::Bar
  PerlAuthzHandler  My::Authz::Bar
  require valid-user


What I want is for My::Foo to handle all URLs that start with "/foo",
without any authentication of any kind.  Then I want the remaining URLs to
be handled by My::Bar using its authentication handlers.

What I get is that My::Bar handles everything.  Changing the order of the
Location directives doesn't seem to help.  The Apache docs say that Location
directives are "done simultaneously", whatever that means.

So, any pointers?

-John




Re: Fwd: Re: Problem installing Apache::Request

2002-03-05 Thread Perrin Harkins

Corey Holzer wrote:
>> 1. Redownloaded the source tar ball for the version of Apache that I am
>> running on my Linux RH 7.2 box.
>>
>> 2. untar'ed the source tar ball for apache.
>>
>> 3. Executed ./configure --with-apache-includes=the /src/includes
>> directory under the source dir for apache.

Between 2 and 3 you might have to actually build apache, or at least run 
its configuration scipt.  It probably needs to set up OS-dependent files.

- Perrin




Fwd: Re: Problem installing Apache::Request

2002-03-05 Thread Corey Holzer




>
>Here is what I did after reading your email:
>
>1. Redownloaded the source tar ball for the version of Apache that I am
>running on my Linux RH 7.2 box.
>
>2. untar'ed the source tar ball for apache.
>
>3. Executed ./configure --with-apache-includes=the /src/includes
>directory under the source dir for apache.
>
>Now I get the following error:
>Making all in c
>make[1]: Entering directory `/home/user/libapreq-1.0/c'
>/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
>-I/home/user/apache_1.3.22/src/include/-g -O2 -c apache_cookie.c
>mkdir .libs
>gcc -DHAVE_CONFIG_H -I. -I. -I. -I/home/user/apache_1.3.22/src/include/
>-g -O2 -Wp,-MD,.deps/apache_cookie.pp -c  -fPIC -DPIC apache_cookie.c -o
>.libs/apache_cookie.lo
>In file included from /home/user/apache_1.3.22/src/include/httpd.h:72,
> from apache_request.h:5,
> from apache_cookie.h:4,
> from apache_cookie.c:59:
>/home/user/apache_1.3.22/src/include/ap_config.h:77:28:
>ap_config_auto.h: No such file or directory
>In file included from /home/user/apache_1.3.22/src/include/httpd.h:72,
> from apache_request.h:5,
> from apache_cookie.h:4,
> from apache_cookie.c:59:
>/home/user/apache_1.3.22/src/include/ap_config.h:114:16: os.h: No such
>file or directory
>make[1]: *** [apache_cookie.lo] Error 1
>make[1]: Leaving directory `/home/user/libapreq-1.0/c'
>make: *** [all-recursive] Error 1
>
>4. Make install fail as well.
>
>Any suggestions?
>
>Original Message Follows
>From: Stas Bekman <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject: Re: Problem installing Apache::Request
>Date: Tue, 05 Mar 2002 18:14:55 +0800
>
>Corey Holzer wrote:
>
>>
>>I got this email address from the README file in libapreq-1.0.tar.gz and
>>I desperately need help to fix a problem that I am having when I try to
>>install Apache::Request.
>>
>>I have sucessfully installed all the mod_perl components, but, every
>>time I try to install Apache::Request I get the following error:
>>
>>apache_request.h:5:19: httpd.h: No such file or directory
>>apache_request.h:6:25: http_config.h: No such file or directory
>>apache_request.h:7:23: http_core.h: No such file or directory
>>apache_request.h:8:22: http_log.h: No such file or directory
>>apache_request.h:8:22: http_log.h: No such file or directory
>>apache_request.h:9:23: http_main.h: No such file or directory
>>apache_request.h:10:27: http_protocol.h: No such file or directory
>>apache_request.h:11:25: util_script.h: No such file or directory
>>apache_request.h:9:23: http_main.h: No such file or directory
>>apache_request.h:10:27: http_protocol.h: No such file or directory
>>apache_request.h:11:25: util_script.h: No such file or directory
>
>
>Reading docs usually helps:
>
>% more INSTALL
>
>--
>To install the Perl and C libraries, simply run:
>
>  perl Makefile.PL && make install
>
>The libapreq.a and header files will be installed in the Perl
>architecture dependent library.  See the Apache::libapreq module for
>routines that can be called by your application Makefile to find the
>include and linker arguments.
>
>To build libapreq without the Makefile.PL, run:
>
>  ./configure [--with-apache-includes=DIR] && make
>--
>
>so did you try:
>./configure --with-apache-includes=/wherever/your/apache/include/dir is
>make
>
>I apologize if you did read the doc ;). In that case you should have
>told us what have you done and not just post the errors without any
>context.
>
>>And the Module will not install.  Any help that you may provide would be
>>greatly appreciated.  If you are not the correct person to contact can
>>you let me know who I would need to speak with to get this resolved.
>>Thanks.
>
>
>_
>Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
>http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
>mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
>http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
>
>
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.;




Re: RegistryLoader Segmentation fault

2002-03-05 Thread Fran Fabrizio

Fran Fabrizio wrote:

> 
> Hello,
> 
> I'm trying to follow the script in section 2.14 of the book "mod_perl 
> Developer's Cookbook" in order to pre-load my Apache::registry scripts 
> using Apache::RegistryLoader.  I'm getting a seg fault when I attempt to 
> start apache.


This was the problem I was having last Friday.  Just wanted to post the 
results - the upgrade to Perl 5.6.1 solved the problem.  PERL_DEBUG=1 on 
mod_perl compilation was also very helpful.  Thanks to everyone for 
their help!

-Fran





Re: problems with $r->status('OK')

2002-03-05 Thread Issac Goldstand

You don't want to do that...
You want to do this:
use Apache::Constants qw(:common);

and then $r-status(OK); # (no quotes)

  Issac

- Original Message - 
From: "clayton cottingham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 6:47 PM
Subject: problems with $r->status('OK')


> hello:
> 
> im using Apache/1.3.12 
> and 
> mod_perl/1.24
> 
> every time i use 
> the $r->status('OK');
> 
> it gives me this error
> 
> Argument "OK" isn't numeric in subroutine entry 
> 
> has anyone come accross this before?
> 
> thanks
> 




RE: Apache-AuthenNTLM-0.14 for ssl VirtualHost

2002-03-05 Thread Umhang Juerg, IT2

hi
it works !!
best service both east and west of redmond :-))
merci
juerg umhang

   o | 
  /\_| Juerg UmhangWebergutstrasse 12
 /   | Informatik Post CH-3030 Bern
/\   | IT2 IE-NAS  Switzerland
   /_/_  | Tel: ++41 31 338 1473 
 | Mailto:[EMAIL PROTECTED]  Fax: ++41 31 338 7492


> -Original Message-
> From: Gerald Richter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 1:56 PM
> To: Umhang Juerg, IT2; [EMAIL PROTECTED]
> Subject: Re: Apache-AuthenNTLM-0.14 for ssl VirtualHost
> 
> 
> Hi,
> 
> NTLM needs KeepAlives turned on, because the handshake must 
> take place on
> the same connection, I guess you have turned KeepAlive off 
> for your ssl
> connection
> 
> Gerald
> 
> -
> Gerald Richterecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
> WWW:http://www.ecos.de  Fax:  +49 6133 925152
> -
> 
> - Original Message -
> From: "Umhang Juerg, IT2" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 05, 2002 12:46 PM
> Subject: Apache-AuthenNTLM-0.14 for ssl VirtualHost
> 
> 
> hi
> we are using AuthenNTLM from G. Richter to authenticate our 
> intranet users
> ... works fine for http-server.
> unfortunately it doesnt work with ssl aware virtual hosts.
> Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7
> OpenSSL/0.9.6c
> 
> client hangs :-(
> last entries in error.log
> AuthenNTLM: nonce=0Dv"g'î
> AuthenNTLM: Send header: NTLM
> TlRMTVNTUAACACgBggAAMER2ImcPke4AAA==
> 
> httpd.conf
> 
> PerlSetVar defaultdomain 
> PerlSetVar basicauthoritative on
> PerlSetVar ntlmdebug 1
> PerlAddVar ntdomain " pp bb"
> PerlAuthenHandler Apache::AuthenNTLM
> AuthName "Private Domain"
> AuthType ntlm,basic
> #
> require user \x
> 
> 
> something wrong with our config? works somewhere with ssl servers ?
> kind regards
> juerg umhang
> 
>o |
>   /\_| Juerg UmhangWebergutstrasse 12
>  /   | Informatik Post CH-3030 Bern
> /\   | IT2 IE-NAS  Switzerland
>/_/_  | Tel: ++41 31 338 1473
>  | Mailto:[EMAIL PROTECTED]  Fax: ++41 31 338 7492
> 
> 
> 
> 
> 




Re: Apache::MP3 requires "PerlSetupEnv on", patch to convert toApache::Request

2002-03-05 Thread Ask Bjoern Hansen

On Mon, 4 Mar 2002, Stas Bekman wrote:

[...] 
> Can CGI.pm detect that 'PerlSetupEnv Off' is in effect and die if that's 
> the case? for example by testing some env var that most likely should be 
> set with 'PerlSetupEnv On'? e.g.:

For now I have added that check to Apache::MP3.  (with warn instead
of die. If it goes into CGI.pm it shouldn't be with die, you might
want to use CGI.pm but not any of the functions that are using
%ENV).



 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/ !try; do();
more than a billion impressions per week, http://valueclick.com




Re: Apache-AuthenNTLM-0.14 for ssl VirtualHost

2002-03-05 Thread Gerald Richter

Hi,

NTLM needs KeepAlives turned on, because the handshake must take place on
the same connection, I guess you have turned KeepAlive off for your ssl
connection

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-

- Original Message -
From: "Umhang Juerg, IT2" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 12:46 PM
Subject: Apache-AuthenNTLM-0.14 for ssl VirtualHost


hi
we are using AuthenNTLM from G. Richter to authenticate our intranet users
... works fine for http-server.
unfortunately it doesnt work with ssl aware virtual hosts.
Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7
OpenSSL/0.9.6c

client hangs :-(
last entries in error.log
AuthenNTLM: nonce=0Dv"g'î
AuthenNTLM: Send header: NTLM
TlRMTVNTUAACACgBggAAMER2ImcPke4AAA==

httpd.conf

PerlSetVar defaultdomain 
PerlSetVar basicauthoritative on
PerlSetVar ntlmdebug 1
PerlAddVar ntdomain " pp bb"
PerlAuthenHandler Apache::AuthenNTLM
AuthName "Private Domain"
AuthType ntlm,basic
#
require user \x


something wrong with our config? works somewhere with ssl servers ?
kind regards
juerg umhang

   o |
  /\_| Juerg UmhangWebergutstrasse 12
 /   | Informatik Post CH-3030 Bern
/\   | IT2 IE-NAS  Switzerland
   /_/_  | Tel: ++41 31 338 1473
 | Mailto:[EMAIL PROTECTED]  Fax: ++41 31 338 7492







Apache-AuthenNTLM-0.14 for ssl VirtualHost

2002-03-05 Thread Umhang Juerg, IT2

hi
we are using AuthenNTLM from G. Richter to authenticate our intranet users
... works fine for http-server.
unfortunately it doesnt work with ssl aware virtual hosts.
Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7
OpenSSL/0.9.6c

client hangs :-(
last entries in error.log 
AuthenNTLM: nonce=0Dv"g'î
AuthenNTLM: Send header: NTLM
TlRMTVNTUAACACgBggAAMER2ImcPke4AAA==

httpd.conf

PerlSetVar defaultdomain 
PerlSetVar basicauthoritative on
PerlSetVar ntlmdebug 1
PerlAddVar ntdomain " pp bb"
PerlAuthenHandler Apache::AuthenNTLM
AuthName "Private Domain"
AuthType ntlm,basic
#
require user \x


something wrong with our config? works somewhere with ssl servers ?
kind regards
juerg umhang

   o | 
  /\_| Juerg UmhangWebergutstrasse 12
 /   | Informatik Post CH-3030 Bern
/\   | IT2 IE-NAS  Switzerland
   /_/_  | Tel: ++41 31 338 1473 
 | Mailto:[EMAIL PROTECTED]  Fax: ++41 31 338 7492





Re: Apache::DB patch

2002-03-05 Thread Enrico Sorcinelli

On Tue, 05 Mar 2002 10:00:56 +0800
Stas Bekman <[EMAIL PROTECTED]> wrote:

> Enrico Sorcinelli wrote:
> > On Fri, 01 Mar 2002 11:16:15 +0800
> > Stas Bekman <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Enrico Sorcinelli wrote:
> >>
> >>>Hi all,
> >>>I started to use Apache::DB (0.06) to interactively debug under mod_perl using 
>ptkdb. I see that is necessary to modify Apache/DB.pm but, after this, the debugger 
>will be run always under ptkdb. The little patch I propose to Apache/DB.pm is to 
>improve Apache to dinamically switch from command line to GUI (ptkdb) interface by 
>configuring this in httpd.conf.
> >>>
> >>Hi Enrico,
> >>
> >>Does it actually work for you? My previous experience with it wasn't so 
> >>good. I was manually loading Devel/ptkdb.pm instead of Apache/perl5db.pl
> >>and it'll work for the first request, but then will hang. I see that 
> >>ptkdb hasn't changed since the last time I've tried it. May be it's a 
> >>newer perlTk that works better now?
> >>
> >>
> > 
> > Dear Stas,
> > I know the hang problem (I've started to hack the ptkdb code but it is enough 
>complex...)
> > However I find the GUI debugger useful. My TEMPORARY workaround is:
> > 
> > 1) Initially (and if possible) I've used a brutal 'kill 9 $$' code in cleanup 
>handler
> > 
> > if (ref $r) {
> > $SIG{INT} = \&DB::catch;
> > $r->register_cleanup(sub { 
> > $SIG{INT} = \&DB::ApacheSIGINT();
> > 
>   kill 9, $$ if $ptkdb;
> 
> > });
> > }
> 
> Yup, tried that, but I didn't like that approach.

I agree with you, was only a drastic and immediate solution!

> 
> > then now
> > 
> > 2) I use the ptkdb 'File' menu command "Close Window and Run" (but I've added this 
>in the button bar) instead of "Run". In this case at the end of code, the debugger 
>won't hang and the window will closed. Note that if there are breakpoint, the window 
>will be closed and re-opened and all breakpoint are maintained (it is more convenient 
>to use 'Close Window and Run' only after last breakpoint).
> 
> Cool! Any chance you can submit a patch to the author of ptkdb so we can 
> all benefit from this trick? CC'ing mod_perl list will be useful too.

I've attached the patch to this e-mail. Also I will submit to the author asap.
Note: the patch only add a short cut for "Close Window and Run" as "Run and Exit" in 
main button bar (type 'patch -p0 < Devel-ptkdb-1.1074-patch' in the same dir of 
Devel/ptkdb.pm)

> 
> I wish someone with perl/Tk knowledge could solve the hanging problem.
> 

I wish me too!
After a brief ptkdb.pm code analysis, I've seen that the debugger seems to hang, after 
last 'Run' command, in Tk::DoOneEvent(0) call (main_loop sub, line 2922).

Yours

Enrico


=
Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a.
E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED]
=





Devel-ptkdb-1.1074-patch
Description: Binary data


Re: Problem installing Apache::Request

2002-03-05 Thread Stas Bekman

Corey Holzer wrote:
> 
> I got this email address from the README file in libapreq-1.0.tar.gz and 
> I desperately need help to fix a problem that I am having when I try to 
> install Apache::Request.
> 
> I have sucessfully installed all the mod_perl components, but, every 
> time I try to install Apache::Request I get the following error:
> 
> apache_request.h:5:19: httpd.h: No such file or directory
> apache_request.h:6:25: http_config.h: No such file or directory
> apache_request.h:7:23: http_core.h: No such file or directory
> apache_request.h:8:22: http_log.h: No such file or directory
> apache_request.h:8:22: http_log.h: No such file or directory
> apache_request.h:9:23: http_main.h: No such file or directory
> apache_request.h:10:27: http_protocol.h: No such file or directory
> apache_request.h:11:25: util_script.h: No such file or directory
> apache_request.h:9:23: http_main.h: No such file or directory
> apache_request.h:10:27: http_protocol.h: No such file or directory
> apache_request.h:11:25: util_script.h: No such file or directory

Reading docs usually helps:

% more INSTALL

--
To install the Perl and C libraries, simply run:

  perl Makefile.PL && make install

The libapreq.a and header files will be installed in the Perl
architecture dependent library.  See the Apache::libapreq module for
routines that can be called by your application Makefile to find the
include and linker arguments.

To build libapreq without the Makefile.PL, run:

  ./configure [--with-apache-includes=DIR] && make
--

so did you try:
./configure --with-apache-includes=/wherever/your/apache/include/dir is
make

I apologize if you did read the doc ;). In that case you should have 
told us what have you done and not just post the errors without any context.

> And the Module will not install.  Any help that you may provide would be 
> greatly appreciated.  If you are not the correct person to contact can 
> you let me know who I would need to speak with to get this resolved.  
> Thanks.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/