Apache+mod_perl+JServ

2001-06-20 Thread

Hi mod_perlers !

I'm not sure, may be my question is off topic. If it is did you point me in
the right list if possible ?

Currently we are developing entirely mod_perl end user application using
Embperl template system. Our customer has about 50-100 workstations and Sun
Enterprise 250 w/ 512 MB RAM server. Now we need a some reporting tool and
we are decide use our reporting system from previously project. It was
written on java and works good under Oracle Application Server 4.0.8. Now we
decide port it under Apache JServ. Is follow configuration optimal:
- one proxying Apache with mod_rewrite which serving static html and
dispatch abilities
- plus another Apache mod_perl enabled
- plus another one Apache JServ enabled

Or Apache which compiled altogether.

Or other configuration.

Note: customer server are running Oracle 8.1.7 also. No other important
services running on it.

Thanx

any thoughts are very welcome.

Mike.




Re: Apache+mod_perl+JServ

2001-06-20 Thread Ged Haywood

Hi there,

On Wed, 20 Jun 2001, [koi8-r] ëÏÎÓÔÁÎÔÉÎ íÉÈÁÊÌÏ× wrote:

 I'm not sure, may be my question is off topic.

Only parts of it!  There's an Embperl List too, check out the mod_perl
home page for the URL.

 Currently we are developing entirely mod_perl end user application using
 Embperl template system. Our customer has about 50-100 workstations and Sun
 Enterprise 250 w/ 512 MB RAM server.

You can quickly use 500MB RAM with a busy mod_perl server.  Keep an eye on 
the size and number of the processes.  Perhaps think about something like
Apache::Resource or Apache::SizeLimit.

 we are decide use our reporting system from previously project. It was
 written on java and works good under Oracle Application Server 4.0.8. Now we
 decide port it under Apache JServ.

