Re: Equiv Apache list to this list?

2002-04-12 Thread Eric

On Sat, Apr 13, 2002 at 12:06:53AM -0400, Eric Frazier wrote:
> Hi,
> 
> I have been having lots of questions about Apache recently, not many of them
> are really mod_perl questions, so what is the best place to post those? 
> 
> Thanks,
> 
> Eric 

See http://httpd.apache.org/lists.html .  It depends upon exactly what
you're looking for, but the 'User Support and Disscussion' list is
probably a good place to start.

Eric (no relation)



Equiv Apache list to this list?

2002-04-12 Thread Eric Frazier

Hi,

I have been having lots of questions about Apache recently, not many of them
are really mod_perl questions, so what is the best place to post those? 

Thanks,

Eric 

http://www.kwinternet.com/eric
(250) 655 - 9513 (PST Time Zone)

Learn about the net, not the .Net! 







Re: Apache::ServerUtil pb in modperl2

2002-04-12 Thread pascal barbedor

> Does the following, or some variation, work?
>
> ==
> package Apache::Test;
>
> # PerlModule Apache::Test
> # 
> #   SetHandler modperl
> #   PerlResponseHandler Apache::Test
> #   PerlSetVar TEST "jdjdsds"
> # 
>
> use strict;
>
> # based on t/conf/modperl_extra.pl in the mod_perl-2 sources
> use Apache::RequestRec ();
> use Apache::RequestIO ();
> use Apache::ServerUtil ();
> use Apache::RequestUtil ();
> use APR::Table;
> use Apache::Const -compile => qw(:common);
> use APR::Const -compile => qw(:common);
>
> sub handler {
> my $r = shift;
> my $key = $r->dir_config->get('TEST');
> $r->content_type('text/plain');
> $r->print($key);
> Apache::OK;
> }
>
> 1;
>
> ===
>
> best regards,
> randy kobes
>
>

yes it works perfectly well.

but you are accessing dir_config through a request object and in my example
I am accessing it through the server object in a "use module" in startup.pl


best regards
pascal









Re: mod_perl 1.99 (for Apache 2.0.35) building on W2K

2002-04-12 Thread pascal barbedor



Hi chuck
 
for DBI and DBD::xx it makes no difference if you 
use them with regular cgi modperl 1 or 2 because they are unrelated to web 
environment. (at least i suppose so a priori).
 
at least in my test they are used without problem 
in startup.pl.
 
for cgi.pm used outside modpelr with 2.0.35 no 
difference as well
and for cgi.pm used with modperl I don't 
know.
 i guess there is a difference, at 
least in the Apache::registry setup of the location to use the cgi like 
script 
 
pascal
 
 
 
 
 

  - Original Message - 
  From: 
  Chuck 
  Goehring 
  To: pascal barbedor 
  Sent: Saturday, April 13, 2002 5:11 
  AM
  Subject: Re: mod_perl 1.99 (for Apache 
  2.0.35) building on W2K
  
  Pascal and anyone else who can help,
   
  I've seen your other posts and I'm wondering how 
  your testing is going with "regular" cgi programs.  I don't use any of 
  the exotic mod_perl specifics, so I'm no help there.  I'll have to 
  "aquire" more facilities to setup like you have (nt boxes in short 
  supply). 
   
  I'm mostly concerned about the cgi.pm, dbi.pm 
  dbd::oracle etc.  
   
  Anybody know the impact that Apache 2.0 has on 
  these modules?
   
  Chuck
   
  
- Original Message - 
From: 
pascal barbedor 
To: Chuck 
Goehring 
Sent: Thursday, April 11, 2002 4:40 
AM
Subject: Re: mod_perl 1.99 (for Apache 
2.0.35) building on W2K

Hi I am trying to build modperl under 
win2k
saw your message.
don't know about your problem but 
:
 
i use already built asperl build 
631
I have built apache succesfully, but when 
trying to build modperl2
i am asked apxs
 
did you find the apxs program ?
thanks
 
pascal 
barbedor


Re: Apache::ServerUtil pb in modperl2

2002-04-12 Thread pascal barbedor




