Re: Apache::Session install errors

2001-07-02 Thread Jeffrey W. Baker



On Mon, 2 Jul 2001, Bakki Kudva wrote:

> this may be slightly OT but when try to install Apache::Session I am
> getting...

I suggest "force install Apache::Session"

-jwb




Apache::Session install errors

2001-07-02 Thread Bakki Kudva

this may be slightly OT but when try to install Apache::Session I am
getting...

t/99mysql...DBI->connect(sessions) failed: Access denied for user:
'@localhost' to database 'sessions' at
blib/lib/Apache/Session/Lock/MySQL.pm line 36
(in cleanup) DBI->connect(sessions) failed: Access denied for
user: '@localhost' to database 'sessions' at
blib/lib/Apache/Session/Lock/MySQL.pm line 36t/99mysql...dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-8
Failed 8/8 tests, 0.00% okay
t/99mysqllock...(in cleanup) DBD::mysql::st execute failed: MySQL
server has gone away at blib/lib/Apache/Session/Lock/MySQL.pm line 70.
   

.and then 
make: *** [test_dynamic] Error 29
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force  
 

I have MySQL running. I was wondering if the DBI->connect(sessions) test
fails because I am running this as root (in CPAN shell).

-- 
  .-.| Bakki Kudva__Open Source EDMS__
  oo|| Navaco   ph:  814-833-2592
 /`'\| 420 Pasadena Drive   fax: 603-947-5747
(\_;/)   | Erie, PA 16505   http://www.navaco.com/



RE: name-based virtual host ->suexec: command not in docroot

2001-07-02 Thread David Harris


> I need to run a cgi from one of the virtual hosts, but I get the following
> errors:
> suexec.log - command not in docroot (/path/to/cgi)
> error.log - Premature end of script headers: /path/to/cgi

Suexec is compiled with a built in path which all requests must fall
underneath as part of the security model. This isn't related to name based
hosting, but rather to the document root path you are using.

Read more about the suexec security model here:
http://httpd.apache.org/docs/suexec.html#model

David





RE: mod_perl child processes using way too much RAM

2001-07-02 Thread Scott Stephenson
Title: RE: mod_perl child processes using way too much RAM





Checkout Apache::SizeLimit. You can put something like this in your startup.pl:


use Apache::SizeLimit;
$Apache::SizeLimit::MAX_PROCESS_UNSHARED_SIZE = 2;
$Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 2;


-Scott


> -Original Message-
> From: Bob Foster [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 12:31 PM
> To: [EMAIL PROTECTED]
> Subject: mod_perl child processes using way too much RAM
> 
> 
> Hi,
> 
> I have a single script which is working but making the 
> httpd_perl child
> processes jump to 60 Megs or more.  I've asked the programmer 
> to fix the
> script, but until he does, I'm wondering if I can either:
> 
>   1.  Force the script to run under PerlRun or under 
> normal CGI.  The
> problem is that I run all the scripts in the directory under 
> mod_perl. 
> And this script is called from a large number of other files and the
> directory is hard-coded in those files so I can't move it easily.  
> 
>   Or,
> 
>   2.  Cause any httpd_perl child process which exceeds 20 
> megabytes in
> memory usage to terminate after it's done.
> 
> Thanks!
> 
> Bob
> 





Re: Perl ignored (again) by InfoWorld

2001-07-02 Thread Robert Landrum

At 12:44 PM -0700 7/2/01, Sean Chittenden wrote:
> > The fact is, Perl is a lot more mature than even Java, and is more prolific
>> a language than any other for sophisticated web application development.
>>
>> I would really like to see you inject an honest discussion of Perl into your
>> series on web development.  I think you will find that, although unglamorous
>> compared to its better publicized peers, Perl is a preeminently capable
>> environment for building object-oriented (yes!),  sophisticated (yes!),
>> database-connected (yes! yes!) web-based applications.
>
>   Errr...  ruby's a real OO language and has all of the same
>database connectivity that Perl does, and is easier to extend in C.


mature (no!), prolific (no!).

Rob

--
"A good magician never reveals his secret; the unbelievable trick
becomes simple and obvious once it is explained. So too with UNIX." 



RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-02 Thread James G Smith

How would something like this do:

NAME

Apache::Use

SYNOPSIS

use Apache::Use (Logger => DB, File => "/www/apache/logs/modules");

DESCRIPTION

Apache::Use will record the modules used over the course of the 
Perl interpreter's lifetime.  If the logging module is able, the 
old logs are read and frequently used modules are automatically 
loaded.  Note that no symbols are imported into packages.

---

I really wish we had `use' as a function instead of a keyword and 
had an `immediate' property for subs (kindof a Forth thing).  
Then we could do reference counting of `use' and `require'.