If you haven't already looked at it, you might want to look at Resin
(http://www.caucho.com) but I think it might have some problems.

 Is follow configuration optimal:
   - one proxying Apache with mod_rewrite which serving static html and dispatch 
abilities
   - plus another Apache mod_perl enabled
   - plus another one Apache JServ enabled

If you're comfortable with the configuration aspects, there's no
reason to worry about having three Apaches, they're just processes.
It may make debugging (if you need to do it!) and tuning for
performance easier.  It may make reliability different.  Hmmm.

 Note: customer server are running Oracle 8.1.7 also. No other important
 services running on it.

Oracle gets pretty hungry at times too.

73,
Ged.




Re: Unable to build apache + mod_perl on AIX

2001-06-20 Thread Jens-Uwe Mager

On Tue, Jun 19, 2001 at 10:02:55PM -0500, Steven Lembark wrote:
  apache_1.3.20  mod_perl-1.25
 AIX kbs80 3 4 000C30CD4C00 unknown
 
 Problem:  regardless of what arg's I've tried or all-in-one, one-step I 
 keep getting
 xlC as the compier and CFLAGS which include -qlonglong -q32 -maxmem'.   xlC
 then fails to compile apache.
 
 Running ./configure --blah in the apache directory w/ CC=/path/to/gcc and
 CFLAGS='-O2 -I/blah -L/blah' gives me a working copy of apache -- sans 
 mod_perl.
 
 Running find . -type f | xargs grep -il qlonglong and '... grep -il xlC' 
 in the mod_perl
 and apache directories gets me NADA.   This includes the documentation, 
 source,
 Makefiles, inputs, you-name-it.
 
 Question:  What is a way to run some combination of perl Makefile.PL with 
 or
 without ./configure for apache that will cause the result to use $CC and 
 $CFLAGS
 in my envoronment -- or which piece of code can I hack that is finding xlC 
 in hte
 first place (sorry, I don't have time to perl -d Makefile.pl at this 
 point).

The problem is perl itself here - it is probably compiled using xlc.
Just run perl -V and look at the output. If you want to build Apache and
modperl using gcc than you _must_ also build perl using gcc. This means
you can not use the perl which is part of AIX, as this is built using
xlc.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:  +49 5131 709320
FAX:+49 5131 709325
Internet:   [EMAIL PROTECTED]



Re: Apache+mod_perl+JServ

2001-06-20 Thread Mithun Bhattacharya

Hello list members,


I was looking at various options to monitor applications running on my
server and was wondering what is the usual practice in such situations.
I am looking at data collection in the lines of sysstat. It collects
data of various resources in real time and saves it in a binary format
which can be later processed to extract relevant information and then
analyzed in appropriate manner. In the current situation I would like to
monitor the resource utilization by various modules over a period of
time and any other factors affecting my web server. I am only concerned
about applications running under modperl's jurisdiction.



Mithun



Re: Apache+mod_perl+JServ

2001-06-20 Thread Vasily S. Petrushin



On Wed, 20 Jun 2001, ëÏÎÓÔÁÎÔÉÎ íÉÈÁÊÌÏ× wrote:

 Date: Wed, 20 Jun 2001 14:51:49 +0500
 From: ëÏÎÓÔÁÎÔÉÎ íÉÈÁÊÌÏ× [EMAIL PROTECTED]
 To: modperl [EMAIL PROTECTED]
 Subject: Apache+mod_perl+JServ

 Hi mod_perlers !

 I'm not sure, may be my question is off topic. If it is did you point me in
 the right list if possible ?

 Currently we are developing entirely mod_perl end user application using
 Embperl template system. Our customer has about 50-100 workstations and Sun
 Enterprise 250 w/ 512 MB RAM server. Now we need a some reporting tool and
 we are decide use our reporting system from previously project. It was
 written on java and works good under Oracle Application Server 4.0.8. Now we
 decide port it under Apache JServ. Is follow configuration optimal:

I think you need more memory, at least 1024 M (buy Kingston's modules,
they cost lower than Sun's).

For mod_perl acceleration I use the squid as a httpd_accellerator, works
fine especially with low speed connected HTTP clients. In this case you
can set MaxClients to 40 - 50.

mod_perl and JServ i think can  be compiled together and works fine.

   - one proxying Apache with mod_rewrite which serving static html and
 dispatch abilities
   - plus another Apache mod_perl enabled
   - plus another one Apache JServ enabled

 Or Apache which compiled altogether.

 Or other configuration.

 Note: customer server are running Oracle 8.1.7 also. No other important
 services running on it.

 Thanx

 any thoughts are very welcome.

 Mike.



If you have any questions you can e-mail me in russian to
[EMAIL PROTECTED]

Vasily Petrushin




Long application.Session timeouted.

2001-06-20 Thread Landin Nikolay


Hi, all
I have a problem.
I am using Apache::ASP module.
When I try to do a long process - the client page write Page not found 
after some period.

How can I to tell client, that server application is still working?

May be - I must just change some Session variables?

I tried to change $Session-{Timeout} variable - but it take no effect.
After session timeout event I am loosing all result data of working 
application.

Please, help. 




InstallProblem mod_perl125 on Win2000 and Apache1.3.20

2001-06-20 Thread Michael Heinen

Hy

I have a problem to install mod_perl1.25 for Apache 1.3.20 on Win2000.

ActivePerl-5.6.1.626 I have installed on my system and Apache is running in
C:\Apache.

mod_perl-1.25.tar.gz is extracted to C:\temp\perl.


Now I try to generate the makefile with following line.
   perl Makefile.PL APACHE_SRC=C:\Apache\src INSTALL_DLL=C:\Apache\modules

This results in the following error message:
  Cannot find ApacheCore.lib under C:/Apache/src/Release

This directory does not exist on my system.
The file ApacheCore.lib is in the directory C:/Apache/libexec.

So what can I do now ?
Michael



Re: Advanced daemon allocation

2001-06-20 Thread Keith G. Murphy

Stas Bekman wrote:
 
 On Tue, 19 Jun 2001, Keith G. Murphy wrote:
 
  Matthew Byng-Maddick wrote:
  
   On Mon, Jun 18, 2001 at 10:41:50AM -0500, Keith G. Murphy wrote:
 
   This is only true if you're serving images off the mod_perl server which
   is crazy unless you're generating them.
  
  No images involved, but I was seeing a performance improvement under
  HTTP 1.1. What happened was that the user kept getting the same daemon
  for each invocation of the Apache::CGI script, which seemed to be due to
  HTTP 1.1's persistent connections.
 
 Do you mind if I ask how many users were using the service?
 
 Because if there were just a few, than it's true.
 
Yes, it was very few indeed: one or two!

You and Matthew Byng-Maddick have made me realize that mine was probably
the *only* situation in which the KeepAlive technique would have been
very useful:

Rapid reinvocation of a script; extremely limited system memory; very
few users.

Almost sorry I brought it up, but it's been an informative discussion.



Curious About Require

2001-06-20 Thread Purcell, Scott

Hello,
I have a question about require when using mod-perl. I produced four simple
.pl files.
main.pl, one.pl two.pl three.pl

From the main.pl you can link to either one two or three.pl. Pretty simple.

The problem begins when I put a require in one.pl, two.pl, and three.pl.
If in each of those files I put in for instance:
require D:/Apache/mod_perl/query.pl;

When I click on the main, and lets say I go to one.pl it works fine.
If I then proceed to click on two.pl (it says query.pl not found), even
though there is a require.

Restart Apache,
Then click from main to two.pl it works fine.
If then I go to one.pl error (it says query.pl not found).

So my question is why this bazaar behavior. If I change the query.pl to a
module and use it in each of the pages it is fine. I just find this behavior
rather funny. If anyone has any insight please update me.

Thanks,
Scott Purcell




RFC: new module: Apache::FakeEnv

2001-06-20 Thread Thomas Klausner

Hi!

I am currently working on a module that generates a Fake Apache 
Request Object like Apache::FakeRequest does, but that also 
parses the Apache Configuration and enables the user to access 
values set with PerlSetVar (i.e. fake $r-dir_config).

This Request Object can than be used in mod_perl modules, when 
running from the command line.

I have a first (sort of) working version at:
http://domm.zsi.at/source_code/Apache-FakeEnv.pm
and the documentation at:
http://domm.zsi.at/Apache-FakeEnv.html
or embedded in Apache-FakeEnv.pm in pod-format

This module has some limitations (see Section Limitations in the 
doc) that I would like to remove, but I'm not sure how, so ...

* Is it possible to subclass mod_perl or Apache::Request from 
outside of Apache (i.e. in a plain perl environment) ?

* If not (which it seems to be), what would be the best way to 
implement all (more or less..) mod_perl methods and subclasses 
(Apache::Request et.al) ? Can one use the C code that mod_perl 
is based on? (Well, I guess I can't because I've never done any real 
C coding ...) ?

* Does a parser for the Apache Conifg Files exist somewhere 
(Parse::ReDescent or similar) or can one use the Apache Source 
Code or Apache itself to parse the config  ?

* Do you think that this module could be of interest to others 
(Should I put it on CPAN) ?

Thanks for your attention !


--
D_omm
O_xyderkes http://domm.zsi.at
M_echanen
M_asteuei



Re: Curious About Require

2001-06-20 Thread Mark Doyle

Greetings,

require will only happen once per perl process and since mod_perl
is essentially a single perl process, the file is only require'd
for the first request. You can get around this by deleting the file from 
the %INC
hash which keeps track of which files you have loaded. Something like:

BEGIN {
delete $INC{'/foo/bar/query.pl'} if exists $INC{'/foo/bar/query.pl'};
require '/foo/bar/query.pl';
  }

Cheers,
Mark

On Wednesday, June 20, 2001, at 10:04 AM, Purcell, Scott wrote:

 Hello,
 I have a question about require when using mod-perl. I produced four 
 simple
 .pl files.
 main.pl, one.pl two.pl three.pl

 So my question is why this bazaar behavior. If I change the query.pl 
 to a
 module and use it in each of the pages it is fine. I just find this 
 behavior
 rather funny. If anyone has any insight please update me.

 Thanks,
 Scott Purcell




Newbie: Please help me in installing mod_perl

2001-06-20 Thread VIDYASAGAR R NALLU

Hi,

I'm completely new to mod_perl. So please don't scold me too hard if i'm
asking silly question. Basically i installed and configured Apache web
server, working fine with out any problem. Now i would like to install
mod_perl. According to documentation using ppm i installed ppd file of
mod_perl. Successfully copied mod_perl.so into the modules directory of
Apache webserver.

I included the following statements into httpd.conf file:

Alias /Perl/ /vnallu/http/perl
  
  PerlModule Apache::Registry
  Location /httpd
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
allow from all
  /Location

When i started the server i'm ended up with the following error message:

Invalid module PerlModule perhaps mis-spelled or defined by a module not
included in the server configuration.

Is this problem anyway related to mod_perl-1.25.tar.gz. Totally confused.
Please someone kind enough to solve my problem.

Thanks in advance
vnallu



Re: Curious About Require

2001-06-20 Thread Stas Bekman

On Wed, 20 Jun 2001, Mark Doyle wrote:

 Greetings,

 require will only happen once per perl process and since mod_perl
 is essentially a single perl process, the file is only require'd
 for the first request. You can get around this by deleting the file from
 the %INC
 hash which keeps track of which files you have loaded. Something like:

 BEGIN {
 delete $INC{'/foo/bar/query.pl'} if exists $INC{'/foo/bar/query.pl'};
 require '/foo/bar/query.pl';
   }

Mark, your suggestion doesn't work because of BEGIN.

See the URL posted in my other reply for the explanation.

 Cheers,
 Mark

 On Wednesday, June 20, 2001, at 10:04 AM, Purcell, Scott wrote:

  Hello,
  I have a question about require when using mod-perl. I produced four
  simple
  .pl files.
  main.pl, one.pl two.pl three.pl
 
  So my question is why this bazaar behavior. If I change the query.pl
  to a
  module and use it in each of the pages it is fine. I just find this
  behavior
  rather funny. If anyone has any insight please update me.
 
  Thanks,
  Scott Purcell
 




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





Re: Curious About Require

2001-06-20 Thread Stas Bekman

On Thu, 21 Jun 2001, Stas Bekman wrote:

 On Wed, 20 Jun 2001, Mark Doyle wrote:

  Greetings,
 
  require will only happen once per perl process and since mod_perl
  is essentially a single perl process, the file is only require'd
  for the first request. You can get around this by deleting the file from
  the %INC
  hash which keeps track of which files you have loaded. Something like:
 
  BEGIN {
  delete $INC{'/foo/bar/query.pl'} if exists $INC{'/foo/bar/query.pl'};
  require '/foo/bar/query.pl';
}

 Mark, your suggestion doesn't work because of BEGIN.

Ooops, gotta go to sleep. Your suggestion, Mark, will work :) but only in
Registry/PerlRun which executes BEGIN on every request.

Sorry about my previous post :(

But if you delete and reload the file on every request it defeats the
purpose of using mod_perl to some degree, depending on how many files you
force to reload and how big they are.

BTW, here is shorter version of your suggestion:

BEGIN { do '/foo/bar/query.pl'; }

 See the URL posted in my other reply for the explanation.

Still holds :)

  Cheers,
  Mark
 
  On Wednesday, June 20, 2001, at 10:04 AM, Purcell, Scott wrote:
 
   Hello,
   I have a question about require when using mod-perl. I produced four
   simple
   .pl files.
   main.pl, one.pl two.pl three.pl
  
   So my question is why this bazaar behavior. If I change the query.pl
   to a
   module and use it in each of the pages it is fine. I just find this
   behavior
   rather funny. If anyone has any insight please update me.
  
   Thanks,
   Scott Purcell
  
 



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






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





ModPerl package Q

2001-06-20 Thread Purcell, Scott

Hello,
Well, this is the last time I am going to bring this up. I am on Apache NT,
and I have the following .pm file that I believe I localized everything in
order to create a socket. The code below does work.  But it never makes a
new socket. As you can see I print out the IO::Socket::GLOB and it shows the
same 'reference' 10xff036c each time through. I realize this is because I am
not closing and undef the $sock. (see the commented close and undef towards
the end). But this works. Except if I shut down the machine I am calling the
socket on. Then it dies and never comes back unless I reboot apache. Not a
good work position to get a web site into.

But here is the catch. If I do close the socket and either undef or even
leave that commented out, I only get one send to the socket, and one reply,
but it never sends another reply to the server and never gets another
response back? But yes, it creates a new socket ref each time?

This confuses me so. If I close the socket, then it shows that I am creating
a new socket, but it never sends or gets a new response. But the rest of the
behavior is proper.

I was just hoping someone could look below, see if they see anything
obviously wrong and reply, or else I am left to believe that this is
possibly a threading issue with the sockets on NT?

I am going to switch to ActiveStates plex, but still would like to continue
striving towards getting the apache running with this code. So there is no
rush on this, it just makes no sense, and I hate to leave open-ended issues.

Thanks for your time,
Scott



package q2;

use IO::Socket;
my $sock;

sub tryQuery {
unless ($sock) {
print No sock making itbr\n;
$sock = IO::Socket::INET-new(Proto = 'tcp', PeerAddr =
'208.238.162.204', PeerPort = '8000') or die (@!);
$sock-autoflush(1);
}
my ($querystring,$fieldlist,$dbpathlist,$type) = @_;
print $querystring is QSbr\n;
print $fieldlist   is FLbr\n;
print $dbpathlist  is DBbr\n;
print $typeis TPbr\n;

my $message  =
DBASEQUERY\n$type\n$querystring\nLIST\tFIELDS\n$fieldlist\nENDLIST\nLIST\tD
BASES\n$dbpathlist\nENDLIST\n;

ask($message);
}

sub ask {
my $message = shift;
print $message is our messagebr\n;
my $msgid = int(rand(1000));
$message = $msgid . \t . $message;
my $msgsize = length($message);
print here is our line  . $sock . \%BEGIN\t$msgsize\n$message SHOIULD
BE GOLDEN;
print $sock \%BEGIN\t$msgsize\n$message;
my $result = $sock;
print $result is first result from Qbr\n;
my $response;
$result =~ s/\D//g;
print $result is should now be digitsbr\n;
print $sock is our sockbr\n;
read($sock, $response, $result);
print $response is our responsebr\n;
#close($sock);
#   undef $sock;
}




1;




Scott Purcell




Re: Newbie: Please help me in installing mod_perl

2001-06-20 Thread Robin Berjon

On Wednesday 20 June 2001 17:49, VIDYASAGAR R NALLU wrote:
 According to documentation using ppm i installed ppd file of
 mod_perl. Successfully copied mod_perl.so into the modules directory of
 Apache webserver.

 When i started the server i'm ended up with the following error message:

 Invalid module PerlModule perhaps mis-spelled or defined by a module not
 included in the server configuration.

You need to add (before any mod_perl directive):

LoadModule perl_module modules/mod_perl.so

Note that I'm guessing that it ought to be mod_perl.so, I haven't used 
mod_perl on win32 in ages and back then it was ApacheModulePerl.dll.

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
To err is human, to purr feline.




RE: new module: Apache::FakeEnv

2001-06-20 Thread Geoffrey Young



 -Original Message-
 From: Thomas Klausner [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 20, 2001 11:27 AM
 To: modperl
 Subject: RFC: new module: Apache::FakeEnv
 
 
 Hi!
 
 I am currently working on a module that generates a Fake Apache 
 Request Object like Apache::FakeRequest does, but that also 
 parses the Apache Configuration and enables the user to access 
 values set with PerlSetVar (i.e. fake $r-dir_config).

there was a more advanced Apache::FakeRequest floating around somewhere...

I think this was it, but I swore it was something on the dev@ list:
http://marc.theaimsgroup.com/?l=apache-modperlm=98719810927157w=2

[snip]
 
 * Do you think that this module could be of interest to others 
 (Should I put it on CPAN) ?
 
 Thanks for your attention !
 

generally, I would think that feature enhancements to Apache::FakeRequest
would be preferred over another module that is essentially the same - a
better FakeRequest has been on the ToDo list for some time now...

any chance you can expand the existing Apache::FakeRequest and offer a
patch?

my $0.02

--Geoff



Re: RFC: new module: Apache::FakeEnv

2001-06-20 Thread darren chamberlain

Thomas Klausner ([EMAIL PROTECTED]) said something to this effect on 06/20/2001:
 Hi!
 
 I am currently working on a module that generates a Fake Apache 
 Request Object like Apache::FakeRequest does, but that also 
 parses the Apache Configuration and enables the user to access 
 values set with PerlSetVar (i.e. fake $r-dir_config).

*snip*

 * Does a parser for the Apache Conifg Files exist somewhere 
 (Parse::ReDescent or similar) or can one use the Apache Source 
 Code or Apache itself to parse the config  ?

Don't know about the rest, but I saw Config::General, which will
parse an Apache config file into a hash. Very useful, and very
well done.

(darren)

-- 
It is impossible to experience one's death objectively and still
carry a tune.
-- Woody Allen



Re: Curious About Require

2001-06-20 Thread Perrin Harkins

   BEGIN {
   delete $INC{'/foo/bar/query.pl'} if exists
$INC{'/foo/bar/query.pl'};
   require '/foo/bar/query.pl';
 }
 
  Mark, your suggestion doesn't work because of BEGIN.

 Ooops, gotta go to sleep. Your suggestion, Mark, will work :) but only in
 Registry/PerlRun which executes BEGIN on every request.

It only needs to do the require once per script, so if you put this in each
script it will be fine.  Also, I don't think Registry runs BEGIN blocks
every time.  Can't remember about PerlRun.

 BTW, here is shorter version of your suggestion:

 BEGIN { do '/foo/bar/query.pl'; }

That's what I used when porting someone's old perl4-ish code to PerlRun.
Both of these quick fixes waste memory though.

- Perrin




Re: ModPerl package Q

2001-06-20 Thread Perrin Harkins

 Well, this is the last time I am going to bring this up. I am on Apache
NT,
 and I have the following .pm file that I believe I localized everything in
 order to create a socket. The code below does work.  But it never makes a
 new socket. As you can see I print out the IO::Socket::GLOB and it shows
the
 same 'reference' 10xff036c each time through. I realize this is because I
am
 not closing and undef the $sock. (see the commented close and undef
towards
 the end). But this works. Except if I shut down the machine I am calling
the
 socket on. Then it dies and never comes back unless I reboot apache. Not a
 good work position to get a web site into.

 But here is the catch. If I do close the socket and either undef or even
 leave that commented out, I only get one send to the socket, and one
reply,
 but it never sends another reply to the server and never gets another
 response back? But yes, it creates a new socket ref each time?

It looks to me like you have a problem with scoping and closures.  Try
making $sock a global, i.e. change my $sock; to use vars qw($sock);.
Then put your close and undef stuff back in.

- Perrin




Re: Curious About Require

2001-06-20 Thread Mark Doyle

Greetings,

On Wednesday, June 20, 2001, at 12:45 PM, Stas Bekman wrote:

 Ooops, gotta go to sleep. Your suggestion, Mark, will work :) but only 
 in
 Registry/PerlRun which executes BEGIN on every request.

 Sorry about my previous post :(

 But if you delete and reload the file on every request it defeats the
 purpose of using mod_perl to some degree, depending on how many files 
 you
 force to reload and how big they are.

 BTW, here is shorter version of your suggestion:

 BEGIN { do '/foo/bar/query.pl'; }

Sorry, I guess I should have been more explicit. I don't want to
require in the file on every request, but rather only allow the
same file to be require'd multiple times (to install the same sub
routines into different packages).  This is needed because we have
modularized some of our XML handlers for SUBS-style parsing in
XML::Parser and we need create multiple subclasses of XML::Parser
that share the same modularized components. The packages that
subclass XML::Parser are read in only once in the startup.pl file.
The last require leaves the files in the %INC hash, so it isn't
subsequently read in on every request (so 'do' isn't quite the
same).

