Knowing the connection status

2002-11-07 Thread Jon
Hi list,

I'm currently working on a project that uses a closed source C api. I know the 
functions and what they return but have no clue what happends in the background. To be 
able to use this with mod_perl I've made a module using perlxs that basicly is a 
wrapper around the API's functions. This API connects to a server and can only handle 
one connection at the time so my wrapper needs to know if it is connected and avoid 
connecting again if it allready is connected. There is no reasonable way I can test my 
connection status, ie there is no get_connection_status or equivalent function I can 
call. Trying to fetch or send data if there is no connection will force me to wait for 
the timeout which I can't do since all scripts using the API will be extremly slow 
then. The connect function is very slow too, it takes a few secs to do the connect so 
I don't want to do extra connects either, plus it seems to result in core dumps when I 
try to do connect if I'm allready connected.

I was first thinking about using a global variable in the wrapper's connect function 
but I'm not sure what would happend if the script crashes, will the httpd process die 
and the global variable be reseted or will it be set to CONNECTED when the next 
request comes to that child?

So to stop my ramble and get on with my question, how should I approach this in a way 
that guarantees that I'll only do connect/disconnect if needed and also be able to 
keep track of my status in a safe way? If you're thinking refuse to do it, go to the 
makers of the API and beat them untill they fix it up or snort/strace the API and make 
your own API based of what they send, I've allready thought about it and I've come to 
the conclusion they're not options :)

/Jon



RE: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Gareth Kirwan
You need to set Mason up better - probably.

I'm an avid Mason user, and I've seen this a fair few times.
If you want help, you're most likely to get it on the
[EMAIL PROTECTED] list.
However if you want to tell me the version of mason you're using it might
help.

You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
Lexer / Compiller components.

There should be a require statement in your httpd.conf.
This gives you better control over data structures, variable scopes, and an
opportunity to handle persistent database connections better in the handler.

Check out the information on http://www.masonhq.com

Hope this helps.

Gareth

-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
Sent: 06 November 2002 23:25
To: [EMAIL PROTECTED]
Subject: Can't locate object method new via package Apache::Request
(via Mason)...


Hey guys,

You may remember me from such messages as I can't get mod_perl to compile
on Irix64 systems!.  Well now I've got a whole new problem that I need your
expertise on.

I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
whenever I go to a page that should be handled by Mason (a perl templating
system), I get the following error message:

[Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
package Apache::Request at
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.


My guess is that this (at some level)involves a configuration error of some
kind.  I added the following lines to my httpd.conf file per the
instructions on Mason's website:

---
PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch
-

So I'm not sure what's going on here.   I looked through Apache/Request.pm
and found no new method and I didn't find one inside of Apache.pm either
(from which the Request module inherets).  However, I'm assuming this is all
correct and some magical ultra-Perl-guru AUTOLOAD-like functionality is
going on somewhere.


Does anyone have any ideas about what may be causing this?


Thanks,
DeAngelo






Trouble using mod_perl and IE5.x, IE6.x

2002-11-07 Thread simon

Hi,
I'm using Apache 1.3.26, mod_perl 1.26 and perl 5.6.1 on a HPUX 11
system.
My program genarate HTML page with perl cgi.

Sometimes, html pages are lost by the IE browser :
Internet  Explorer chooses to display the default Microsoft internal
server error  page instead of the generate HTML page.
This HTML page is well generated but the code is in the error_log file
of the http server.
This trouble don't appear every time on the same page.
There is no trouble with Netscape 7.


Thanks in advance for your help
Regards

Christophe




Errors after converting /cgi-bin to PerlRun

2002-11-07 Thread Frank Naude (FJ)
Hi,

I'm trying to convert my /cgi-bin directory to PerlRun as it only
contain Perl scripts. However, after doing so, I get numerous errors
like this:

  [Wed Nov  6 11:34:21 2002] [error] Can't locate object method uri
via
  package Apache::PerlRun at
  /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/PerlRun.pm line
212.

I think it happens when processing a require FILE; contruct.

My Apache config:

  # ScriptAlias /cgi-bin/ /home/virtual/site1/fst/var/www/cgi-bin/
  Alias /cgi-bin/ /home/virtual/site1/fst/var/www/cgi-bin/
  Directory /home/virtual/site1/fst/var/www/cgi-bin
 AllowOverride All
 SetHandler   perl-script
 PerlHandler  Apache::PerlRun
 Options  +ExecCGI
 PerlSendHeader On
  /Directory
  SetEnv SITE_CGIROOT /home/virtual/site1/fst/var/www/cgi-bin

My software versions:

  Embedded Perl version v5.6.0 for Apache/1.3.22 (Unix)
(Red-Hat/Linux)
  mod_jk/1.2.0
  mod_perl/1.24_01
  PHP/4.1.1
  FrontPage/5.0.2
  mod_ssl/2.8.5
  OpenSSL/0.9.6b

Please help.

Frank Naude



Re: Knowing the connection status

2002-11-07 Thread Lupe Christoph
Please wrap your extremely long lines!

On Thursday, 2002-11-07 at 09:47:12 +0100, Jon wrote:

 I'm currently working on a project that uses a closed source C api. I know the 
functions and what they return but have no clue what happends in the background. To 
be able to use this with mod_perl I've made a module using perlxs that basicly is a 
wrapper around the API's functions. This API connects to a server and can only handle 
one connection at the time so my wrapper needs to know if it is connected and avoid 
connecting again if it allready is connected. There is no reasonable way I can test 
my connection status, ie there is no get_connection_status or equivalent function I 
can call. Trying to fetch or send data if there is no connection will force me to 
wait for the timeout which I can't do since all scripts using the API will be 
extremly slow then. The connect function is very slow too, it takes a few secs to do 
the connect so I don't want to do extra connects either, plus it seems to result in 
core dumps when I try to do connect if I'm allready connected.

 I was first thinking about using a global variable in the wrapper's connect function 
but I'm not sure what would happend if the script crashes, will the httpd process die 
and the global variable be reseted or will it be set to CONNECTED when the next 
request comes to that child?

If you have a C global variable, it is local to the process. If your
Perl code dies or exits, the http process will go and take that variable
with it. If you catch a die in an eval, the variable will stay, of
course.

Are you saying that each client side can only have one connection, or is
the server limited to one connection? OIf that is the case, you would
need a system-global status in an intermediate server (between Apache
and whatever the API talks to).

 So to stop my ramble and get on with my question, how should I approach this in a 
way that guarantees that I'll only do connect/disconnect if needed and also be able 
to keep track of my status in a safe way? If you're thinking refuse to do it, go to 
the makers of the API and beat them untill they fix it up or snort/strace the API and 
make your own API based of what they send, I've allready thought about it and I've 
come to the conclusion they're not options :)

If you have one connection per client, you can do lazy evaluation, i.e.
connect whenever works needs to be done, and cache the connection until
the Apache process exits.

HTH,
Lupe Christoph
-- 
| [EMAIL PROTECTED]   |   http://www.lupe-christoph.de/ |
| Big Misunderstandings #6398: The Titanic was not supposed to be|
| unsinkable. The designer had a speech impediment. He said: I have |
| thith great unthinkable conthept ...  |



Re: Getting the server to parse files after the handler has doneits work...

2002-11-07 Thread Luis Fagundes
I think you can only do this in Apache 2.0. In Apache 1.3 you can chain 
perl modules with OutputChain, but you can't chain a perl module and 
another apache module.

Per Einar Ellefsen wrote:
Hello Simran,

At 00:50 07.11.2002, simran wrote:


I have the following scenario:

  * A Perl Handler i have written does a bit of work and
outputs HTML

  * The HTML it outputs contains HTML like:

  !--#include virtual=/includes/misc/topnav.html --

I need this to be further parsed by Apache's Server Parsing
Process.

Does anyone know what i have to do for the above to work.



You want Apache::OutputChain or Apache::Filter together with an SSI 
module. See 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainChain_Stacked_Perl_Handlers 
and the paragraph below that for Apache::Filter.








[Win32] nmake error compiling mod_perl.so

2002-11-07 Thread jheckel
Hi
since two weeks I can no longer compile the mod_perl-2.0 package from 
the snapshot server without errors. The last good compilation was 
10/27/2002:-(

Apache version 2.0.44-dev, WinXP, Perl 5.6.1 Build 633.

My install commands:
perl Makefile.PL MP_AP_PREFIX=f:/apache2
nmake
nmake install


.
C:\Programme\Microsoft Visual Studio\VC98\lib\msvcrt.lib -def:Access.def
   Creating library ..\..\..\blib\arch\auto\Apache\Access\Access.lib 
and object
..\..\..\blib\arch\auto\Apache\Access\Access.exp
Access.obj : error LNK2001: unresolved external symbol _newSVpvf
..\..\..\blib\arch\auto\Apache\Access\Access.dll : fatal error LNK1120: 
1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

I don't know where to search for this problem.

Juergen


Re: OO handlers

2002-11-07 Thread Michael Schout
Geoffrey Young wrote:


interesting.  the last time I tried was with bleedperl before 5.8 was
released - I know it worked then because I was writing a patch for
mod_perl core based on it.  this thread has most of the dialogue:



Hrm.  Well, not sure how the :method attribute is implemented, but what 
I was trying to do was create a :Profiled attribute handler.  So in my 
base class I had:

use Attribute::Handlers;

sub Profiled ATTR(CODE) { ... }

and in a subclass:

sub foo :Profiled {
}

but I was never able to get the Profiled handler to get called.  I 
looked into Attribute::Handlers and it has INIT and CHECK blocks that 
set up the handlers in it, so I suspected this might be the problem. 
Doug claims that CHECK blocks dont work because perl calls CHECK blocks 
during perl_parse(), which only happens once at startup.  So he said 
that it doesnt work for the same reason that:

perl -e 'eval qq(CHECK { print hello world })'

doesnt work.

I tried just putting a CHECK block with a warn in my application, and it 
is true that the the CHECK block never gets called.  So given that it 
seems impossible that the Attribute::Handlers module can work under 
mod_perl.

Given that though, I dont doubt that the :method handler works for you 
:).  Maybe this is implemented as a special case in mod_perl??

Mike



Re: Getting the server to parse files after the handler has doneits work...

2002-11-07 Thread Michael Schout
Luis Fagundes wrote:


I think you can only do this in Apache 2.0. In Apache 1.3 you can chain
perl modules with OutputChain, but you can't chain a perl module and
another apache module.



You CAN do this in 1.3 using Apache::Filter and Apache::SSI.

I replied privately to Simran pointing him to these modules, but forgot 
to CC the list.

Anyway, just wanted to clarify to the list that this is definately 
possible with 1.3 in case others were curious :).