apache 2.0.35 / mod_perl 1.99_01 / winnt or win2k

I confirm that using a module in startup.pl consisting of

>use Data::Dumper ;
>use XML::LibXML() ;
>
>[1] use Apache::ServerUtil ;
>[2] my $s=Apache->server ;
>[3] my $base=$s->dir_config('some');
>[4] my $xml=XML::LibXML->new();
>[5] print Dumper $xml ;

>causes the line [3] to output message "Attempt to free
>unreferenced scalar"

>line [4] causes apache segfaults "unhandled exception
>perl56.dll" (XML::LibXML in version 1.31 or 1.40)

>line [5] is executed before apache stops
>$VAR1 = bless( {}, 'XML::LibXML' );

here is a backtrace in case useful

PERL56! 28021683()
PERL56! 28071c17()
PERL56! 2805c910()
PERL56! 2805c5b1()
PERL56! 2805c577()
PERL56! 2805c577()
PERL56! 2805c870()
PERL56! 2805ba24()
PERL56! 2800c882()
PERL56! 2805c7f3()
PERL56! 2805ba24()
PERL56! 2800c882()
PERL56! 2805b9fd()
PERL56! 2800c882()
PERL56! 2805b9fd()
PERL56! 2800c882()
PERL56! 2805b9fd()
PERL56! 2800c882()
PERL56! 2805c248()
PERL56! 2805d510()
PERL56! 2805d16f()
MOD_PERL! 10001fb3()
MOD_PERL! 10002a22()
MOD_PERL! 10001840()
MOD_PERL! 10001796()
ap_run_post_config(apr_pool_t * 0x0078a830, apr_pool_t * 0x007ba660,
apr_pool_t * 0x007bc6a8, server_rec * 0x007a2508) line 130 + 89 bytes
main(int 1, const char * const * 0x00782760) line 569 + 22 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e77903()


if I drop line [4] and [5], there is the line [3] message, but
apache does not seem to segfault.




pascal









Accédez au courrier électronique de La Poste : www.laposte.net ; 3615
LAPOSTENET (0,13 ?/mn) ; tél : 08 92 68 13 50 (0,34?/mn)"







Re: Enforcing user logged in from only 1 browser?

2002-04-12 Thread Peter Bi

To make a perfect system like this probably needs users to sign-off
faithfully by every session.

Peter Bi


- Original Message -
From: "Fran Fabrizio" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 1:22 PM
Subject: Enforcing user logged in from only 1 browser?


>
> Hello all,
>
> I'm looking for a straightforward approach to extend our AuthCookie
> sessioning to enforce that a user is only logged in from one browser at
> a time.  For us, it would suffice that if the user tries to log in from
> a 2nd browser, the first session would just be expired.
>
> I was thinking that upon login I could save the AuthCookie key in that
> user's db entry as current_session_key and I could blank it out when
> they explicitly log out.  Then during login, I would be able to see if
> there's another key still out there for them.  The tricky part for me is
> figuring out if that key is still an -active- session as opposed to
> having just left their browser open last night or something.  And also,
> if I do determine that it is another active one, how would I expire it?
>
> Anyone done this type of thing previously?
>
> Thanks,
> Fran
>
>




Re: couldn't spawn child process

2002-04-12 Thread Randy Kobes

On Fri, 12 Apr 2002, Ngoc Pham wrote:

> Hi,
>
> I have a test perl script:
>
> #!C:\Program Files\Perl\bin\perl.exe
> use CGI qw(:standard) ;
> print header();
> print "Hello, world";
>
> With apache_1.3.24-win32-x86-no_src.exe installation, the script runs fine.
> With apache_2.0.35-win32-x86-no_ssl.msi installation, error occurs: "The
> system cannot find the file specified.  : couldn't spawn child process:
> C:/Program Files/Apache Group/Apache2/cgi-bin/first.pl".
>
> Please help me figure this out. Thanks.
>

This is more of an Apache2 question - if the Apache2
documentation doesn't provide an answer, browsing through the
archives or asking on the comp.infosystems.www.servers.ms-windows
newsgroup may help.

best regards,
randy