Cheers,
Mark



Re: ModPerl package Q

2001-06-20 Thread Joshua Chamas

Purcell, Scott wrote:
 
 Hello,
 Well, this is the last time I am going to bring this up. I am on Apache NT,
 and I have the following .pm file that I believe I localized everything in
 order to create a socket. The code below does work.  But it never makes a
 new socket. As you can see I print out the IO::Socket::GLOB and it shows the
 same 'reference' 10xff036c each time through. I realize this is because I am
 not closing and undef the $sock. (see the commented close and undef towards
 the end). But this works. Except if I shut down the machine I am calling the
 socket on. Then it dies and never comes back unless I reboot apache. Not a
 good work position to get a web site into.
 

Set in httpd.conf ThreadsPerChild 1

This problem should go away.  Its a bug I ran into for the first time
a few years back, and seems to have to do with any network sockets
that you might open.  

See 
http:[EMAIL PROTECTED]
for my original post on this, showing our similar plights!

--Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks - Web Link Checking  Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Curious About Require

2001-06-20 Thread Perrin Harkins

I hate to belabor this point, but I don't want people to get the wrong idea:

  BEGIN { do '/foo/bar/query.pl'; }

 Sorry, I guess I should have been more explicit. I don't want to
 require in the file on every request, but rather only allow the
 same file to be require'd multiple times (to install the same sub
 routines into different packages).