If the above seems reasonable, I'll try to get a 0.01 out asap.  
Passing this by the modules list for comment also.  The current 
code I have does not actually depend on Apache and mod_perl.
-- 
James Smith <[EMAIL PROTECTED]>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix



Re: mod_perl child processes using way too much RAM

2001-07-02 Thread Perrin Harkins

> 2.  Cause any httpd_perl child process which exceeds 20 megabytes in
> memory usage to terminate after it's done.

Apache::SizeLimit (and others) can do this.
- Perrin




mod_perl child processes using way too much RAM

2001-07-02 Thread Bob Foster

Hi,

I have a single script which is working but making the httpd_perl child
processes jump to 60 Megs or more.  I've asked the programmer to fix the
script, but until he does, I'm wondering if I can either:

1.  Force the script to run under PerlRun or under normal CGI.  The
problem is that I run all the scripts in the directory under mod_perl. 
And this script is called from a large number of other files and the
directory is hard-coded in those files so I can't move it easily.  

Or,

2.  Cause any httpd_perl child process which exceeds 20 megabytes in
memory usage to terminate after it's done.

Thanks!

Bob




Re: @INC?

2001-07-02 Thread Jeffrey W. Baker

On Mon, 2 Jul 2001, Gareth Hughes wrote:

> Hi All
>
> I've successfully configured Apache on Win2k. One of the sites I host uses a
> lot of perl so mod_perl was an obvious addition.
> I know nothing about perl but I'm pretty sure mod_perl is installed and
> running correctly except for being able to reference the correct
> directories. When I access a .pl page I get a 500 internal server error
> returned and the error log shows this:
>
> [Sat Jun 30 15:30:08 2001] [error] Can't locate HTMLfile.pm in @INC (@INC
> contains: .. powershift D:/Perl/lib D:/Perl/site/lib . c:/apache
> group/apache/ c:/apache group/apache/lib/perl) at
> d:/mmwebs/ps/scripts/powershift/veh_sup/approved-vehicles.pl line 31.
> BEGIN failed--compilation aborted at
> d:/mmwebs/ps/scripts/powershift/veh_sup/approved-vehicles.pl line 31.
>
> I've added the module and directory directives in the httpd.conf file and if
> I move the HTMLfile.pm (and a bunch of other .pm files) into
> D:/Perl/site/lib the scripts run correctly. Unfortunately the scripts
> eventually reference other files that can longer be found because the .pm
> files have moved. Also, moving the files is far from ideal for ftp access
> etc.
>
> Shouldn't the scripts be looking in the directory they were run from as they
> did before mod_perl? Does anyone know if this is a mod_perl configuration
> issue or do the perl scripts need some additions to be mod_perl compatible?

mod_perl loads the scripts up into subroutines for execution.  Thus, Perl
is not running them the way they would normally get run, and things like
present working directory might not behave the way you expect.

To add to @INC, you can either use "PerlSetEnv PERL5LIB /whatever" to
httpd.conf, or you can use a startup script (canonically startup.pl) and
include "use lib '/whatever';" therein.

Best,
Jeffrey Baker




name-based virtual host ->suexec: command not in docroot

2001-07-02 Thread Oliver

Hello All,
I'm using name-based virtual hosts on Apache 1.3.19

I need to run a cgi from one of the virtual hosts, but I get the following
errors:
suexec.log - command not in docroot (/path/to/cgi)
error.log - Premature end of script headers: /path/to/cgi

Anyone know why and what I should do? Thanks!
Please Help. 
Oliver Etzel, Munich




Re: AuthCookie expansion