Re: Apache::ServerUtil pb in modperl2

2002-04-12 Thread Randy Kobes

On Thu, 11 Apr 2002, pascal barbedor wrote:

> I have a problem with Apache::ServerUtil though :
>
> when using $s->dir_config('some') i have this message (and apache segfaults)
>
> "Attempt to free unreferenced scalar at .. line 17"
>
> i have installed modperl through ppd, so have not the t/report procedure
> i am under win2k ppd from theoryx5, ASperl build 631
>
> for now the only lines in httpd.conf concerning modperl are
>
> perlsetvar statpath path
> perlrequire startup.pl
>
> then,
> in startup.pl :
> use Apache2;
> use Apache::ServerUtil();
> use Apache::Const();
>
> use Mymodule();
> --
>
> in Mymodule.pm
>
> use Apache::ServerUtil;
> my $s=Apache->server;
> [and the incriminated line 17: ] my $base=$s->dir_config('StatPath');

Does the following, or some variation, work?

==
package Apache::Test;

# PerlModule Apache::Test
# 
#   SetHandler modperl
#   PerlResponseHandler Apache::Test
#   PerlSetVar TEST "jdjdsds"
# 

use strict;

# based on t/conf/modperl_extra.pl in the mod_perl-2 sources
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::ServerUtil ();
use Apache::RequestUtil ();
use APR::Table;
use Apache::Const -compile => qw(:common);
use APR::Const -compile => qw(:common);

sub handler {
my $r = shift;
my $key = $r->dir_config->get('TEST');
$r->content_type('text/plain');
$r->print($key);
Apache::OK;
}

1;

===

best regards,
randy kobes





[JOB] ModPerl developer at PrintMe.Com

2002-04-12 Thread siberian

I posted this a few months ago, got great response and was 
unable to follow-up on it immediately for a variety of 
reasons. The need has become critical so I am pursuing 
those who responded before and hoping to gather some new 
faces for interviews in the next two weeks.

John-

Here is the original posting :

We are building a next generation internet printing 
system here at Electronics For Imaging (EFII). The Web 
apps portion is heavily
Apache/ModPerl/HTML::Mason/Oracle based running under 
Linux and Solaris. I am looking for someone that can help 
round out the team and work on both back-end functionality 
as well as the front-facing support tools and user 
experience. Initially this position will consist of 
rounding out the e-commerce/ERP integration, developing 
new support tools, XML integration with other system 
components as well as 'modernizing' our initially 
developed architecture and helping to clean up the code 
base so that moving forward is not quite so painful.

EFI is a mid-sized( 1000 employees or so ) public company 
that is
doing just fine in the current market. We have not had any 
lay-off's and are growing at a comfortable rate. All in 
all its a comfortable place to weather this storm. The 
PrintMe team runs as an 'internal startup', that means its 
pretty relaxed and divorced from many of the day-to-day 
issues that would normally come with working in a larger 
company.

Looking for the usual skill-set, experience with 
mod-perl/apache,
ability to build your own architecture and framework from 
the ground-up and the ability to write code that plays 
well with others. I really enjoy people that come to the 
table with an overall understanding of how things work 
together and a somewhat proven track record. 

If your interested drop me an email. We are located in 
Foster City, CA, just south of San Francisco. I am only 
considering local, non-telecommuters at this time, this 
project is to fast moving for people to not be in the 
office day to day.

See us on the web at http://www.printme.com/ or 
http://www.efi.com/.


John-



Re: Enforcing user logged in from only 1 browser?

2002-04-12 Thread gphat

How are you handling your sessions?  I use Apache::Session::Postgres.

In my scenario, if I needed to do this, I would check the list of valid 
sessions I have for one that exists for the user.  ie, if 'gphat' tries to 
login, I check to see if any of the sessions the db are for user gphat.  If so, 
eliminate it and create a new one.

Using an Apache::Session might not be the answer, as you'd have to check each 
active session.  Depending on the situation, that might not be acceptable.

You could roll your own session handling, it's not that hard.  Then add a 
username field to the session table, so you can index and search by it.