That's what this accomplishes.  It only runs once, being inside of a BEGIN
block.  Using do() instead of require() skips the %INC check, so you don't
have to delete anything from %INC this way.  Of course, do() doesn't check
to see if your module returned true, but they are basically equivalent.
TMTOWTDI.

- Perrin




Re: Requests using If-Modified-Since cause response Set-Cookie to be discarded

2001-06-20 Thread Nenad Steric

Hi,

Thanks for your answer, saved me days of probably fruitless fidling around with 
modperl.
Your solution solved my problems (see Sending Cookies on Page-Reload)
the question remains if this violates some RFC's (or breaks some browsers), 
and if there is some other way - like faking that the file-date has changed.
(i am not quite confortable with patching every new apache version again, 
or would it be a good idea to send this to the apache-guys ?)

Thanks again,

Nenad

Andrew Gilmartin wrote:
 
   How can I force Apache to send the Set-Cookie header even if the
   document being delivered has not changed? I suspect that I am not
 the
   first person to run into this problem. A search of the list was
   unsuccessful, unfortunately.
 
  i've not tested, but it looks like Set-Cookie is left out on purpose
  (maybe an http rfc compliance thing or just a bug), this patch might
  help..
 
  --- src/main/http_protocol.c~   Tue Apr 17 11:30:14 2001
  +++ src/main/http_protocol.cTue Jun 19 09:46:29 2001
  @@ -2637,6 +2637,7 @@
   Warning,
   WWW-Authenticate,
   Proxy-Authenticate,
  +Set-Cookie,
   NULL);
 
   terminate_header(r-connection-client);
 
 I tested it and it works. Thank you for such a quick and authoritative
 answer.
 
 -- Andrew
 
 ---
 Andrew Gilmartin
 Ingenta / Dynamic Diagrams
 [EMAIL PROTECTED]