Regards,
Mike



Re: Getting the server to parse files after the handler has done its work...

2002-11-07 Thread Per Einar Ellefsen
At 13:30 07.11.2002, Luis Fagundes wrote:

I think you can only do this in Apache 2.0. In Apache 1.3 you can chain 
perl modules with OutputChain, but you can't chain a perl module and 
another apache module.

And that is why the Apache::SSI and similar modules exist, which duplicate 
the mod_include functionality. This is described at the link below


Per Einar Ellefsen wrote:

Hello Simran,
At 00:50 07.11.2002, simran wrote:


I have the following scenario:

  * A Perl Handler i have written does a bit of work and
outputs HTML

  * The HTML it outputs contains HTML like:

  !--#include virtual=/includes/misc/topnav.html --

I need this to be further parsed by Apache's Server Parsing
Process.

Does anyone know what i have to do for the above to work.


You want Apache::OutputChain or Apache::Filter together with an SSI 
module. See 
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__OutputChainChain_Stacked_Perl_Handlers 
and the paragraph below that for Apache::Filter.

--
Per Einar Ellefsen
[EMAIL PROTECTED]






Re: Trouble using mod_perl and IE5.x, IE6.x

2002-11-07 Thread simon
Hello,
I'm not generating an error page.
The trouble occurs for sample with this little simple script (sometime on 1 browser 
using 16 browsers simultanly for sample) :

print(html);
sleep (5);
print(head);
print(titleTITRE DE LA PAGE\/title);
print (META http-equiv=\PRAGMA\ content=\NO-CACHE\);
print(\/head);
print(body bgcolor=\red\);
print (SAMPLE TROUBLE HTML PAGE);
print(\/body);
sleep (5);
print (\/html);


Thanks for your help.
Christophe.


Per Einar Ellefsen wrote:

 Hello Christophe,

 At 11:55 07.11.2002, simon wrote:

 Hi,
 I'm using Apache 1.3.26, mod_perl 1.26 and perl 5.6.1 on a HPUX 11
 system.
 My program genarate HTML page with perl cgi.
 
 Sometimes, html pages are lost by the IE browser :
 Internet  Explorer chooses to display the default Microsoft internal
 server error  page instead of the generate HTML page.
 This HTML page is well generated but the code is in the error_log file
 of the http server.
 This trouble don't appear every time on the same page.
 There is no trouble with Netscape 7.

 If it is an error page you are generating (it seems like it), you have hit
 a known problem with IE described with a solution here:
 