> Hello all,
> 
> I'm looking for a straightforward approach to extend our AuthCookie 
> sessioning to enforce that a user is only logged in from one browser at 
> a time.  For us, it would suffice that if the user tries to log in from 
> a 2nd browser, the first session would just be expired.
> 
> I was thinking that upon login I could save the AuthCookie key in that 
> user's db entry as current_session_key and I could blank it out when 
> they explicitly log out.  Then during login, I would be able to see if 
> there's another key still out there for them.  The tricky part for me is 
> figuring out if that key is still an -active- session as opposed to 
> having just left their browser open last night or something.  And also, 
> if I do determine that it is another active one, how would I expire it?
> 
> Anyone done this type of thing previously?
> 
> Thanks,
> Fran
> 
> 






Re: Enforcing user logged in from only 1 browser?

2002-04-12 Thread leibniz

perhaps you can generate a new session id for each page displayed.
for example a user logs in. he gets $sess_id1. automatically the session id
gets changed to $sess_id2 and all the links from that page contain the
second one.
so if he clicks somewhere on the page he will go on to a page with the new
session id
while you generate a third one ,$sess_id3. and so on...
i'm not sure about what you mean about another browser.
another browser window or another browser program.
you can always check their enviroment variables and see if it matches the
previous entry in your db.
but that can cost some more space.


- Original Message -
From: "Fran Fabrizio" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 11:22 PM
Subject: Enforcing user logged in from only 1 browser?


>
> Hello all,
>
> I'm looking for a straightforward approach to extend our AuthCookie
> sessioning to enforce that a user is only logged in from one browser at
> a time.  For us, it would suffice that if the user tries to log in from
> a 2nd browser, the first session would just be expired.
>
> I was thinking that upon login I could save the AuthCookie key in that
> user's db entry as current_session_key and I could blank it out when
> they explicitly log out.  Then during login, I would be able to see if
> there's another key still out there for them.  The tricky part for me is
> figuring out if that key is still an -active- session as opposed to
> having just left their browser open last night or something.  And also,
> if I do determine that it is another active one, how would I expire it?
>
> Anyone done this type of thing previously?
>
> Thanks,
> Fran
>




Enforcing user logged in from only 1 browser?

2002-04-12 Thread Fran Fabrizio


Hello all,

I'm looking for a straightforward approach to extend our AuthCookie 
sessioning to enforce that a user is only logged in from one browser at 
a time.  For us, it would suffice that if the user tries to log in from 
a 2nd browser, the first session would just be expired.

I was thinking that upon login I could save the AuthCookie key in that 
user's db entry as current_session_key and I could blank it out when 
they explicitly log out.  Then during login, I would be able to see if 
there's another key still out there for them.  The tricky part for me is 
figuring out if that key is still an -active- session as opposed to 
having just left their browser open last night or something.  And also, 
if I do determine that it is another active one, how would I expire it?

Anyone done this type of thing previously?

Thanks,
Fran




Re: mod_perl and DB2

2002-04-12 Thread Bill McCabe

On 4/11/02 at 9:54 AM, [EMAIL PROTECTED] (David Shrewsbury) wrote:

> Hey gang. Couldn't find an answer to this in the archives. We have a
> DB2 database that we access via mod_perl scripts.  We have been
> getting errors in the Apache log files every morning whenever we
> first try to access the database. The error is:
> 
> [Thu Apr 11 09:09:49 2002] null: DBD::DB2::db selectall_arrayref failed:
> [IBM][C
> LI Driver] CLI0108E  Communication link failure. SQLSTATE=40003 at
> /usr/local/ap
> achessl/perl/reports/trans_history.pl line 90
> 
> It takes a restart of the web server to eliminate this problem.
> Is this the "Morning Bug" that I am encountering?  I looked at the
> DB2.pm module and it appears that the ping() method has been
> implemented so I would think that this would prevent the "Morning
> Bug" from showing up.  Should I reimplement the ping() method
> according to the Apache::DBI manpage?
> 
> -David
> 

I have many internal systems which use Apache::DBI and DBD::DB2. They're often
up for months without being restarted, and I don't use ping(). So, it is
possible. Are you the DBA too? A possibility is that the DB is being brought
down into offline mode during the night for backups. That'd kill your cached
connections.