Re: InstallProblem mod_perl125 on Win2000 and Apache1.3.20

2001-06-20 Thread Randy Kobes

On Wed, 20 Jun 2001, Michael Heinen wrote:

 Hy

 I have a problem to install mod_perl1.25 for Apache 1.3.20 on Win2000.

 ActivePerl-5.6.1.626 I have installed on my system and Apache is running in
 C:\Apache.

 mod_perl-1.25.tar.gz is extracted to C:\temp\perl.


 Now I try to generate the makefile with following line.
perl Makefile.PL APACHE_SRC=C:\Apache\src INSTALL_DLL=C:\Apache\modules

 This results in the following error message:
   Cannot find ApacheCore.lib under C:/Apache/src/Release

 This directory does not exist on my system.
 The file ApacheCore.lib is in the directory C:/Apache/libexec.

 So what can I do now ?
 Michael


The above procedure for Win32 assumes that Apache has been built
already under APACHE_SRC and that the libraries are located there. The
quick thing to do here, short of changing Makefile.PL to search other
places, is to place ApacheCore.lib in the directory being asked for.

One advantage to building Apache under APACHE_SRC first is that,
apart from finding the .h and .lib files here, this information
will be saved in Apache::MyConfig.pm which can then be accessed
when building other modules (like libapreq) that require it.