http://perl.apache.org/docs/tutorials/client/browserbugs/browserbugs.html#Internet_Explorer_disregards_your_ErrorDocuments

 --
 Per Einar Ellefsen
 [EMAIL PROTECTED]

--
Christophe SIMON

EVER TEAM
Knowledge Into Action
Immeuble l'Aquilon - 40 b rue de la Villette 69425 LYON Cedex 03 - FRANCE
Tél. : +33 (0)4 26 68 33 00 - Fax  : +33 (0)4 26 68 33 16
mailto:c.simon;ever-team.com - Site Web : http://www.ever-team.com





RE: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread DeAngelo Lampkin
Hi Gareth,

I'm using the latest version of Mason, Mason 1.15.  As I posted in my previous email, 
I put the following lines into my httpd.conf file per the instructions on Mason's 
website:

PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch

The reason this wasn't posted on a Mason mailing list is that this didn't seem like a 
Mason problem per se and the Mason mailing list page specifically mentioned the Apache 
Request object (at least in part the source of my problem)as being something that is 
not directly Mason related( http://lists.sourceforge.net/lists/listinfo/mason-users ). 
 So I took the advice of the list moderator and posted on the mod_perl list instead.

Thanks!

DeAngelo

-Original Message-
From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
Sent: Thursday, November 07, 2002 1:44 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: RE: Can't locate object method new via package
Apache::Request (via Mason)...


You need to set Mason up better - probably.

I'm an avid Mason user, and I've seen this a fair few times.
If you want help, you're most likely to get it on the
[EMAIL PROTECTED] list.
However if you want to tell me the version of mason you're using it might
help.

You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
Lexer / Compiller components.

There should be a require statement in your httpd.conf.
This gives you better control over data structures, variable scopes, and an
opportunity to handle persistent database connections better in the handler.

Check out the information on http://www.masonhq.com

Hope this helps.

Gareth

-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
Sent: 06 November 2002 23:25
To: [EMAIL PROTECTED]
Subject: Can't locate object method new via package Apache::Request
(via Mason)...


Hey guys,

You may remember me from such messages as I can't get mod_perl to compile
on Irix64 systems!.  Well now I've got a whole new problem that I need your
expertise on.

I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
whenever I go to a page that should be handled by Mason (a perl templating
system), I get the following error message:

[Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
package Apache::Request at
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.


My guess is that this (at some level)involves a configuration error of some
kind.  I added the following lines to my httpd.conf file per the
instructions on Mason's website:

---
PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch
-

So I'm not sure what's going on here.   I looked through Apache/Request.pm
and found no new method and I didn't find one inside of Apache.pm either
(from which the Request module inherets).  However, I'm assuming this is all
correct and some magical ultra-Perl-guru AUTOLOAD-like functionality is
going on somewhere.


Does anyone have any ideas about what may be causing this?


Thanks,
DeAngelo






RE: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Gareth Kirwan
What version of perl ?

Post 1.12 Mason has problems with perl 5.6.0 I believe ( or maybe .1 as
well )

You're quite right about the problem not necessarily being a mason one.
However as a mason user - you're likely to get help there all the same on
things that are border line mason ( the new Request object is created IN
ApacheHanler.pm )

Try this:

Change your httpd.conf to use a mason-handler.
Create a mason-handler.pl in either your @INC or your apache root.
I put mine in the later ( /etc/httpd/ on my system ).
Make sure the ownership / permissions of the mason-handler allow execution
( chmod +x if you must )

httpd.conf
-
PerlRequire mason-handler.pl

Directory /var/virtual/www.mason-site.com
FilesMatch \.(html|js|css)$
SetHandler perl-script
PerlHandler HTML::Mason
/FilesMatch
/Directory


mason-handler.pl
-

package HTML::Mason;
use HTML::Mason;
use HTML::Mason::ApacheHandler();
use strict;

my $ah = new HTML::Mason::ApacheHandler (
comp_root='/var/virtual/www.mason-site.com/'
data_dir='/var/virtual/HTML-Mason/data'
);

chown ( 99, 99, $ah-interp-files_written );
{
package HTML::Mason::Commands;
use HTML::Entities;
use vars qw($global1 $global2 $global3);
$_escape = sub { my $text = join '', @_;
HTML::Mason::Escapes::basic_html_escape(\$text); return $text }
}
1;

sub handler
{
my ($r) = @_;
return -1 if $r-content_type  $r-content_type =~ m|^image/|i;
$ah-handle_request($r);
}
==

That's akin to what we use.
Obviously change the /var/virtual to whatever you use as your root - and
HTML-Mason is just where I wanted to keep our data for cache and stuff.
The $globals are just examples.

Once you've done this - let me know if you still get the same problem.

Remember to keep copies of all files you change.
I'd advice RCS/CVS ( i use the former ) for things like httpd.conf if you
want to keep it tidy.

Regards

Gareth
-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
Sent: 07 November 2002 17:54
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Can't locate object method new via package
Apache::Request (via Mason)...


Hi Gareth,

I'm using the latest version of Mason, Mason 1.15.  As I posted in my
previous email, I put the following lines into my httpd.conf file per the
instructions on Mason's website:

PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch

The reason this wasn't posted on a Mason mailing list is that this didn't
seem like a Mason problem per se and the Mason mailing list page
specifically mentioned the Apache Request object (at least in part the
source of my problem)as being something that is not directly Mason
related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
took the advice of the list moderator and posted on the mod_perl list
instead.

Thanks!

DeAngelo

-Original Message-
From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
Sent: Thursday, November 07, 2002 1:44 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: RE: Can't locate object method new via package
Apache::Request (via Mason)...


You need to set Mason up better - probably.

I'm an avid Mason user, and I've seen this a fair few times.
If you want help, you're most likely to get it on the
[EMAIL PROTECTED] list.
However if you want to tell me the version of mason you're using it might
help.

You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
Lexer / Compiller components.

There should be a require statement in your httpd.conf.
This gives you better control over data structures, variable scopes, and an
opportunity to handle persistent database connections better in the handler.

Check out the information on http://www.masonhq.com

Hope this helps.

Gareth

-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
Sent: 06 November 2002 23:25
To: [EMAIL PROTECTED]
Subject: Can't locate object method new via package Apache::Request
(via Mason)...


Hey guys,

You may remember me from such messages as I can't get mod_perl to compile
on Irix64 systems!.  Well now I've got a whole new problem that I need your
expertise on.

I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
whenever I go to a page that should be handled by Mason (a perl templating
system), I get the following error message:

[Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
package Apache::Request at
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.


My guess is 

Re: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Tim Tompkins
Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
anyway.


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: DeAngelo Lampkin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 10:54 AM
Subject: RE: Can't locate object method new via package Apache::Request
(via Mason)...


Hi Gareth,

I'm using the latest version of Mason, Mason 1.15.  As I posted in my
previous email, I put the following lines into my httpd.conf file per the
instructions on Mason's website:

PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch

The reason this wasn't posted on a Mason mailing list is that this didn't
seem like a Mason problem per se and the Mason mailing list page
specifically mentioned the Apache Request object (at least in part the
source of my problem)as being something that is not directly Mason
related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
took the advice of the list moderator and posted on the mod_perl list
instead.

Thanks!

DeAngelo

-Original Message-
From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
Sent: Thursday, November 07, 2002 1:44 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: RE: Can't locate object method new via package
Apache::Request (via Mason)...


You need to set Mason up better - probably.

I'm an avid Mason user, and I've seen this a fair few times.
If you want help, you're most likely to get it on the
[EMAIL PROTECTED] list.
However if you want to tell me the version of mason you're using it might
help.

You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
Lexer / Compiller components.

There should be a require statement in your httpd.conf.
This gives you better control over data structures, variable scopes, and an
opportunity to handle persistent database connections better in the handler.

Check out the information on http://www.masonhq.com

Hope this helps.

Gareth

-Original Message-
From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
Sent: 06 November 2002 23:25
To: [EMAIL PROTECTED]
Subject: Can't locate object method new via package Apache::Request
(via Mason)...


Hey guys,

You may remember me from such messages as I can't get mod_perl to compile
on Irix64 systems!.  Well now I've got a whole new problem that I need your
expertise on.

I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
whenever I go to a page that should be handled by Mason (a perl templating
system), I get the following error message:

[Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
package Apache::Request at
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.


My guess is that this (at some level)involves a configuration error of some
kind.  I added the following lines to my httpd.conf file per the
instructions on Mason's website:

---
PerlModule HTML::Mason::ApacheHandler
FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch
-

So I'm not sure what's going on here.   I looked through Apache/Request.pm
and found no new method and I didn't find one inside of Apache.pm either
(from which the Request module inherets).  However, I'm assuming this is all
correct and some magical ultra-Perl-guru AUTOLOAD-like functionality is
going on somewhere.


Does anyone have any ideas about what may be causing this?


Thanks,
DeAngelo






Re: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Tim Tompkins
You should pre-load Apache::Request anyway,

PerlModule Apache::Request
PerlModule HTML::Mason::ApacheHandler

FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: Tim Tompkins [EMAIL PROTECTED]
To: DeAngelo Lampkin [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:08 AM
Subject: Re: Can't locate object method new via package Apache::Request
(via Mason)...


 Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
 anyway.


 Regards,

 Tim Tompkins
 --
 Programmer
 http://www.clipart.com/
 http://www.rebelartist.com/
 --
 - Original Message -
 From: DeAngelo Lampkin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, November 07, 2002 10:54 AM
 Subject: RE: Can't locate object method new via package
Apache::Request
 (via Mason)...


 Hi Gareth,

 I'm using the latest version of Mason, Mason 1.15.  As I posted in my
 previous email, I put the following lines into my httpd.conf file per the
 instructions on Mason's website:

 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch

 The reason this wasn't posted on a Mason mailing list is that this didn't
 seem like a Mason problem per se and the Mason mailing list page
 specifically mentioned the Apache Request object (at least in part the
 source of my problem)as being something that is not directly Mason
 related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
 took the advice of the list moderator and posted on the mod_perl list
 instead.

 Thanks!

 DeAngelo

 -Original Message-
 From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
 Sent: Thursday, November 07, 2002 1:44 AM
 To: DeAngelo Lampkin; [EMAIL PROTECTED]
 Subject: RE: Can't locate object method new via package
 Apache::Request (via Mason)...


 You need to set Mason up better - probably.

 I'm an avid Mason user, and I've seen this a fair few times.
 If you want help, you're most likely to get it on the
 [EMAIL PROTECTED] list.
 However if you want to tell me the version of mason you're using it might
 help.

 You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
 Lexer / Compiller components.

 There should be a require statement in your httpd.conf.
 This gives you better control over data structures, variable scopes, and
an
 opportunity to handle persistent database connections better in the
handler.

 Check out the information on http://www.masonhq.com

 Hope this helps.

 Gareth

 -Original Message-
 From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
 Sent: 06 November 2002 23:25
 To: [EMAIL PROTECTED]
 Subject: Can't locate object method new via package Apache::Request
 (via Mason)...


 Hey guys,

 You may remember me from such messages as I can't get mod_perl to compile
 on Irix64 systems!.  Well now I've got a whole new problem that I need
your
 expertise on.

 I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
 whenever I go to a page that should be handled by Mason (a perl templating
 system), I get the following error message:
 
 [Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
 package Apache::Request at
 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.
 

 My guess is that this (at some level)involves a configuration error of
some
 kind.  I added the following lines to my httpd.conf file per the
 instructions on Mason's website:

 ---
 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch
 -

 So I'm not sure what's going on here.   I looked through Apache/Request.pm
 and found no new method and I didn't find one inside of Apache.pm either
 (from which the Request module inherets).  However, I'm assuming this is
all
 correct and some magical ultra-Perl-guru AUTOLOAD-like functionality is
 going on somewhere.


 Does anyone have any ideas about what may be causing this?


 Thanks,
 DeAngelo







RE: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Gareth Kirwan
Tim - Did you not get the 18:06 email of mine ?

It uses a handler instead.

So he wouldn't be using this method anyway - if he decided to follow my
suggestion.


By the way - i'm new to this list - :-)

Gareth

-Original Message-
From: Tim Tompkins [mailto:timt;arttoday.com]
Sent: 07 November 2002 18:16
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: Re: Can't locate object method new via package
Apache::Request (via Mason)...


You should pre-load Apache::Request anyway,

PerlModule Apache::Request
PerlModule HTML::Mason::ApacheHandler

FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: Tim Tompkins [EMAIL PROTECTED]
To: DeAngelo Lampkin [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:08 AM
Subject: Re: Can't locate object method new via package Apache::Request
(via Mason)...


 Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
 anyway.


 Regards,

 Tim Tompkins
 --
 Programmer
 http://www.clipart.com/
 http://www.rebelartist.com/
 --
 - Original Message -
 From: DeAngelo Lampkin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, November 07, 2002 10:54 AM
 Subject: RE: Can't locate object method new via package
Apache::Request
 (via Mason)...


 Hi Gareth,

 I'm using the latest version of Mason, Mason 1.15.  As I posted in my
 previous email, I put the following lines into my httpd.conf file per the
 instructions on Mason's website:

 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch

 The reason this wasn't posted on a Mason mailing list is that this didn't
 seem like a Mason problem per se and the Mason mailing list page
 specifically mentioned the Apache Request object (at least in part the
 source of my problem)as being something that is not directly Mason
 related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
 took the advice of the list moderator and posted on the mod_perl list
 instead.

 Thanks!

 DeAngelo

 -Original Message-
 From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
 Sent: Thursday, November 07, 2002 1:44 AM
 To: DeAngelo Lampkin; [EMAIL PROTECTED]
 Subject: RE: Can't locate object method new via package
 Apache::Request (via Mason)...


 You need to set Mason up better - probably.

 I'm an avid Mason user, and I've seen this a fair few times.
 If you want help, you're most likely to get it on the
 [EMAIL PROTECTED] list.
 However if you want to tell me the version of mason you're using it might
 help.

 You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
 Lexer / Compiller components.

 There should be a require statement in your httpd.conf.
 This gives you better control over data structures, variable scopes, and
an
 opportunity to handle persistent database connections better in the
handler.

 Check out the information on http://www.masonhq.com

 Hope this helps.

 Gareth

 -Original Message-
 From: DeAngelo Lampkin [mailto:dlampkin;xencor.com]
 Sent: 06 November 2002 23:25
 To: [EMAIL PROTECTED]
 Subject: Can't locate object method new via package Apache::Request
 (via Mason)...


 Hey guys,

 You may remember me from such messages as I can't get mod_perl to compile
 on Irix64 systems!.  Well now I've got a whole new problem that I need
your
 expertise on.

 I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
 whenever I go to a page that should be handled by Mason (a perl templating
 system), I get the following error message:
 
 [Wed Nov  6 11:56:20 2002] [error] Can't locate object method new via
 package Apache::Request at
 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878.
 

 My guess is that this (at some level)involves a configuration error of
some
 kind.  I added the following lines to my httpd.conf file per the
 instructions on Mason's website:

 ---
 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch
 -

 So I'm not sure what's going on here.   I looked through Apache/Request.pm
 and found no new method and I didn't find one inside of Apache.pm either
 (from which the Request module inherets).  However, I'm assuming this is
all
 correct and some 

Re: Can't locate object method new via package Apache::Request (via Mason)...

2002-11-07 Thread Tim Tompkins
Sure I did.  I was just keeping my response to the context of his present
configuration according to the sample he sent.


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: Gareth Kirwan [EMAIL PROTECTED]
To: Tim Tompkins [EMAIL PROTECTED]; DeAngelo Lampkin
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:20 AM
Subject: RE: Can't locate object method new via package Apache::Request
(via Mason)...


 Tim - Did you not get the 18:06 email of mine ?

 It uses a handler instead.

 So he wouldn't be using this method anyway - if he decided to follow my
 suggestion.


 By the way - i'm new to this list - :-)

 Gareth





RE: Can't locate object method new via package Apache::Request (via Mason)...SOLVED

2002-11-07 Thread DeAngelo Lampkin
Thanks to Tim, Gareth, and Phillippe:

OK, I'll start with the solution to the problem and then drag on a bit for how I found 
it.

The problem was the location of a shared object file for the Apache Request object.  A 
file called libapreq.so.1 was located in /usr/local/lib (should have been in 
/usr/lib), which was ok for the test script that Phillippe gave me and the one-liner 
that Gareth gave me, but was apparently NOT ok for Mason in the context of mod_perl.  
I didn't figure this out until I tried Tim's suggestion of preloading the 
Apache::Request module inside of httpd.conf.  I ended up getting this thing:

Syntax error on line 362 of /usr/local/apache/conf/httpd.conf:
Can't load 
'/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Apache/Request/Request.so'
 for module Apache::Request: libapreq.so.1: cannot open shared object file: No such 
file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 
229.
 at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/mod_perl.pm line 14
Compilation failed in require at (eval 4) line 3.

This isn't the most helpful error message in the world.  However, I knew Request.so 
and libapreq.so.1 were installed, but I didn't know if they were in places that the 
server process expected them to be.  So did a search for all the shared object files 
and noticed libapreq.so.1 file was sitting all by itself in /usr/local/lib, while 
about a billion other shared object files were inside of /usr/lib.  I moved 
libapreq.so.1 to the place where all the other cool shared object files hung out, 
crossed my fingers, and booya! It worked.  Apprently something about the way I 
configured the installation for libapreq was not very Mason friendly.

Anyway, thanks again for the help.  

DeAngelo

-Original Message-
From: Tim Tompkins [mailto:timt;arttoday.com]
Sent: Thursday, November 07, 2002 10:16 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: Re: Can't locate object method new via package
Apache::Request (via Mason)...


You should pre-load Apache::Request anyway,

PerlModule Apache::Request
PerlModule HTML::Mason::ApacheHandler

FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: Tim Tompkins [EMAIL PROTECTED]
To: DeAngelo Lampkin [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:08 AM
Subject: Re: Can't locate object method new via package Apache::Request
(via Mason)...


 Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
 anyway.


 Regards,

 Tim Tompkins
 --
 Programmer
 http://www.clipart.com/
 http://www.rebelartist.com/
 --
 - Original Message -
 From: DeAngelo Lampkin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, November 07, 2002 10:54 AM
 Subject: RE: Can't locate object method new via package
Apache::Request
 (via Mason)...


 Hi Gareth,

 I'm using the latest version of Mason, Mason 1.15.  As I posted in my
 previous email, I put the following lines into my httpd.conf file per the
 instructions on Mason's website:

 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch

 The reason this wasn't posted on a Mason mailing list is that this didn't
 seem like a Mason problem per se and the Mason mailing list page
 specifically mentioned the Apache Request object (at least in part the
 source of my problem)as being something that is not directly Mason
 related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
 took the advice of the list moderator and posted on the mod_perl list
 instead.

 Thanks!

 DeAngelo

 -Original Message-
 From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
 Sent: Thursday, November 07, 2002 1:44 AM
 To: DeAngelo Lampkin; [EMAIL PROTECTED]
 Subject: RE: Can't locate object method new via package
 Apache::Request (via Mason)...


 You need to set Mason up better - probably.

 I'm an avid Mason user, and I've seen this a fair few times.
 If you want help, you're most likely to get it on the
 [EMAIL PROTECTED] list.
 However if you want to tell me the version of mason you're using it might
 help.

 You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
 Lexer / Compiller components.

 There should be a require statement in your httpd.conf.
 This gives you better control over data structures, variable scopes, and
an
 opportunity to handle persistent database connections better in the
handler.

 Check out the information on http://www.masonhq.com

 Hope this helps.

 Gareth

 -Original 

[ANNOUNCE] Apache::ASP v2.47 released

2002-11-07 Thread Josh Chamas
Hey,

Apache::ASP v2.47 is released to CPAN.  It is a major upgrade
with significant speed improvements of 15-20% for script execution.

As this is a major release, please be sure to read the CHANGES
and test your sites before upgrading.  The CHANGES are listed below.

For more info on Apache::ASP, please see http://www.apache-asp.org

Regards,

Josh


Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com

$MODULE=Apache::ASP; $VERSION = 2.47; $DATE=11/6/2002

Please see README for changes for past versions.

 + = improvement;- = bug fix;(d) = documentation

 ++ Runtime speed enhancements for 15-20% improvement including:
   + INTERNAL API ReadFile() now returns scalar ref as memory optimization
   + cache InodeNames config setting in ASP object now for common lookups
   + removed CompileChecksum() INTERNAL API, since it was an unnecesary
 method decomposition along a common code path
   + removed IsChanged() INTERNAL API since compiling of scripts
 is now handled by CompileInclude() which does this functionality already
   + removed unnecessary decomp of IncludesChanged() INTERNAL API, which was along
 critical code path
   + do not call INTERNAL SearchDirs() API when compiling base script
 since we have already validated its path earlier
   + Use stat(_) type shortcut for stat()  -X calls where possible
   + Moved INC initilization up to handler()  consolidated with $INCDir lib
   + removed useless Apache::ASP::Collection::DESTROY
   + removed useless Apache::ASP::Server::DESTROY
   + removed useless Apache::ASP::GlobalASA::DESTROY
   + removed useless Apache::ASP::Response::DESTROY

 - Default path for $Response-{Cookies} was from CookiePath
   config, but this was incorrect as CookiePath config is only
   for $Session cookie, so now path for $Response-{Cookies}
   defaults to /

 - Fixed bug where global.asa events would get undefined with
   StatINC and GlobalPackage set when the GlobalPackage library
   changed  get reloaded.

 (d) Documented long time config NoCache.

 -- Fixed use with Apache::Filter, capable as both source
and destination filter.  Added ./site/eg/filter.filter example
to demonstrate these abilities.

 + Use $r-err_headers_out-add Apache::Table API for cookies
   now instead of $r-cgi_header_out.  Added t/cookies.t test to
   cover new code path as well as general $Response-Cookies API.
   Also make cookies headers sorted by cookie and dictionary key
   while building headers for repeatable behavior, this latter was
   to facilitate testing.

 - fixed $Server-Mail error_log output when failing to connect
   to SMTP server.

 + added tests to cover UniquePackages  NoCache configs since this
   config logic was updated

 + made deprecated warnings for use of certain $Response-Member
   calls more loadly write to error_log, so I can remove the AUTOLOAD
   for Response one day

 - Probably fixed behavior in CgiHeaders, at least under perl 5.8.0, and
   added t/cgi_headers.t to cover this config.

 + removed $Apache::ASP::CompressGzip setting ability, used to possibly
   set CompressGzip in the module before, not documented anyway

 + removed $Apache::ASP::Filter setting ability to set Filter globally,
   not documented anyway

 + removed old work around for setting ServerStarting to 0
   at runtime, which was bad for Apache::DBI on win32 a long
   time ago:

$Apache::ServerStarting and $Apache::ServerStarting = 0;

   If this code is still needed in Apache::ASP-handler() let
   me know.

 + check to make sure data in internal database is a HASH ref
   before using it for session garbage collection.  This is to
   help prevent against internal database corruption in a
   network share that does not support flock() file locking.

 + For new XMLSubs ASP type %= % argument interpolation
   activated with XMLSubsPerlArgs 0, data references can now
   be passed in addition to SCALAR/string references, so one
   can pass an object reference like so:

 my:tag value=%= $Object % /

   This will only work as long as the variable interpolation %= %
   are flushed against the containing   or ' ', or else the object
   reference will be stringified when it is concatenated with
   the rest of the data.

   Testing for this feature was added to ./t/xmlsubs_aspargs.t

   This feature is still experimental, and its interface may change.
   However it is slated for the 3.0 release as default method,
   so feedback is appreciated.

 + For new XMLSubs ASP type %= % argument interpolation
   activated with XMLSubsPerlArgs 0, % % will no longer work,
   just %= %, as in

 my:tag value=some value %= $value % more data /

   This feature is still experimental, and its interface may change.
   However it is slated for the 3.0 release as default method,
   so feedback is 

RE: Can't locate object method new via package Apache::Request (via Mason)...SOLVED

2002-11-07 Thread DeAngelo Lampkin
As a quick follow-up, the PerlModule Apache::Request line is NOT needed in the 
httpd.conf file for Mason to work.  However, it was a very valuable debugging tool.

-Original Message-
From: DeAngelo Lampkin 
Sent: Thursday, November 07, 2002 11:21 AM
To: Tim Tompkins; [EMAIL PROTECTED]
Subject: RE: Can't locate object method new via package
Apache::Request (via Mason)...SOLVED


Thanks to Tim, Gareth, and Phillippe:

OK, I'll start with the solution to the problem and then drag on a bit for how I found 
it.

The problem was the location of a shared object file for the Apache Request object.  A 
file called libapreq.so.1 was located in /usr/local/lib (should have been in 
/usr/lib), which was ok for the test script that Phillippe gave me and the one-liner 
that Gareth gave me, but was apparently NOT ok for Mason in the context of mod_perl.  
I didn't figure this out until I tried Tim's suggestion of preloading the 
Apache::Request module inside of httpd.conf.  I ended up getting this thing:

Syntax error on line 362 of /usr/local/apache/conf/httpd.conf:
Can't load 
'/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Apache/Request/Request.so'
 for module Apache::Request: libapreq.so.1: cannot open shared object file: No such 
file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 
229.
 at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/mod_perl.pm line 14
Compilation failed in require at (eval 4) line 3.

This isn't the most helpful error message in the world.  However, I knew Request.so 
and libapreq.so.1 were installed, but I didn't know if they were in places that the 
server process expected them to be.  So did a search for all the shared object files 
and noticed libapreq.so.1 file was sitting all by itself in /usr/local/lib, while 
about a billion other shared object files were inside of /usr/lib.  I moved 
libapreq.so.1 to the place where all the other cool shared object files hung out, 
crossed my fingers, and booya! It worked.  Apprently something about the way I 
configured the installation for libapreq was not very Mason friendly.

Anyway, thanks again for the help.  

DeAngelo

-Original Message-
From: Tim Tompkins [mailto:timt;arttoday.com]
Sent: Thursday, November 07, 2002 10:16 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: Re: Can't locate object method new via package
Apache::Request (via Mason)...


You should pre-load Apache::Request anyway,

PerlModule Apache::Request
PerlModule HTML::Mason::ApacheHandler

FilesMatch \.msn$
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
/FilesMatch


Regards,

Tim Tompkins
--
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
--
- Original Message -
From: Tim Tompkins [EMAIL PROTECTED]
To: DeAngelo Lampkin [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:08 AM
Subject: Re: Can't locate object method new via package Apache::Request
(via Mason)...


 Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
 anyway.


 Regards,

 Tim Tompkins
 --
 Programmer
 http://www.clipart.com/
 http://www.rebelartist.com/
 --
 - Original Message -
 From: DeAngelo Lampkin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, November 07, 2002 10:54 AM
 Subject: RE: Can't locate object method new via package
Apache::Request
 (via Mason)...


 Hi Gareth,

 I'm using the latest version of Mason, Mason 1.15.  As I posted in my
 previous email, I put the following lines into my httpd.conf file per the
 instructions on Mason's website:

 PerlModule HTML::Mason::ApacheHandler
 FilesMatch \.msn$
 SetHandler perl-script
 PerlHandler HTML::Mason::ApacheHandler
 /FilesMatch

 The reason this wasn't posted on a Mason mailing list is that this didn't
 seem like a Mason problem per se and the Mason mailing list page
 specifically mentioned the Apache Request object (at least in part the
 source of my problem)as being something that is not directly Mason
 related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
 took the advice of the list moderator and posted on the mod_perl list
 instead.

 Thanks!

 DeAngelo

 -Original Message-
 From: Gareth Kirwan [mailto:gbjk;thermeoneurope.com]
 Sent: Thursday, November 07, 2002 1:44 AM
 To: DeAngelo Lampkin; [EMAIL PROTECTED]
 Subject: RE: Can't locate object method new via package
 Apache::Request (via Mason)...


 You need to set Mason up better - probably.

 I'm an avid Mason user, and I've seen this a fair few times.
 If you want help, you're most likely to get it on the
 [EMAIL PROTECTED] list.
 However if you want to tell me the version of mason you're using it might
 help.

 You could use a mason-handler.pl 

Re: Can't locate object method new via package Apache::Request (via Mason)...SOLVED

2002-11-07 Thread Tim Tompkins
 As a quick follow-up, the PerlModule Apache::Request line is NOT
 needed in the httpd.conf file for Mason to work.  However, it was a very
 valuable debugging tool.

That wasn't really the purpose, though.  The purpose was to pre-load the
module in the parent apache process for efficiency.  My suggestion did come
about because it appeared that Apache::Request wasn't being loaded at all.
I'm not exacly sure how that happened as Mason's ApacheRequest attempts to
require() Apache::Request a couple of places.  But just the same, my
suggestion to pre-load Apache::Request, as well as any other lib you
normally use, stands.

See:
http://perl.apache.org/docs/1.0/guide/performance.html#Preloading_Perl_Modul
es_at_Server_Startup


Regards,

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




NTLM Authentication patch

2002-11-07 Thread Gerald Combs
We recently installed AuthenNTLM where I work, and ran into the POST
problems described in the thread at

http://marc.theaimsgroup.com/?t=10317736546r=1w=2

After looking through a couple of network traces I think I've found the
problem.  It appears that after IE authenticates via NTLM, it sends type 1
messages for subsequent requests during a keepalive session.  This is fine
and dandy unless you're sending a POST request - when it sends the type 1
message, it also sends a Content-length: 0, and doesn't append the POST
data.  Since the browser has successfully authenticated itself earlier in
the keepalive session, AuthenNTLM validates the request and a POST with no
accompanying POST data gets passed to the server.  

Attached is a patch against the 0.21 release that fixes this behavior (in
our environment, at any rate).  I know very little about NTLM
authentication and mod_perl coding, so the patch may not be entirely
correct.

--- /usr/local/perl/lib/site_perl/5.6.1/sun4-solaris/Apache/AuthenNTLM.pm   Thu 
Nov  7 17:29:15 2002
+++ ./AuthenNTLM.pm Tue Sep  3 11:03:04 2002
 -502,21 +502,9 
 $conn - user($self-{mappedusername}) ;
 
 # we accecpt the user because we are on the same connection
-$type = $self - get_msg ($r);
-print STDERR [$$] AuthenNTLM: OK because same connection pid = $$, 
connection = $$conn cuser =  .
-$conn - user . ' ip = ' . $conn - remote_ip . 'hash 
= ' . $self - {usernthash} . \n if ($debug) ;
-
-
-# IE (5.5, 6.0, probably others) can send a type 1 message 
-# after authenticating on the same connection.  This is a 
-# problem for POST messages, because IE also sends a 
-# Content-length: 0 with no POST data.
-if (! $self - {ntlm} || (defined ($type)  $type == 3) )
-{
-return OK ;
-}
-# Else fall through to the authentication below.
-
+print STDERR [$$] AuthenNTLM: OK because same connection pid = $$, 
+connection = $$conn cuser =  . 
+$conn - user . ' ip = ' . $conn - remote_ip . \n 
+if ($debug) ; 
+return OK ;
 }
 }
 



Suspected Apache::AuthenNTLM Bug

2002-11-07 Thread Brett Hales
I believe that there is a bug in the Apache::AuthenNTLM module.


Configuration:

I have an Apache server with ColdFusion MX 6 installed, there is a
requirement for NTLM authentication with the server.

I implemented the PerlAuthenHandler Apache::AuthenNTLM to solve this
problem.


Problem:

With ColdFusion you can call the same page eg the line_main2.cfm can be
called from the line_main2.cfm with different parameters. Unfortunately
the client PC does not seem to pass the NTLM/Basic Authorization Header
the second time the page is called.

An error appears in the error.log

[Fri Nov  8 09:03:58 2002] [error] access to
/cf_dev/objectives/line_main2.cfm failed for  , reason: Bad/Missing
NTLM/Basic Authorization Header for /cf_dev/objectives/line_main2.cfm



Configuration:


Apache::AuthenNTLM (version 0.21)

Server version: Apache/1.3.27 (Unix)

httpd.conf

Alias /cf_dev/objectives/ /baewwwroot/cf_dev/objectives/

Directory /baewwwroot/cf_dev/objectives
Options -Indexes FollowSymLinks MultiViews
PerlAuthenHandler Apache::AuthenNTLM
AuthType ntlm
AuthName Windows Authentication Required
require valid-user
PerlAddVar ntdomain BAEA baeapdc sbntfp1
PerlAddVar ntdomain BAEADEV bantdev1
PerlSetVar defaultdomain BAEA
/Directory


-- 
Brett Hales





Re: Trouble using mod_perl and IE5.x, IE6.x

2002-11-07 Thread Ged Haywood
Hi there,

On Thu, 7 Nov 2002, simon wrote:

 The trouble occurs for sample with this little simple script
 
 print(html);
 sleep (5);
 print(head);

Do you first send the HTTP headers somehow?

73,
Ged.




Re: use http-equiv to refresh the page

2002-11-07 Thread mike808
 No, that's server push you're thinking of.  NPH (non-parsed header) 
 scripts are CGI scripts that talk directly to the client without the 
 server parsing headers and adding others (like the one that says it's 
 Apache).

My bad. It was. But I think one needs to use NPH scripts to generate
server push documents, IIRC. Which is why I was thinking about it.

 Normally, mod_cgi adds the response line and certain other 
 headers, so it parses your output.  This is the same as using mod_perl 
 with the PerlSendHeader option on.  NPH script behave like mod_perl with 
 PerlSendHeader off.

Trust me, you want to leave all the VMS, EBCDIC, and MSIE weirdness
related to sending headers in the right order, checking values, including
extras for broken browsers, and the all-important CRLF-CRLF header
separator, et al. to CGI.pm.

Mike808/

-
http://www.valuenet.net





Re: [Win32] nmake error compiling mod_perl.so

2002-11-07 Thread Randy Kobes
On Thu, 7 Nov 2002, jheckel wrote:

 Hi
 since two weeks I can no longer compile the mod_perl-2.0 package from 
 the snapshot server without errors. The last good compilation was 
 10/27/2002:-(
 
 Apache version 2.0.44-dev, WinXP, Perl 5.6.1 Build 633.
 
 My install commands:
 perl Makefile.PL MP_AP_PREFIX=f:/apache2
 nmake
 nmake install
 
 
 .
 C:\Programme\Microsoft Visual Studio\VC98\lib\msvcrt.lib -def:Access.def
 Creating library ..\..\..\blib\arch\auto\Apache\Access\Access.lib 
 and object
 ..\..\..\blib\arch\auto\Apache\Access\Access.exp
 Access.obj : error LNK2001: unresolved external symbol _newSVpvf
 ..\..\..\blib\arch\auto\Apache\Access\Access.dll : fatal error LNK1120: 
 1 unresolved externals

I'm not familiar enough with the internal build stuff to see
where this gets defined in general, but a temporary workaround
for the above problem is to change in
modperl-2.0/xs/Apache/Access/Apache__Access.h, about line 63, the
call
   av_push(config, newSVpvf(..));
to
   av_push(config, Perl_newSVpvf(..));
Both on perl-5.6.1 and perl-5.8 I got tests 7 and 9 of
api/access.t and test 2 of t/modperl/setauth.t failing, for
reasons of being unable to change the AuthType and AuthName. It
may be that the above isn't the right fix, or this may be
unrelated.

-- 
best regards,
randy kobes




RE: Can't locate object method new via package Apache::Request(via Mason)...SOLVED

2002-11-07 Thread Ged Haywood
Hi there,

On Thu, 7 Nov 2002, DeAngelo Lampkin wrote:

 A file called libapreq.so.1 was located in /usr/local/lib
 (should have been in /usr/lib) [snip] I ended up getting this thing:
 
 Syntax error on line 362 of /usr/local/apache/conf/httpd.conf:
 Can't load 
'/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Apache/Request/Request.so'\
  for module Apache::Request: libapreq.so.1: cannot open shared object file:\
  No such file or directory [snip]
 
 This isn't the most helpful error message in the world.

Huh?

It tells you EXACTLY what is wrong.

73,
Ged.




Re: [Win32] nmake error compiling mod_perl.so

2002-11-07 Thread jheckel
Randy Kobes wrote:


where this gets defined in general, but a temporary workaround
for the above problem is to change in
modperl-2.0/xs/Apache/Access/Apache__Access.h, about line 63, the
call
   av_push(config, newSVpvf(..));
to
   av_push(config, Perl_newSVpvf(..));


Hi,
thank you for your working fix:-)

But now I see another minor problem:

Installing 
W:\programme\Perl\site\lib\auto\Apache\RequestUtil\RequestUtil.dll
Installing 
W:\programme\Perl\site\lib\auto\Apache\RequestUtil\RequestUtil.exp
Installing 
W:\programme\Perl\site\lib\auto\Apache\RequestUtil\RequestUtil.lib
Skipping W:\programme\Perl\site\lib\auto\Apache\RequestRec\RequestRec.bs 
(unchanged)
Cannot forceunlink 
W:\programme\Perl\site\lib\auto\Apache\RequestRec\RequestRec.
dll: No such file or directory at W:\programme\Perl\lib/File/Find.pm 
line 519
NMAKE : fatal error U1077: 'W:\programme\Perl\bin\perl.exe' : return 
code '0xff'

This is not important to me as the mod_perl.so has been compiled before 
this happens.


Juergen


Re: Suspected Apache::AuthenNTLM Bug

2002-11-07 Thread Ged Haywood
Hi there,

On 8 Nov 2002, Brett Hales wrote:

 I believe that there is a bug in the Apache::AuthenNTLM module.

Did you see this?

73,
Ged.

--
Date: Thu, 7 Nov 2002 17:46:15 -0600 (CST)
From: Gerald Combs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: NTLM Authentication patch

We recently installed AuthenNTLM where I work, and ran into the POST
problems described in the thread at

http://marc.theaimsgroup.com/?t=10317736546r=1w=2

After looking through a couple of network traces I think I've found the
problem.  It appears that after IE authenticates via NTLM, it sends type 1
messages for subsequent requests during a keepalive session.  This is fine
and dandy unless you're sending a POST request - when it sends the type 1
message, it also sends a Content-length: 0, and doesn't append the POST
data.  Since the browser has successfully authenticated itself earlier in
the keepalive session, AuthenNTLM validates the request and a POST with no
accompanying POST data gets passed to the server.  

Attached is a patch against the 0.21 release that fixes this behavior (in
our environment, at any rate).  I know very little about NTLM
authentication and mod_perl coding, so the patch may not be entirely
correct.




RE: Trouble using mod_perl and IE5.x, IE6.x

2002-11-07 Thread Alessandro Forghieri

Greetings.

Now this is OT'ish but...

 print(titleTITRE DE LA PAGE\/title);

Why are you escaping all your '/'s? There is no need to do it.
Cheers,
alf

P.S: I strongly suspect that the sleep call and its position (what if you
move it above the /body tag?) are to blame for the behavior you see (i.e.
I'd bet you are triggering some timeout in IE). But that's only gut feeling.