I'll send a fuller answer when I have a chance to reexamine our set up.

Bill



couldn't spawn child process

2002-04-12 Thread Ngoc Pham

Hi,

I have a test perl script:

#!C:\Program Files\Perl\bin\perl.exe
use CGI qw(:standard) ;
print header();
print "Hello, world";

With apache_1.3.24-win32-x86-no_src.exe installation, the script runs fine.
With apache_2.0.35-win32-x86-no_ssl.msi installation, error occurs: "The
system cannot find the file specified.  : couldn't spawn child process:
C:/Program Files/Apache Group/Apache2/cgi-bin/first.pl".

Please help me figure this out. Thanks.




Re: Content management systems

2002-04-12 Thread Robin Berjon

On Wednesday 10 April 2002 18:22, Perrin Harkins wrote:
> It looks Robin Berjon is going to give an overview of CMS for mod_perl
> at OSCON:
>
> http://conferences.oreillynet.com/cs/os2002/view/e_sess/2667

Yes, and if you have suggestions and ideas on CMSs you'd like to see included 
(or excluded) or on specific angles that you think I should definitely go 
into (90 minutes can't possibly enough to cover everything, so I'll have to 
prioritize things) then please do send them to me (in private mail) so that I 
can talk about things of greater interest to the potential audience.

Thanks,

-- 
___
Robin Berjon <[EMAIL PROTECTED]> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Those of you who think you know everything are very annoying to those
of us who do.




Re: Location header blows away Set-Cookie?

2002-04-12 Thread Stephen Reppucci


I think this is in the Guide somewhere, but the short answer is to
use 'err_header_out()' rather than 'header_out' for any type of
non-success result.


On Fri, 12 Apr 2002, Thomas K. Burkholder wrote:

> Apologies if this is well-known - a generalized search failed to explain
> the behaviour I'm seeing.
>
> Using:
>
> Apache/1.3.23 (Unix) Debian GNU/Linux mod_ssl/2.8.7 OpenSSL/0.9.6c
> mod_perl/1.26
>
> I'm using a perl handler in which I create a session and bind it to a
> cookie if a session doesn't already exist, fetch some results from a
> database, put the results in the session, then redirect to another page
> that is responsible for pulling the results out of the session and
> producing the html output.  As a test case, I do exactly this:
>
>$r->header_out("Set-Cookie" => 'foo1=bar1');
>$r->header_out("Location" => $redir);
>return REDIRECT;
>
> I use curl to test with - the result does not contain the Set-Cookie
> header.  Is it expected behaviour that redirection should blow away
> Set-Cookie headers, and I just have to find a different way to do this?
>
> I'm pretty sure this isn't a caching issue since I'm using curl to
> initiate the test.
>
> Am I barking up the wrong tree?
>
> Thanks in advance for any help-
>
> //Thomas
> Thomas K. Burkholder

-- 
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=




Re: Location header blows away Set-Cookie?

2002-04-12 Thread Tim Tompkins

Use err_header_out() when response status is other than 200.
$r->err_header_out("Set-Cookie" => 'foo1=bar1');


Regards,

Tim Tompkins
--
Programmer
http://www.arttoday.com/
http://www.rebelartist.com/
--




Re: Trapping browser events

2002-04-12 Thread Geoffrey Young



Mark Fowler wrote:

> On Fri, 12 Apr 2002, Jacob Elder wrote:
> 
> 
>>  last if $r->connection->aborted;
>>
> 
> There's a more full discussion of this in the mod_perl developer's 
> cookbook in section 4.8.
> 
> They postulate a module for checking a little more carefully, source of 
> which is here:
> 
> http://www.modperlcookbook.org/code/ch04/Cookbook/CheckConnection.pm
> 


that particular discussion happens to be available online (along with 
the rest of chapter 4) if you haven't made it to the bookstore yet :)

http://www.webreference.com/programming/perl/cookbook/chap4/5.html

--Geoff






Location header blows away Set-Cookie?

2002-04-12 Thread Thomas K. Burkholder