best regards,
randy kobes




Socket On NT Resolved

2001-06-20 Thread Purcell, Scott

Hello,
Well after two weeks of posting that socket issue up on this site, one
member came forward with the following info:

Set in httpd.conf ThreadsPerChild 1

This problem should go away.  Its a bug I ran into for the first time
a few years back, and seems to have to do with any network sockets
that you might open.  

See
http://forum.swarthmore.edu/epigone/modperl/crestehtwimp/35970707.7BBCB1F4@a
lumni.stanford.org
for my original post on this, showing our similar plights!


This fixed the problem, so maybe the next guy that runs into this won't have
to go through the same issues as I had.



Scott Purcell




Sudden mod_perl weirdness

2001-06-20 Thread Isaac Horton

I could really use some help. I checked in all the faq's and common problem
sections to no avail. So hear is my problem, bearing in mind that I do not
have my own server. I rent space, so all my problems are via the .htaccess
file. Basically everything was fine and then poof I get internal server
errors on all my web sites. My error logs are all complaining about the
SetEnv and SetHandler directives even though I can use perl/perl
sections with no problem. Any help would be appreciated.

[Wed Jun 20 07:45:19 2001] [alert] [client 209.17.79.38]
/usr/local/www/users/jpmktg/html/.htaccess: SetEnv not allowed here
[Wed Jun 20 07:45:19 2001] [alert] [client 209.17.79.38]
/usr/local/www/users/jpmktg/html/.htaccess: SetHandler not allowed here