2001-07-02 Thread Vivek Khera

> "RB" == Rich Buckley <[EMAIL PROTECTED]> writes:

RB> credentials have been verified. What I would like to do is redirect
RB> to a home page looked up from the database. The database lookup is
RB> trivial but where and how is the best place to do the redirection
RB> within the AuthCookie framework ?

Make the destination of the login page be your redirect script, which
then does the lookup based on the login ID and redirects the user.

Either that or use a rewrite rule with the rewrite engine based on
user ID and some map that converts user IDs to pages.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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/



$r->path_info()

2001-07-02 Thread Viljo Marrandi

Hello,

I hope this is the right place to ask this question. I'm using 
Template-Toolkit under Apache/mod_perl and created my own handler for 
it. There is such line in this handler:

my $temp_file = $r->path_info();

When i send this $temp_file to log it works fine:

my $log = $r->log();
$log->notice($temp_file, $r->filename);

But if i try to modify it (eg. $temp_file =~ tr/a-z/A-Z/;) it doesn't do 
nothing. It's still same as in the beginning. What am i doing wrong? It 
should be a regular string so i should be able to modify it...

And if I send $temp_file as variable to process it into template it's empty:

my $vars = {
   filename => $temp_file,}

$template->process($file, $vars, $r)

Any help would be great.

Rgds,
Viljo




AuthCookie expansion

2001-07-02 Thread Rich Buckley
Title: AuthCookie expansion





modperlers,


We have been using AuthCookie (very successfully) for web site login
with user accounts held in an Oracle DB. 


With expansion, what we would now like to do is have one login screen, 
then, depending on a user attribute's, redirect to a different version 
of the website.


E.g. using opening page: http://www.server.co.uk, if user 1 was of type
'red', they'd be logged in to http://www.server.co.uk/red, whereas 
user 2, type 'blue' => http://www.server.co.uk/blue. 
Each sub site would then be a different customised view of the data.


Now AuthCookie catches attempts to access unauthorised pages and 
redirects to a login page. The login form has the destination url as
a hidden field and a redirection to this url is performed once the
credentials have been verified. What I would like to do is redirect
to a home page looked up from the database. The database lookup is
trivial but where and how is the best place to do the redirection
within the AuthCookie framework ?


We are basically looking for a point in the right direction, would 
this be of use to others if a change was made to AuthCookie ?


Ta,


--Rich





@INC?

2001-07-02 Thread Gareth Hughes

Hi All

I've successfully configured Apache on Win2k. One of the sites I host uses a
lot of perl so mod_perl was an obvious addition.
I know nothing about perl but I'm pretty sure mod_perl is installed and
running correctly except for being able to reference the correct
directories. When I access a .pl page I get a 500 internal server error
returned and the error log shows this:

[Sat Jun 30 15:30:08 2001] [error] Can't locate HTMLfile.pm in @INC (@INC
contains: .. powershift D:/Perl/lib D:/Perl/site/lib . c:/apache
group/apache/ c:/apache group/apache/lib/perl) at
d:/mmwebs/ps/scripts/powershift/veh_sup/approved-vehicles.pl line 31.
BEGIN failed--compilation aborted at
d:/mmwebs/ps/scripts/powershift/veh_sup/approved-vehicles.pl line 31.

I've added the module and directory directives in the httpd.conf file and if
I move the HTMLfile.pm (and a bunch of other .pm files) into
D:/Perl/site/lib the scripts run correctly. Unfortunately the scripts
eventually reference other files that can longer be found because the .pm
files have moved. Also, moving the files is far from ideal for ftp access
etc.

Shouldn't the scripts be looking in the directory they were run from as they
did before mod_perl? Does anyone know if this is a mod_perl configuration
issue or do the perl scripts need some additions to be mod_perl compatible?

Any help, thoughts, advice or head ache tablets most appreciated :-)

Cheers

Gareth





Sorry for the "Out Of Office"-Notification(s)!

2001-07-02 Thread Michael . Jacob

Hi all,

I just found out that our mail system doesn't honor the "don't send to the
internet"-switch in the "Out-Of-Office"-Profile. :-((

Sorry for all that German "Out-Of-Office" mails that you all got...

Michael