Apologies if this is well-known - a generalized search failed to explain 
the behaviour I'm seeing.

Using:

Apache/1.3.23 (Unix) Debian GNU/Linux mod_ssl/2.8.7 OpenSSL/0.9.6c 
mod_perl/1.26

I'm using a perl handler in which I create a session and bind it to a 
cookie if a session doesn't already exist, fetch some results from a 
database, put the results in the session, then redirect to another page 
that is responsible for pulling the results out of the session and 
producing the html output.  As a test case, I do exactly this:

   $r->header_out("Set-Cookie" => 'foo1=bar1');
   $r->header_out("Location" => $redir);
   return REDIRECT;

I use curl to test with - the result does not contain the Set-Cookie 
header.  Is it expected behaviour that redirection should blow away 
Set-Cookie headers, and I just have to find a different way to do this?

I'm pretty sure this isn't a caching issue since I'm using curl to 
initiate the test.

Am I barking up the wrong tree?

Thanks in advance for any help-

//Thomas
Thomas K. Burkholder

[cripplecreek:~/MyProjects/WebFetcher/build] burkhold% curl -i 
"http://www.areaj.org/areaj?pg=Search&imagesize=thumbnail&editCaptions=no&;
deleteMarkingControls=no&tableHeight=3&tableWidth=3&orderby=random&showExif=
no&showCaptions=none&save=no&navstyle=slideshowauto&showSizeChange=no&editSelection=
no&showNavButtons=no&captionsarea=&editImages=no&showBasic=no&markForDelete=
no&autoInterval=120"
HTTP/1.1 302 Found
Date: Fri, 12 Apr 2002 18:12:37 GMT
Server: Apache/1.3.23 (Unix) Debian GNU/Linux mod_ssl/2.8.7 
OpenSSL/0.9.6c mod_perl/1.26
Location: 
areaj?pg=GenPage&foo=bar&pg=Search&imagesize=thumbnail&editCaptions=no&deleteMarkingControls=
no&tableHeight=3&tableWidth=3&orderby=random&showExif=no&showCaptions=none&
save=no&navstyle=slideshowauto&showSizeChange=no&editSelection=no&showNavButtons=
no&captionsarea=&editImages=no&showBasic=no&markForDelete=no&autoInterval=
120
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1



302 Found

Found
The document has moved here.

[cripplecreek:~/MyProjects/WebFetcher/build] burkhold%





Re: PDF generation

2002-04-12 Thread Robin Berjon

On Wednesday 03 April 2002 22:43, Bill McCabe wrote:
> I have a large number of mod_perl modules that connect to various databases
> and generate workflow performance reports for my organization. I give the
> users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For
> PDF output I've been using PDF::Create, which has been at version .01 since
> 1999. It has worked flawlessly for my purposes for a couple of years, but
> is very limited. In fine form-follows-function fashion, the end users would
> now like the PDF output gussied up with graphics, etc. Does anyone have any
> strong (positive or negative) recommendations for which module(s) I should
> migrate to?

Sorry to answer so late, I've been offline. It would seem, unless I missed 
something from the thread, that no one mentionned AxPoint. It's originally 
create to generate slides but it can do more. The latest version adds some 
SVG support for graphics, which means you could reuse the same code to 
generate web graphics. It's a really good bundle, especially if you're not 
too fond of coding to the PDF API.

-- 
___
Robin Berjon <[EMAIL PROTECTED]> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Always remember you're unique just like everyone else.




Re: libperl.so vs mod_perl.so

2002-04-12 Thread Ryan Parr

I didn't know about that script :) I'm glad to know it's out there. Using
the ports *would* make life much easier.

Thanks!

-- Ryan

- Original Message -
From: "Doug Silver" <[EMAIL PROTECTED]>
To: "Ryan Parr" <[EMAIL PROTECTED]>
Cc: "mod_perl Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 4:45 PM
Subject: Re: libperl.so vs mod_perl.so