Thanks in advance,
Isaac




RE: Sudden mod_perl weirdness

2001-06-20 Thread Geoffrey Young


-Original Message-
From: Isaac Horton
To: mod_perl
Sent: 6/20/01 6:44 PM
Subject: Sudden mod_perl weirdness

I could really use some help. I checked in all the faq's and common
problem
sections to no avail. So hear is my problem, bearing in mind that I do
not
have my own server. I rent space, so all my problems are via the
.htaccess
file. Basically everything was fine and then poof I get internal server
errors on all my web sites. My error logs are all complaining about the
SetEnv and SetHandler directives even though I can use perl/perl
sections with no problem. Any help would be appreciated.

[Wed Jun 20 07:45:19 2001] [alert] [client 209.17.79.38]
/usr/local/www/users/jpmktg/html/.htaccess: SetEnv not allowed here
[Wed Jun 20 07:45:19 2001] [alert] [client 209.17.79.38]
/usr/local/www/users/jpmktg/html/.htaccess: SetHandler not allowed here

looks like somebody took away your

AllowOverride FileInfo

setting - both have context bits of OR_FILEINFO

--Geoff



Re: Long application.Session timeouted.

2001-06-20 Thread Joshua Chamas

Landin Nikolay wrote:
 
 Hi, all
 I have a problem.
 I am using Apache::ASP module.

There is a new Apache::ASP mailing list.  You can subscribe
to it at [EMAIL PROTECTED]

 When I try to do a long process - the client page write Page not found
 after some period.
 
 How can I to tell client, that server application is still working?
 

If you really need to keep the client busy, then try a 
  $Response-Write(\n); $Response-Flush;
The web browser just needs to see something from time
to time.

 May be - I must just change some Session variables?
 

No, this is all server side.

If its a long job, like a big SQL command being executed
then you might have to take a different approach because
your process will lock waiting for the SQL command execute
to return.  In this case you might try forking a job into 
the background and waiting for its results.  You might
also try something like a meta refresh on itself, and 
keep checking for whether the job is done.

-- Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks - Web Link Checking  Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051