> Ryan -
>
> I upgraded to perl 5.6 and when I built mod_perl it used the right one, I
> would guess that it would only build it against 5.0 if you didn't run the
> `use.perl {port,system}` script that comes with perl 5.6.
>
> The last time I read about loadable modules vs compiled said that the
> loadable route costs during startup, but beyond that it's nearly a
> push.  Using the ports system makes upgrading Apache and all the other
> system software much easier than the other route.  But, everyone does
> things differently, so YMMV!
>
> ~~
> Doug Silver
> Network Manager
> Urchin Corporation http://www.urchin.com
> ~~
>
>
> On Thu, 11 Apr 2002, Ryan Parr wrote:
>
> > As a fellow FreeBSD user (4.5) I recommend building Apache and mod_perl
from
> > source. The ports version builds against the default Perl version
(5.005),
> > even if you upgrade. Therefore, that's all you get in your mod_perl.
Also,
> > it's a good idea to compile mod_perl into Apache, at least, that's what
> > everyone on this list seems to say... To get the same layout as with the
> > port install configure apache
> > --with-layout=FreeBSD
> >
> > -- Ryan
> >
> >
> > - Original Message -
> > From: "Ged Haywood" <[EMAIL PROTECTED]>
> > To: "Mike Loiterman" <[EMAIL PROTECTED]>
> > Cc: "mod_perl Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, April 11, 2002 4:24 PM
> > Subject: Re: libperl.so vs mod_perl.so
> >
> >
> > > Hi there,
> > >
> > > On Thu, 11 Apr 2002, Mike Loiterman wrote:
> > >
> > > > -BEGIN PGP SIGNED MESSAGE-
> > >
> > > There's really no need for all this... :)
> > >
> > > > but there is no entry for LoadModule /libexec/apache/mod_perl.so
> > >
> > > That's because mod_perl.so doesn't exist.
> > >
> > > > There is a an entry for libperl.so and there is a file called
> > > > libperl.so.
> > >
> > > That's the one!
> > >
> > > > How can I quickly and easily test if mod_perl is inded installed
> > >
> > > Read the Guide some more...
> > >
> > > http://perl.apache.org/guide
> > >
> > > ... and check the error_log.
> > >
> > > 73,
> > > Ged.
> > >
> >
>
>




Patch to mod_perl 1.26: "error-notes" support

2002-04-12 Thread Jesse Erlbaum

Hello Doug & All --

One of my programmers (Dave Kaufman) brought to my attention a small but
useful feature which is present in mod_cgi, but missing from
Apache::Registry.  When running via mod_cgi, if execution of a CGI
application fails, an error message will be propagated to an environment
variable, "ERROR_NOTES".  This environment variable can be used by a custom
"ErrorDocument" to assist in quality assurance.

This variable is actually propagated, by http_request.c (confirmed in Apache
1.3.20), from an Apache "note" whose key is "error-notes".  A number of
Apache handlers use the "error-notes" attribute to pass along human-readable
exception data.

Following is a patch I wrote (against mod_perl 1.26, Apache::Registry
version 2.01) which causes Apache::Registry to participate in this scheme.
I hope you find it sufficiently useful to include in the next version of
mod_perl.


Warmest regards,

-Jesse-


START PATCH>
diff -c -r1.1 Registry.pm
*** modules/i686-linux/Apache/Registry.pm   13 Mar 2002 18:06:34 -
1.1
--- modules/i686-linux/Apache/Registry.pm   22 Mar 2002 22:19:10 -
***
*** 129,134 
--- 129,135 
if ($@) {
$r->log_error($@);
$@{$uri} = $@;
+   $r->notes('error-notes', $@);
return SERVER_ERROR unless $Debug && $Debug & 2;
return Apache::Debug::dump($r, SERVER_ERROR);
}
***
*** 153,158 
--- 154,160 
  
if($errsv) {
$r->log_error($errsv);
+   $r->notes('error-notes', $errsv);
return SERVER_ERROR unless $Debug && $Debug & 2;
return Apache::Debug::dump($r, SERVER_ERROR);
}


Re: Apache::File correction

2002-04-12 Thread Rob Nagler

> undef $/;   # enable "slurp" mode

I think the "local" is pretty important, especially in mod_perl:

local $/;

This has the same effect (the "undef" is unnecessary).  It's also a
good idea to enclose the code in a subroutine with error checking:

sub read_file {
my($file) = @_;
open(FH, "< $file") || die("error opening $file: $!");
local($/);
my($content) = ;
close(FH) && defined($content) || die("error reading $file: $!");
return \$content;
}

Rob





Re: Apache::File correction

2002-04-12 Thread Ernest Lergon

Martin Haase-Thomas wrote:
> 
> [snip] Secondly I wonder whether "local $/ = undef"
> will have any effect. But I've never tried overriding Perl's predefined
> variables.
> 
> regards

Dear Martin,

this is the well-known file-slurp mode.

E.g.:

undef $/;   # enable "slurp" mode
$_ = ;  # whole file now here
s/\n[ \t]+/ /g;


Look for "slurp" in your perl docs.

Ernest




-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*
   PGP-Key http://www.virtualitas.net/Ernest_Lergon.asc




RE: banner system

2002-04-12 Thread Maarten Stolte

On Fri, 2002-04-12 at 15:12, Les Mikesell wrote:
> > From: Maarten Stolte [mailto:[EMAIL PROTECTED]]
> > 
> > before i invent the wheel for the xth time, can someone tell me wether
> > there is an (opensource) banner management system in modperl (MASON?).
> > 
> 
> I used this one for a busy site for several years:
> http://www.sklar.com/dad/.  
> 
>Les Mikesell
>  [EMAIL PROTECTED]

thanks alot, seems like it's a good one indeed, now installing a test
version.

Maarten




RE: banner system

2002-04-12 Thread Les Mikesell

> From: Maarten Stolte [mailto:[EMAIL PROTECTED]]
> 
> before i invent the wheel for the xth time, can someone tell me wether
> there is an (opensource) banner management system in modperl (MASON?).
> 

I used this one for a busy site for several years:
http://www.sklar.com/dad/.  

   Les Mikesell
 [EMAIL PROTECTED]




Apache::ServerUtil pb in modperl2

2002-04-12 Thread [EMAIL PROTECTED]

Hi

apache 2.0.35 / mod_perl 1.99_01 / winnt

I confirm that using a module in startup.pl consisting of

use Data::Dumper ;
use XML::LibXML() ;

[1] use Apache::ServerUtil ;
[2] my $s=Apache->server ;
[3] my $base=$s->dir_config('some');
[4] my $xml=XML::LibXML->new();
[5] print Dumper $xml ;

causes the line [3] to output message "Attempt to free
unreferenced scalar"

line [4] causes apache segfaults "unhandled exception
perl56.dll" (XML::LibXML in version 1.31 or 1.40)

line [5] is executed before apache stops
$VAR1 = bless( {}, 'XML::LibXML' );


if I drop line [4] and [5], there is the line [3] message, but
apache does not seem to segfault.




pascal









Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 
€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)"






Re: Trapping browser events

2002-04-12 Thread Mark Fowler

On Fri, 12 Apr 2002, Jacob Elder wrote:

>   last if $r->connection->aborted;

There's a more full discussion of this in the mod_perl developer's 
cookbook in section 4.8.

They postulate a module for checking a little more carefully, source of 
which is here:

http://www.modperlcookbook.org/code/ch04/Cookbook/CheckConnection.pm

Later.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}







Re: Mem usage of modules

2002-04-12 Thread Stas Bekman

pawelp wrote:
> Hi
> 
> Under Mem Usage menu I have list like this:
> 
> Apache::ROOT::cgi_2dbin::auk_ch_de
> Apache::ROOT::cgi_2dbin::auk_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ca_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cn_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sc_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_de 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_fr 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::msn_2epl 
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::sunrise 
> 
> The auk_ch_de and auk_ch_fr scripts are preloaded with RegistryLoader.
> But these scripts are also mentioned later on that list - is that
> means they were loaded into memoey twice 

yes

http://perl.apache.org/guide/performance.html#Be_Careful_with_Symbolic_Links

> (in fact all the auk_ scripts are sym
> links to the same script auk) ?
> 
> Thanks
> Pawel



-- 


__
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