Urgent : How do I redirect to multiple frames?

2000-05-25 Thread sadhanandham balaraman

Hi all,

 How can one redirect HTML docs to
   different frames from WITHIN a single PERL script

 Example I have a perl script which generates 3 HTML code output for 
three frames. Now how can I specify that this HTML is for this frame

Please suggest me.

Thanks
sadha
([EMAIL PROTECTED])


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com




RE: Bugs 5.6.0 modperl use?

2000-05-25 Thread Graf, Chris

  We are running 5.6 on 2 production servers with mod_perl 1.23 and 1.24,
Apache 1.3.12, Apache::DBI, DBD::Sybase (to MSSQL), and DBD::mysql. One box
is Linux. The other is Solaris 2.7. So far no issues other than
"depreciated" notices on some modules, and our own programming errors.
Serving ~6M dynamic page views per month between the two boxes. They both
seem quite stable now that our own bugs are ironed out... ;-)

-Original Message-
From: Jeff Stuart [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 26, 2000 12:37 AM
To: Jim Winstead; Modperl Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: Bugs 5.6.0 modperl use?

Ok, follow up question if I may.  :)  Are any of you using it with DBI and
DBD::mysql?  I see on the Mason list that people are using it with
HTML::Mason so that module is safe. :)  Looks like I'm gonna have to pull
out that old Linux box and do a test on it. :)

--
Jeff (FurBall)
WebOverdrive Newbie Tech Board
http://www.topniche.com/tech/
[EMAIL PROTECTED]

-Original Message-
From: Jim Winstead [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 25, 2000 10:46 PM
To: Modperl Mailing List
Subject: Re: Bugs 5.6.0 modperl use?

On May 25, Jeff Stuart wrote:
> That's a GOOD question.  Is there anyone at the moment using perl 5.6.0 in
> production?  Is it ready for production yet?

We have one site in production with it, and a number of others
going into production soon. We've been using is exclusively in our
development environment for all new development since shortly after
5.6.0 came out. It has been rock-solid for us. (The basic setup
is Apache 1.3.12, mod_perl 1.24, perl 5.6.0, and FreeBSD 3.4.)

Jim



RE: Bugs 5.6.0 modperl use?

2000-05-25 Thread Jeff Stuart

Ok, follow up question if I may.  :)  Are any of you using it with DBI and
DBD::mysql?  I see on the Mason list that people are using it with
HTML::Mason so that module is safe. :)  Looks like I'm gonna have to pull
out that old Linux box and do a test on it. :)

--
Jeff (FurBall)
WebOverdrive Newbie Tech Board
http://www.topniche.com/tech/
[EMAIL PROTECTED]

-Original Message-
From: Jim Winstead [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 25, 2000 10:46 PM
To: Modperl Mailing List
Subject: Re: Bugs 5.6.0 modperl use?

On May 25, Jeff Stuart wrote:
> That's a GOOD question.  Is there anyone at the moment using perl 5.6.0 in
> production?  Is it ready for production yet?

We have one site in production with it, and a number of others
going into production soon. We've been using is exclusively in our
development environment for all new development since shortly after
5.6.0 came out. It has been rock-solid for us. (The basic setup
is Apache 1.3.12, mod_perl 1.24, perl 5.6.0, and FreeBSD 3.4.)

Jim




Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread John BEPPU

[  date  ] 2000/05/25 | Thursday | 10:28 PM
[ author ] Jason Bodnar <[EMAIL PROTECTED]> 

> Probably the best way to learn good OO Perl is to learn Java or C++. As
> Gunther said, other languages are much more strict so they force you to
> write good OO stuff. 

I'd hesitate to push C++ on a beginner, but I'm a little
biased.  For an introductory text on what OO is all about,
I would suggest you go to:

http://www.gnustep.org/resources/documentation.html

and get the ObjectiveCBook.pdf.  I'm not asking you to
learn Objective-C, but I think it would be really helpful
if you just read the first chapter of this book which has
one of the best introductions to OO I've ever read.  This
chapter is what really made the idea of OO click for me.
Maybe it will help you understand, as well.

> Definitely read the perltoot (Tom's OO Tutorial). I've heard alot of good
> things about Damian Conway's OO Perl book but I haven't read it myself. The
> advanced perl programming book has a nice section on OO. But, learning OO
> in a Java or C++ context would probably be the best way to start.

I just got Damian Conway's book yesterday, and I think
it would be a good book to have.  I thought I had a good
handle on Perl's capabilities, but this guy really knows 
his Perl like no other.  A lot of it may be too advanced,
but the beginning parts are geared towards newcomers to
OO, so this book will last you a long time.

As for the other suggestions...
I agree with you on perltoot -- I learned a lot from that.
Again, I hesitate to suggest C++.

-- 
my 2 yen



Authentication implementation

2000-05-25 Thread Sergey Ivanyuk

Hi All.

I'm trying to implement a real simple authentication scheme, where the
login page sets a cookie to the users's browser, and unless the cookie
is set, any request beyond the login page gets redirected to login.
I've tried the PerlTransHandler, but the cookies aren't available to
the handler for some reason.  How is something like this normally
done?  I thought I was on the right track, but apparently that doesn't
seem to be right.  Thanks in advance.




Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Jason Bodnar

>I'm probably a novice programmer, at least by the standards of
>most of the people on this list. I'm 16, and since I haven't taken
>Computer Science at university yet, I'm a bit lacking in 'formal
>programming education'. I'd rather not form bad habits - is there
>any advice anyone can give me on how to write, clean Perl (OO or
>otherwise)? Are there any good books I can pick up?

Probably the best way to learn good OO Perl is to learn Java or C++. As
Gunther said, other languages are much more strict so they force you to
write good OO stuff. I had been programming with Perl 4 before Java came
out and had never done any OO stuff. I actually argued against OO with a
friend. I tried to learn Perl OO but it didn't click. I taught myself Java
since it was the cool thing to do and then went back to Perl OO. I think my
Perl OO is better from knowing Java first.

Definitely read the perltoot (Tom's OO Tutorial). I've heard alot of good
things about Damian Conway's OO Perl book but I haven't read it myself. The
advanced perl programming book has a nice section on OO. But, learning OO
in a Java or C++ context would probably be the best way to start.




--
Jason Bodnar + Tivoli Systems = [EMAIL PROTECTED]




Wierd problem with redirect

2000-05-25 Thread Vijay

Hello,

I have a perl script which tries to redirect the URL to another page. It
gives peculiar problem. The resultant page source is as follows

---

Content-type: text/html

Location:  /scripts/visitorinfo.cgi?pageid=mailhdr&lang=EN
-

As you can see, the Content-type and Location information is shown in the
screen rather than really taking the url.

THe perl code is as follows:

First I am setting the cookie.

   print "Content-type: text/html\n\n";
  print "";
   print "";
 print "\n";

Immediately after this, Iam trying the recirect.

print "Content-type: text/html "."\n\n";
print "Location:
/scripts/visitorinfo.cgi?pageid=mailhdr&lang=EN\n\n";
exit 0;

This results in the page as given above. IN the Location, I tried giving
full url including the domain name. Also, I tried to use CGI->redirect also.
It showed the page moved to new location error on the screen. Not the actual
page.

This is running on a Raq3i server with perl 5.0.6 and mod-perl (version I am
not sure) and Embperl.

Any help is greatly appreciated.

Thanks

Vijay Nair





Re: Bugs 5.6.0 modperl use?

2000-05-25 Thread Jim Winstead

On May 25, Jeff Stuart wrote:
> That's a GOOD question.  Is there anyone at the moment using perl 5.6.0 in
> production?  Is it ready for production yet?

We have one site in production with it, and a number of others
going into production soon. We've been using is exclusively in our
development environment for all new development since shortly after
5.6.0 came out. It has been rock-solid for us. (The basic setup
is Apache 1.3.12, mod_perl 1.24, perl 5.6.0, and FreeBSD 3.4.)

Jim



RE: Bugs 5.6.0 modperl use?

2000-05-25 Thread Craig Vincent


That's a GOOD question.  Is there anyone at the moment using perl 5.6.0 in
production?  Is it ready for production yet?


I currently use 5.6.0 (w/ mod_perl 1.24) on all my production servers and
5.6.0 is currently listed as stable so for I don't see any reason as to say
it isn't usable for production.

Sincerely,

Craig Vincent




RE: Bugs 5.6.0 modperl use?

2000-05-25 Thread Jeff Stuart

That's a GOOD question.  Is there anyone at the moment using perl 5.6.0 in
production?  Is it ready for production yet?

--
Jeff (FurBall)
WebOverdrive Newbie Tech Board
http://www.topniche.com/tech/
[EMAIL PROTECTED]

-Original Message-
From: Jeffrey W. Baker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 25, 2000 3:22 AM
To: John M Vinopal
Cc: [EMAIL PROTECTED]
Subject: Re: Bugs 5.6.0 modperl use?

On Wed, 24 May 2000, John M Vinopal wrote:

>
> Apache 1.3.12
> modperl 1.24
> perl 5.6.0
>
> CGI::Carp preloaded.
> DBI preloaded.
>
> [Wed May 24 19:58:28 2000] [error] PerlRun: `Bizarre copy of HASH in
aassign
> at /usr5/perl/lib/5.6.0/Carp/Heavy.pm line 79.
>
> Prototype mismatch: sub
Apache::ROOT::cgi_2dbin::adtaker::get_username::SQL_INTEGER vs () at
/usr5/perl/lib/5.6.0/Exporter.pm line 57.
>  at /usr5/caps_prod/scripts/adtaker/get_username line 6
>
> where SQL_INTEGER is imported via
> use DBI qw(SQL_INTEGER);
>
> Anyone else seen these?

Is anyone else using Perl 5.6.0?

-jwb




Re: global variables and reparsing question (low priority ;)

2000-05-25 Thread Marc Lehmann

On Thu, May 25, 2000 at 11:58:38AM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote:
> > You must be kidding here!!! Using lexicals on package level is broken??? If
> > it is broken, then _why_ is it recommended programming practise in perl (see
> > perltoot for example)?
> 
> i'm not kidding.  i don't understand whay you mean by 'using lexicals on
> package level is broken'.

here is my module, in very terse pseudocode:

=
package mymodule;

my some"globals";

sub functiousing someglobals {
}

now load other code (in some kind of xml) and compile it into it's
package, UNLESS the package already exists.
==

And this obviously breaks for the newly compiled code. The caching,
unfortunately, is very important. Surely I could make an exception when
running under mod_perl with PerlFreshRestart, but that code runs nicely in
other environments, since the apache bits have been abstracted away. Read
below.

> and, like i said, i realize that certain modules make assumptions that
> they will only be loaded once in the same process and that re-parsing them
> can uncover subtle problems.  but i still consider such assumptions to be
> broken.

Sorry, but reparsing is never done by perl itself (it explicitly says so),
so mod_perl clearly is not acting like perl.

So, in in the mod_perl dialect of perl, modules that work fine in perl
magically break on restarts. This is because mod_perl "restarts" by
fooling the perl interpreter to think it hasn't seen _some_ parts of the
program(s) and tries to reload all on top of it.

What's confusing here is the term "FreshRestart", which doesn't do
anything like a "fresh restart".

The reason this is important to me is not because I couldn't make an
exception to my code for apache - it's the real world, so hacks are
necessary in many cases anyway - but because what's broken is mod_perls
idea of "fresh restarting" by cheating the perl interpreter rather than my
code.

Now that I know what's going on it's not a big deal, but if you call
my code broken you should have rather good arguments on the basis of
the perl language and protgramming, not because mod_perl does some very
undocumented things differently to perl itself.

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Jim Winstead

On May 25, Barry Robison wrote:
> You may want to check out http://www.opensales.org/html/source.shtml,
> rather than starting from scratch .. I haven't used it, but it's
> a Perl based GPL commerce solution.

Every time I look at this code, my brain hurts.

Especially crap like this:

## nicedecimals( $s ) : $s;
#
sub nicedecimals {
   my( $x,$y,$a,$b,$r,$i );
   $i=$_[0];

   ( $left,$right ) = split /\./, $i;
   $left="0" if (!$left);
   $right="00" if (!$right);
   $right.="0" if (length($right)==1);
   $right = substr $right, 0, 2;
   return "$left.$right";

} #/nicedecimals

Is there something this does that 'sprintf "%01.2f", $var' doesn't?
I guess it truncates rather than rounding the last digit, but I
have serious doubts that is intentional.

Jim



books (was High-volume mod_perl based ecommerce sites?)

2000-05-25 Thread Perrin Harkins

On Thu, 25 May 2000, Neil Conway wrote:
> I'm probably a novice programmer, at least by the standards of
> most of the people on this list. I'm 16, and since I haven't taken
> Computer Science at university yet, I'm a bit lacking in 'formal
> programming education'. I'd rather not form bad habits - is there
> any advice anyone can give me on how to write, clean Perl (OO or
> otherwise)? Are there any good books I can pick up?

Sure, try "Advanced Perl Programming" by Sriram Srinivasan and "Object
Oriented Perl" by Damian Conway.  For general advice, "Code Complete" by
Steve McConnell is good.

- Perrin




Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Neil Conway

On Fri, May 26, 2000 at 09:20:35AM +0800, Gunther Birznieks wrote:
> Well, yeah, C and Java can suffer the same problems as Perl, but because 
> Java is so constrained as a language, the design of the language has a 
> built in constraint. With Perl you can literally do ANYTHING, and to 
> program Perl in a clean, OO way takes a lot of experience or a good mentor.

(I'll apologise in advance as this thread spins rapidly off-topic).

I'm probably a novice programmer, at least by the standards of
most of the people on this list. I'm 16, and since I haven't taken
Computer Science at university yet, I'm a bit lacking in 'formal
programming education'. I'd rather not form bad habits - is there
any advice anyone can give me on how to write, clean Perl (OO or
otherwise)? Are there any good books I can pick up?

TIA

--
Neil Conway <[EMAIL PROTECTED]>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

It is dangerous to be right when the government is wrong.
-- Voltaire

 PGP signature


RE: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Gunther Birznieks

At 10:51 AM 5/25/00 -0500, Jason Bodnar wrote:
>On 25-May-2000 Michael Nachbaur wrote:
> > This site will have major traffic, will need to be extended and changed (a
> > lot), and needs to scale very well.  My experience with Perl (as well 
> as what
> > I've heard from other developers) is that Perl turns to spaghetti rapidly
> > once you hit the 10,000 line mark.
>
>I don't think this is a perl-only problem. I also don't think this is a 
>problem
>inherent to any high level language. Large projects get messy due to poor
>planning and bad programming. Why would Java or C (or any other language) not
>suffer from the same problems as Perl?

Compile-Time checking, strong-typing, syntactical glue to sandbox the 
developer if anything looks odd to the language itself.

Well, yeah, C and Java can suffer the same problems as Perl, but because 
Java is so constrained as a language, the design of the language has a 
built in constraint. With Perl you can literally do ANYTHING, and to 
program Perl in a clean, OO way takes a lot of experience or a good mentor.

> > I know Perl can handle the performance.
> > What are your experiences with extendability and readability of code?
>
>Again, this is a function of the development team not the language. I've
>developed some large scale web applications in Perl (intranet so I can't link
>to them) and I have no problem with extensability and readability. Again, it's
>just a matter of properly planning things before you write that first line of
>code. I just wrapped up the third version of some web discussion forums we use
>at Tivoli and had no problem adding new features to the application.
>

My experience is that most teams aren't as good as yours. And with IT staff 
shortages at a high, there are a lot more newbies to programming coming 
into the fray. I think that's great, but at the same time, I think we have 
to be realistic about the expectations behind the code produced.

I think Perl is great, because I feel that if I work with someone who is 
new, I can teach them. But how many people in the world are really 
experienced with writing large-scale, clean Perl code. Even the town hall 
of gurus at the Oreilly PerlCon had a minor debate about the ability of 
Perl to do programming in-the-large.

At anyrate, At least we can probably all agree that Microsoft ASP/VBScript 
is even worse for programming in-the-large. (for similar reasons, Perl has 
a syntax that supports cleaner programming than ASP/VBScript)

Later,
Gunther

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




Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Marc Lehmann

On Thu, May 25, 2000 at 12:09:09PM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote:
> > You can only configure Apache from  sections, but you can load all
> > your modules, shared data, etc. from a file pulled in with PerlRequire.
> 
> actually you can, if a module defines variables in the
> Apache::ReadConfig:: namespace, they are fed to the apache config gears
> just as  sections are.

Erhm, I am doing this right now (the functions I call just implant
Location directives etc.. into the caller's package).

Now it would be interesting to know wether that works only when called from
perl sections or also form perlrequire? (Hmm, I'll just try it out and assume
it's supported if it works ;)

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Drew Taylor

Perrin Harkins wrote:
> 
> On Thu, 25 May 2000, Barry Robison wrote:
> > You may want to check out http://www.opensales.org/html/source.shtml,
> > rather than starting from scratch .. I haven't used it, but it's a
> > Perl based GPL commerce solution.
> 
> Or you may not.  It doesn't support mod_perl.  I'd suggest looking at
> Tallyman or Yams instead.
> - Perrin
The current project I'm working on actually began with Yams, but I
quickly discovered that their templating system consists of hardcoded
strings in a config file. That was unworkable for what I was doing (I
needed to have many sites running off a single backend). 

I'm now using HTML::Template for my HTML needs. (Thanks Sam!). However,
Yams was an excellent starting point for me - the DB schema was most
valuable. I have since completely rewritten everything, so there is
nothing of Yams left. My personal opinion is that is would work for a
single site, but it would benefit a LOT from OO perl. Objects are the
only thing currently saving my butt from meltdown. :-)

YMMV of course.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



Re: Problem: Apache/mod_perl/NT host won't close smtp connection

2000-05-25 Thread Chuck Goehring



This is a follow-up to my previous post for anyone who might 
have this problem and find this in the archives.
 
Firstly, the install was done correctly, I just lacked an 
understanding of the directory hierarchies.
The version used in my original post was the binary 
distribution of Apache+Perl+modperl from http://www.perl.com/CPAN/authors/Jeffrey_Baker/ (perl-5_005_02+apache1_3_3+modperl-1_16-bin-bindist1-i386-win32-vc5.zip).  
If you run the following command on the server, it will show an increasing value 
for "Reset Connections" each time the email send fails:
 
 C:\>netstat -s
 
TCP Statistics
  Reset 
Connections   
= 8I found old mod_perl list postings from Jun 1998 
where the poster had the same problem but no solution.
I found a reference to another build in my mail 
archives.  I downloaded the Randy Kobes binary distribution from ftp://theoryx5.uwinnipeg.ca/pub/other/ 
and ran it.  It has Perl-5.6.0, mod_perl-1.23, and Apache_1.3.12.  
Even though it does not have everything we need, I set it up to see if the port 
problem is there.  The problem does not occur with this build.
 
We need Oracle drivers built in for our use, so we decided to 
do our own build.  It seamed inevitable that we would need to learn to do 
this.  I've built from source with Perl-5.6.0, mod_perl-1.24, and 
Apache_1.3.12 and it does not have the problem.  It seams to be OK and the 
building went better than expected.
 
I have to assume the problem was caused somewhere in the 
low-level socket code but not sure whose.  The Microsoft web sites indicate 
patches where made in the TCP code in each NT service pack.  
 
Hope this helps somebody.
 
Chuck Goehring
[EMAIL PROTECTED]
 
 
 
 
 
 

  -Original Message-From: 
  Chuck Goehring <[EMAIL PROTECTED]>To: 
  mod perl list <[EMAIL PROTECTED]>Date: 
  Monday, May 15, 2000 10:00 PMSubject: Problem: 
  Apache/mod_perl/NT host won't close smtp connection
   
  
   
  Having a 
  problem where the connections to an smtp server doesn't seam to close 
  correctly on Windows NT. I've tried two separate mailing modules (MIME::Lite 
  and Mail::Sender). Neither will send a second time without re-starting Apache. 
  The Lite module uses the Net::smtp module and the Sender directly uses a 
  Socket (not IO::Socket). Additional details are listed further down. My 
  general question is: Are there problems with "PERL" Sockets on mod_perl/NT? 
  Since a nearly identical test program works from the PERL.exe command line it 
  seams as if mod_perl is trying to keep the port open or 
  something.
   
  Also, there 
  are some directories that came with the Apache/mod_perl binary distribution 
  that have Socket.pm files in them. These directories are perl\lib\MSWin32-x86 
  and perl\lib\MSWin32-x86\IO. Should they have been copied over the other files 
  in the perl directory tree? Or, put in the startup.cgi(listing is at bottom)? 
  The distribution came with little docs and it was my first mod_perl 
  setup.
   
  Any 
  infomation would be greatly appreciated.  
   
   
  Chuck 
  Goehring
  [EMAIL PROTECTED]
   
  Below are more details of the problem I've been 
  having.
  --
  Details:
  I'm using 
  MIME::Lite to let users email files to other users as part of a document 
  management system. The MIME::Lite package inherits from Net::SMTP (@ISA = 
  qw(Net::SMTP);) and adds the capability to add attachments to the 
  email.
  It works fine 
  the first time but gives an error the second time. If I run it external to the 
  site via the perl.exe command line (with use CGI lines removed), it works 
  flawlessly every time. Once the error starts, even leaving it overnight 
  doesn't allow it to work. It acts as though the socket doesn't get closed and 
  can't be reused. Below are the pertinant scripts.
   
  --
  MIME::Lite 
  sub to send via smtp:
   
  sub 
  send_by_smtp {
   
  my ($self, 
  @args) = @_;
  # We need the 
  "From:" and "To:" headers to pass to the SMTP mailer:
  my $hdr = 
  $self->fields(); 
  my $from = 
  $self->get('From');
  my @to = 
  $self->get('To');
  # Create SMTP 
  client:
  require 
  Net::SMTP;
  my $smtp = 
  MIME::Lite::SMTP->new(@args)
  or croak 
  "Failed to connect to mail server: $!";
  $smtp->mail($from)
  or croak 
  "SMTP MAIL command failed: $!";
  $smtp->to(@to)
  or croak 
  "SMTP RCPT command failed: $!";
  $smtp->data()
  or croak 
  "SMTP DATA command failed: $!";
  # MIME::Lite 
  can print() to anything with a print() method:
  $self->print($smtp);
  $smtp->dataend();
  $smtp->quit;
  1;
  }
   
  --
  The Error 
  from MIME::Lite:
  [Sun May 14 
  16:20:10 2000] -e: Failed to connect to mail server: Bad file descriptor at 
  c:/apache/cgi-perl/test_sa_mime.cgi line 38 (Line 38 contains $SMTPRetVal = 
  $msg->send_by_smtp($SMTPhost, Timeout => 40);
  ---

Re: CGI.pm broken with Apache/mod_perl/warnings? (was Re: XHTML_DTDredefined?)

2000-05-25 Thread Perrin Harkins

On 25 May 2000, Randal L. Schwartz wrote:
> I got no "no warnings".  this is still 5.5.3 :)

There's always the time-honored

{
  local $^W;
}

- Perrin




Re: CGI.pm broken with Apache/mod_perl/warnings? (was Re: XHTML_DTD redefined?)

2000-05-25 Thread Randal L. Schwartz

> "Doug" == Doug MacEachern <[EMAIL PROTECTED]> writes:

Doug> On 25 May 2000, Randal L. Schwartz wrote:
>> Yeah, it's CGI.pm alright.  So do I complain to Lincoln to fix it, or
>> is it just a synergy thing between mod_perl, Apache, and CGI.pm that I'll
>> have to live with?

Doug> are you re-loading CGI.pm?  that's the only way this warning can be
Doug> triggered, from what i can see.  in which case, this wouldn't be a bug in
Doug> CGI.pm, the re-loader simply needs:
Doug> {
Doug> no warnings;
Doug> }

I got no "no warnings".  this is still 5.5.3 :)

And I'm not doing the reloading, unless this would do it:

in conf:

PerlRequire mason-startup.pl

in mason-startup.pl:

package HTML::Mason::Commands;
## use CGI qw(-compile :all);
use CGI qw(:all);

By the way, when I added -compile, it broke on a recent release of
CGI.pm.  Grr.  This stuff seems to be more and more fragile. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Perrin Harkins

On Thu, 25 May 2000, Barry Robison wrote:
> You may want to check out http://www.opensales.org/html/source.shtml,
> rather than starting from scratch .. I haven't used it, but it's a
> Perl based GPL commerce solution.

Or you may not.  It doesn't support mod_perl.  I'd suggest looking at
Tallyman or Yams instead.
- Perrin




Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Prasit P wrote:

> Thank guys for your answer.  I've just tried using Apache 1.3.12, and mod_perl
> 1.24, all downloaded today, but it's the same problem.

seems that only works when you use http://hostname, both mod_proxy and
mod_perl use logic like so:

!(r->parsed_uri.hostname
  && strEQ(r->parsed_uri.scheme, ap_http_method(r))
  && ap_matches_request_vhost(r, r->parsed_uri.hostname,
  r->parsed_uri.port_str ? 
  r->parsed_uri.port : 
  ap_default_port(r)));

logic could probably be added to compare the ip addresses, but why do you
need to do that anyhow?  what's wrong with using 
'GET /index.html http/1.0' ?




Re: httpd exits with apache-1.3.12 and mod_perl-1.21 on Redhat 6.2

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Roberto Bourgonjen wrote:

> > > rpm's apache-1.3.12-2 and mod_perl-1.21-10 (the latest available

whoops, i missed your version.  if you're trying to use mod_perl as a
dso, upgrade to 1.24.




Re: httpd exits with apache-1.3.12 and mod_perl-1.21 on Redhat 6.2

2000-05-25 Thread Roberto Bourgonjen

On Thu, 25 May 2000, Doug MacEachern wrote:

> On Wed, 24 May 2000, Roberto Bourgonjen wrote:
> 
> > Hi all,
> > 
> > I am encountering strange problems on redhat 6.2 installations with
> > rpm's apache-1.3.12-2 and mod_perl-1.21-10 (the latest available
> > versions from redhat. I _have_ to use rpm's). I've tried two machines.
> > 
> > As soon as load certain modules the server exits immediately, without 
> > producing the slightest error message.
> 
> try this:
> 
> % gdb httpd
> (gdb) b exit
> (gdb) run -X
> 
> whether it core dumps or exit() is called, post the output of:
> 
> (gdb) bt

[root@toutatis conf]# gdb /usr/sbin/httpd 
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
found)...
(gdb) b exit
Breakpoint 1 at 0x804f714
(gdb) run -X
Starting program: /usr/sbin/httpd -X
Breakpoint 1 at 0x400c31f2: file exit.c, line 40.
initializing Site

Program received signal SIGSEGV, Segmentation fault.
0x4033f0eb in boot_HTML__Parser () from
/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Parser/Parser.so
(gdb) bt
#0  0x4033f0eb in boot_HTML__Parser () from
/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Parser/Parser.so
#1  0x407a24e8 in ?? () from /etc/httpd/modules/libperl.so
#2  0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#3  0x40772a11 in ?? () from /etc/httpd/modules/libperl.so
#4  0x40774f88 in ?? () from /etc/httpd/modules/libperl.so
#5  0x4078ebdf in ?? () from /etc/httpd/modules/libperl.so
#6  0x4078c5c4 in ?? () from /etc/httpd/modules/libperl.so
#7  0x40787e49 in ?? () from /etc/httpd/modules/libperl.so
#8  0x407bbcaf in ?? () from /etc/httpd/modules/libperl.so
#9  0x407bc720 in ?? () from /etc/httpd/modules/libperl.so
#10 0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#11 0x40772a11 in ?? () from /etc/httpd/modules/libperl.so
#12 0x40774f88 in ?? () from /etc/httpd/modules/libperl.so
#13 0x4078ebdf in ?? () from /etc/httpd/modules/libperl.so
#14 0x4078c5c4 in ?? () from /etc/httpd/modules/libperl.so
#15 0x40787e49 in ?? () from /etc/httpd/modules/libperl.so
#16 0x407bbcaf in ?? () from /etc/httpd/modules/libperl.so
#17 0x407bc720 in ?? () from /etc/httpd/modules/libperl.so
#18 0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#19 0x40772a11 in ?? () from /etc/httpd/modules/libperl.so
#20 0x40774f88 in ?? () from /etc/httpd/modules/libperl.so
#21 0x4078ebdf in ?? () from /etc/httpd/modules/libperl.so
#22 0x4078c5c4 in ?? () from /etc/httpd/modules/libperl.so
#23 0x40787e49 in ?? () from /etc/httpd/modules/libperl.so
#24 0x407bbcaf in ?? () from /etc/httpd/modules/libperl.so
#25 0x407bc720 in ?? () from /etc/httpd/modules/libperl.so
#26 0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#27 0x40772a11 in ?? () from /etc/httpd/modules/libperl.so
#28 0x40774f88 in ?? () from /etc/httpd/modules/libperl.so
#29 0x4078ebdf in ?? () from /etc/httpd/modules/libperl.so
#30 0x4078c5c4 in ?? () from /etc/httpd/modules/libperl.so
#31 0x40787e49 in ?? () from /etc/httpd/modules/libperl.so
#32 0x407bbcaf in ?? () from /etc/httpd/modules/libperl.so
#33 0x407bc720 in ?? () from /etc/httpd/modules/libperl.so
#34 0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#35 0x40772a11 in ?? () from /etc/httpd/modules/libperl.so
#36 0x40774f88 in ?? () from /etc/httpd/modules/libperl.so
#37 0x4078ebdf in ?? () from /etc/httpd/modules/libperl.so
#38 0x4078c5c4 in ?? () from /etc/httpd/modules/libperl.so
#39 0x40787e49 in ?? () from /etc/httpd/modules/libperl.so
#40 0x407bbcaf in ?? () from /etc/httpd/modules/libperl.so
#41 0x407bc720 in ?? () from /etc/httpd/modules/libperl.so
#42 0x407cd99d in ?? () from /etc/httpd/modules/libperl.so
#43 0x40772d4c in ?? () from /etc/httpd/modules/libperl.so
#44 0x4075e575 in ?? () from /etc/httpd/modules/libperl.so
#45 0x4075e5bd in ?? () from /etc/httpd/modules/libperl.so
#46 0x4075a218 in ?? () from /etc/httpd/modules/libperl.so
#47 0x8053d49 in ap_clear_module_list ()
#48 0x80540cc in ap_handle_command ()
#49 0x8054118 in ap_srm_command_loop ()
#50 0x8054487 in ap_process_resource_config ()
#51 0x8057bd8 in ap_exists_config_define ()
#52 0x8053e8c in ap_clear_module_list ()
#53 0x80540cc in ap_handle_command ()
#54 0x8054118 in ap_srm_command_loop ()
#55 0x8054487 in ap_process_resource_config ()
#56 0x8054b04 in ap_read_config ()
---Type  to continue, or q  to quit---
#57 0x805bf97 in ap_child_terminate ()
#58 0x805c65f in main ()
#59 0x400ba9cb in __libc_start_main (main=0x805c3e0 , argc=2,
argv=0xbb64, init=0x804f014 <_init>, fini=0x807b99c <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbb5c)
at ../sysdeps/generic/libc-start.c:92

Regards, Roberto

-- 
Roberto Bourgonjen

Your input for "Apache Rules" article

2000-05-25 Thread Stas Bekman

Folks, please help Thomas to prove the 39.5% of those who don't use
Apache, that they should reconsider that.

Note that Thomas has agreed to get this forwarded to the list. Please
reply directly to him. We (the list) know what you are going to tell :)

Thank you.

-- Forwarded message --
Date: Thu, 25 May 2000 12:45:11 -0700
From: Thomas Sullivan <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Apache Question 

Hi Stas,

I am a writer for ENT (www.entmag.com), a computer publication, working on a
story about the use of Apache among Fortune 500 companies. I was hoping you
could answer a few questions. I can either use your name and any identifying
information you provide (company, title, etc.) or I would be happy to keep
you anonymous as well. 

1 How does the project plan to enhance the product to gain market share? 
2 Why do you think that Apache is so popular, other than the fact that is
free?
3 Although Netscape, iPlanet, is strongest in the top 10 of the Fortune 500,
some really important companies use Apache, such as HP, Motorola and Merck.
These companies also are not likely to opt for one solution over another
just because of price. What are the key reasons they chose Apache?

Even if you could answer these via email, I'd  appreciate it. My deadline is
tomorrow, Friday, May 26. 

Thanks,
Tom

Thomas Sullivan
Features Editor
ENT, The Independent Newspaper for Windows NT/2000 Enterprise Computing
(206) 284-8208
[EMAIL PROTECTED]
www.entmag.com 




Re: Apache::Registry script problem

2000-05-25 Thread Drew Taylor

Doug MacEachern wrote:
> 
> On Thu, 25 May 2000, Drew Taylor wrote:
> 
> > I have tried many things to solve this problem. Many thanks go to
> > Geoffrey Young who helped me privately (and clued me into a great
> > solution to another future maintenance problem as well!).
> 
> i glad your problem is solved, but can we keep all help on the list to
> prevent duplication of efforts?  i get the feeling this is happening
> alot.  it's a pity for folks to take time trying to help solve a problem
> that's already been solved :)
I would be happy to post the responses between Geoffrey and I (with his
permission of course :-). A couple highlights:

1. StatINC off for production sites - can sometimes be flaky
2. $Apache::Registry::NameWithVirtualHost = 0; (for my original
configuration)
3. PerlFreshRestart Off

The above seemed to help, but something was still getting shared. So my
solution was to consolidate all the many individual scripts to one
central place. So now I have this in httpd.conf outside of all
 sections:

ScriptAlias /cgi-bin/ "/thinkstock/mnt01/apache_1.3.12/cgi-bin/"

AllowOverride None
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Registry
Order allow,deny
Allow from all


Then in each VHost section:
PerlSetVar SITENAME 'cloudstock'
PerlSetVar SITEID 1

# for any remaining scripts

Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Registry


I also preloaded all the common scripts using Apache::RegistryLoader in
startup.pl.

Then I modified my scripts by adding:
my $r = shift;
my $SITENAME = $r->dir_config('SITENAME');
my $SITEID = $r->dir_config('SITEID');
...
my $object = Object->new($CGI, $SITENAME, $SITEID);


Thus far in testing, no signs of the "schizophrenia" has shown
themselves. Thus, I think the problem was primarily Stronghold. I had
been planing to implement the transparent proxy scheme outlined in the
guide, so now I just began it sooner than expected. :-)

BTW, this solution is for launching many similar sites using a common
backend code base and DB. They share common functinality across all
sites. The sites launched to date are http://www.cloudstock.com/
http://www.wiredstock.com/ and http://www.thinkstock.com/ They are stock
photography e-commerce with DL of purchased images.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Barry Robison

You may want to check out http://www.opensales.org/html/source.shtml, rather than 
starting from scratch .. I haven't used it, but it's a Perl based GPL commerce 
solution.

-- 
Barry Robison - [EMAIL PROTECTED]

The bite of conscience.  The bite of conscience, like the bite of a dog into
a stone, is a stupidity.




Re: GET html page - permission denied

2000-05-25 Thread Prasit P

Thank guys for your answer.  I've just tried using Apache 1.3.12, and mod_perl
1.24, all downloaded today, but it's the same problem.

Anything that I can do with httpd.conf, to make it run find with mod_perl.

Regards,





--- Doug MacEachern <[EMAIL PROTECTED]> wrote:
> On Thu, 25 May 2000, ___cliff rayman___ wrote:
> > >  PeerAddr  => 209.10.98.1,
> 
> > > print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";
>  
> > your answer #1 is correct.
> > you have already connected to 209.10.98.1 via http protocol.
> 
> but since both are to the same address, it should work fine, which is what
> the 1.22 fix i mentioned deals with.
> 


=

"God is REAL ... 
 unless previously declared as an INTEGER."

   - anonymous


__
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/



Re: mod_perl 1.24 testing keeps failing

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Mark Murphy wrote:

> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'

those are the flags added when largefile support is enabled.

try with a fresh source tree and run:

sh Configure -des -Dcc=gcc -Ubincompat5005 -Uuselargefiles

-des will use all defaults except those you override and you don't have to
answer all those darn questions.




Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread morpheus


eToys.com

On Thu, 25 May 2000, Michael Nachbaur wrote:

> I'm in the process of designing an ecommerce system, and have several options on the 
>table.  Since I love perl/mod_perl/apache, my knee-jerk reaction is to write it in 
>perl.  However, in the best interest of the project, I need to look at other 
>possibilities, and take an objective look at the problem.
> 
> This site will have major traffic, will need to be extended and changed (a lot), and 
>needs to scale very well.  My experience with Perl (as well as what I've heard from 
>other developers) is that Perl turns to spaghetti rapidly once you hit the 10,000 
>line mark.  I know Perl can handle the performance.  What are your experiences with 
>extendability and readability of code?
> 
> Could someone also give me a quick list (or a link to where I can find a list) of 
>some high-profile sites that use Perl, and pull it off?  Theres a difference between 
>a company using something successfully, and just getting by with something (Amazon 
>comes to mind for a system just getting by...solving their pasta-problems by adding 
>more developers).
> 
> Thanks, I want to use Perl, but it has to be a justified decision.
> 
> -man
> 




Re: mod_perl 1.24 testing keeps failing

2000-05-25 Thread Mark Murphy


>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>list-help: 
>list-unsubscribe: 
>list-post: 
>Delivered-To: mailing list [EMAIL PROTECTED]
>X-Authentication-Warning: mojo.covalent.net: dougm owned process doing -bs
>Date: Thu, 25 May 2000 12:57:33 -0700 (PDT)
>From: Doug MacEachern <[EMAIL PROTECTED]>
>To: Mark Murphy <[EMAIL PROTECTED]>
>cc: [EMAIL PROTECTED]
>Subject: Re: mod_perl 1.24 testing keeps failing
>MIME-Version: 1.0
>X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
>
>On Thu, 25 May 2000, Mark Murphy wrote:
> 
>>   sh Configure -Dcc=gcc -Ubincompat5005
>
>hmm, i've seen a similar report related to largefile support, try once
>more with:
>
>sh Configure -Dcc=gcc -Ubincompat5005 -Uuselargefiles
>


I believe it already did by default. Here is the output from my perl -V

==
bash(mark:opus)1201% perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos opus 5.7 generic_106541-10 sun4u sparc sunw,ultra-5_10 '
config_args='-Dcc=gcc -Ubincompat5005'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define 
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
cppflags='-fno-strict-aliasing -I/usr/local/include 
-I/usr/local/BerkeleyDB.3.0/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include 
-I/usr/local/BerkeleyDB.3.0/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='gcc', ldflags ='-L/usr/local/lib -L/usr/local/BerkeleyDB.3.0/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib 
/usr/local/BerkeleyDB.3.0/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt -lsec
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib 
-L/usr/local/BerkeleyDB.3.0/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at May 24 2000 12:16:14
  @INC:
/usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
==

I did notice that it also set the -D_FILE_OFFSET_BITS=64, however, the default 
in the perl config was set to no
 
 
 
==
Perl can be built to understand large files (files larger than 2 gigabytes)
on some systems.  To do so, Configure can be run with -Duselargefiles.

If this doesn't make any sense to you, just accept the default 'y'.
Try to understand large files, if available? [y] 
Your platform has some specific hints for large file builds, using them...
 
Rechecking to see how big your file offsets are...
Your file offsets are now 8 bytes long.
Rechecking the size of fpos_t... 8 bytes.

Perl can be built to take advantage of 64-bit integer types
on some systems.  To do so, Configure can be run with -Duse64bitint.
Choosing this option will most probably introduce binary incompatibilities.

If this doesn't make any sense to you, just accept the default 'n'.
Try to use 64-bit integers, if available? [n] 

You may also choose to try maximal 64-bitness.  It means using as much
64-bitness as possible on the platform.  This in turn means even more
binary incompatibilities.  On the other hand, your platform may not
have any more 64-bitness available than what you already have chosen.

If this doesn't make any sense to you, just accept the default 'n'.
Try to use maximal 64-bit support, if available? [n] 
==

Should I still reconfigure perl with the -Uuselargefiles parameter? Is the 
-D_FILE_OFFSET_BITS=64 set by the -Duse64bitint? If so, then the script didn't 
take the default [n].


Mark MurphyWayne State University
Systems Analyst II Computing & Information Technology (C&IT)
(313) 577-4795 Voice   Academic Computing & Customer Services (ACCS)
(313) 577-8787 Fax 5425 Woodward Ave.
   Detroit,  MI.   48202

Email: [EMAIL PROTECTED]
WWW  : ht

Re: PerlTransHandler

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Sergey Ivanyuk wrote:

> package handler;
> 
> use Apache;
> 
> sub handler {
> return DECLINED;
> }

where does DECLINED come from?  watch what happens if you add 'print
handler()' and run it from the command line, and watch what happens when
you add 'use strict;'.  adding 'use Apache::Constants qw(DECLINED)' will
fix your problem.




Re: Apache::Registry script problem

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Drew Taylor wrote:

> I have tried many things to solve this problem. Many thanks go to
> Geoffrey Young who helped me privately (and clued me into a great
> solution to another future maintenance problem as well!).

i glad your problem is solved, but can we keep all help on the list to
prevent duplication of efforts?  i get the feeling this is happening
alot.  it's a pity for folks to take time trying to help solve a problem
that's already been solved :)




Re: mod_perl 1.24 testing keeps failing

2000-05-25 Thread Mark Murphy

I never mentioned this but I'm running Solaris 7 on a Ultra 10


- Begin Forwarded Message -

Date: Thu, 25 May 2000 15:28:05 -0400 (EDT)
From: Mark Murphy 
Subject: Re: mod_perl 1.24 testing keeps failing
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-MD5: L1MbykrMxzsjepplHuWHSw==

>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>list-help: 
>list-unsubscribe: 
>list-post: 
>Delivered-To: mailing list [EMAIL PROTECTED]
>X-Authentication-Warning: mojo.covalent.net: dougm owned process doing -bs
>Date: Tue, 23 May 2000 20:38:26 -0700 (PDT)
>From: Doug MacEachern <[EMAIL PROTECTED]>
>To: Mark Murphy <[EMAIL PROTECTED]>
>cc: [EMAIL PROTECTED]
>Subject: Re: mod_perl 1.24 testing keeps failing
>MIME-Version: 1.0
>X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
>
>On Tue, 23 May 2000, Mark Murphy wrote:
>
>> Here is some more information I gathered from trying the "make test" under 
>> mod_perl. I ran the command by hand and discovered that I'm getting a core 
dump.
> 
>> (gdb) backtrace
>> #0  0xff1c5568 in _smalloc () from /usr/lib/libc.so.1
>> #1  0xff1c55ac in malloc () from /usr/lib/libc.so.1
>> #2  0xff0e2940 in Perl_savepvn ()
>
>ah, looks like typical solaris dso problem, which mod_perl's Makefile.PL
>should have warned you about and suggested solutions to pick from:
>
>if ($] < 5.006) {
>phat_warn(suggestions:
>   *) Do not configure mod_perl as a DSO
>   *) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005)
>   *) Configure Perl with -Uusemymalloc (not recommended for performance)
>EOF
> }
> elsif ($bincompat) {
> phat_warn(suggestions:
>   *) Do not configure mod_perl as a DSO
>   *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)
>EOF
>}
>

I double checked but never received this message from mod_perl's Makefile.PL. I 
decided to install Perl 5.6.0 with the following command:

  sh Configure -Dcc=gcc -Ubincompat5005
  
I did use all the defaults and I had to include the location to my BerkeleyDB 
include and lib paths.

   -I/usr/local/BerkeleyDB.3.0/include
   -L/usr/local/BerkeleyDB.3.0/lib

Everything went fine and I then proceeded with a clean install of the mod_ssl 
2.6.4, mod_perl 1.24, and apache 1.3.12. 

I followed the Install.simple.mod_ssl file in the mod_perl source. I did alter 
the mod_perl part to include other arguments.

perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
> SSL_BASE=/usr/local/src/openSSL/0.9.5a/openssl-0.9.5a \
> APACHE_PREFIX=/usr/local/apache \
> APACHE_SRC=/usr/local/src/apache/1.3.12/apache_1.3.12/src \
> DO_HTTPD=1 \ 
> APACI_ARGS=--enable-module=most,--enable-shared=max,--enable-module=ssl

I then proceeded to build apache and install it. There were no warnings or 
problems up to this point. I then tried to run apache and received the 
following error.

# ./apachectl start
Syntax error on line 213 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_negotiation.so into server: ld.so.1: 
/usr/local/apache/bin/httpd: fatal: relocation error: file 
/usr/local/apache/libexec/mod_negotiation.so: symbol __floatdisf: referenced 
symbol not found
./apachectl start: httpd could not be started
# 

I commented out the LoadModule for mod_negotiation.so and then received the 
error

# ./apachectl start
Syntax error on line 232 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libproxy.so into server: ld.so.1: 
/usr/local/apache/bin/httpd: fatal: relocation error: file 
/usr/local/apache/libexec/libproxy.so: symbol __floatdisf: referenced symbol 
not found
./apachectl start: httpd could not be started
# 

I did the same for libproxy module and then I was able to start the server.

# ./apachectl start
./apachectl start: httpd started
# 


Any ideas to what might be causing this??


When I do the make test in the mod_perl directory. I'm still getting a failure, 
however, its not a core dump. It seems that the error_log is telling me that 
mod_ssl has failed to Inititalize

[Thu May 25 12:06:22 2000] [error] mod_ssl: Init: Failed to generate temporary 
512 bit RSA private key

I don't know if this is because I didn't load the other two modules or not. I 
was able to load the apache ssl version and successfully connect to it with 
https://:. Perhaps the test is tring to write the key in the apache 
install area and not the mod_perl test area. I'll do some further experiments 
with that. 



Mark MurphyWayne State University
Systems Analyst II Computing & Information Technology (C&IT)
(313) 577-4795 Voice   Academic Computing & Customer Services (ACCS)
(313) 577-8787 Fax 5425 Woodward Ave.
   Detroit,  MI.   48202

Email: [EMAIL PROTECTED]
WWW  : http://www.wayne.edu/

Re: PerlTransHandler

2000-05-25 Thread Sergey Ivanyuk

> > I'm having problems with the PerlTransHandler handler.  I would like
> > to only translate some requests, but keep Aliases working.  However, I
> > just can't get that done.  If I use a simple 'return DECLINED;', all
> > my cgi scripts and aliases directories return 'Not found'.  I know the
> > handler is executed, and if I remove it from httpd.conf, everything
> > works fine.  What am I doing wrong?  Should a simple 'return
> > DECLINED;' run default handlers, or am I missing something?  Thanks in
> > advance.
> 
> return DECLINED; should work fine.  can you post a tiny example config and
> handler?  Apache::ShowRequest (part of the Apache::Module package on CPAN)
> can also help debug this sort of problem. 

A little more information.  Originally, I was trying this on Redhat
5.2, now just tried it on 6.2 with stock apache and stock mod_perl.
Same result. 

I've added the line marked by + to the default httpd.conf:
--

+  PerlTransHandler handler
  Alias /perl/ /home/httpd/perl/
  
SetHandler perl-script
--

This is my handler.pm:

--
#!/usr/bin/perl

package handler;

use Apache;

sub handler {
return DECLINED;
}

1;
--

With this config, no requests work.  Not even a request to the root of
the server, which has the default apache test page installed.  If I
remove the PerlTransHandler line from the config and restart apache,
everything works.

There are the stats from the box I've tried it on:

--
[modemch@rabox4 modemch]$ rpm -qa | grep 'apache\|mod_perl'
apache-1.3.12-2
mod_perl-1.21-10
[modemch@rabox4 modemch]$ uname -a
Linux rabox4.eventsdigital.com 2.2.14-5.0 #1 Tue Mar 7 20:53:41 EST 2000 i586 unknown
[modemch@rabox4 modemch]$ cat /etc/issue

Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.14-5.0 on an i586

[modemch@rabox4 modemch]$ 
--

I really really need to get to the bottom of this.  Thanks for all your help.





Re: mod_perl 1.24 testing keeps failing

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Mark Murphy wrote:
 
>   sh Configure -Dcc=gcc -Ubincompat5005

hmm, i've seen a similar report related to largefile support, try once
more with:

sh Configure -Dcc=gcc -Ubincompat5005 -Uuselargefiles





Re: Apache::Registry script problem

2000-05-25 Thread Drew Taylor

Doug MacEachern wrote:
> 
> On Wed, 24 May 2000, Drew Taylor wrote:
> 
> > The part that changes is the 'cloudstock' and '1'. However, I
> > occasionally (and not reliably) get a page from cloudstock.com using the
> > wiredstock.com scripts! On some debugging, I can verify that when this
> > happens the script has the wrong values. It seems that apache is
> > confused and sometimes serves the wrong script for the given domain!
> 
> sounds like the 'variable won't stay shared' problem, see
> http://perl.apache.org/guide/
I have tried many things to solve this problem. Many thanks go to
Geoffrey Young who helped me privately (and clued me into a great
solution to another future maintenance problem as well!). In the end, I
have decided that it is Stronghold's fault. :-)

So I compiled and configured a seperate apache(1.3.12)/mod_perl(1.24) to
run the non-SSL sites. I also use PerlSerVar to determine the sitename
and siteID from within each VHost section. This enables me to alias a
common cgi-bin for all sites and have one set of scripts for everyone.
While I'm testing the new configuration, I'll turn PerlWarn On and see
if I get any of the "won't stay shared" messages.

Thus far, I haven't run into any problems with the new
server/configuration... I'm keeping fingers crossed. Thanks to those
people who suggested solutions.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



Re: mod_perl 1.24 testing keeps failing

2000-05-25 Thread Mark Murphy

>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>list-help: 
>list-unsubscribe: 
>list-post: 
>Delivered-To: mailing list [EMAIL PROTECTED]
>X-Authentication-Warning: mojo.covalent.net: dougm owned process doing -bs
>Date: Tue, 23 May 2000 20:38:26 -0700 (PDT)
>From: Doug MacEachern <[EMAIL PROTECTED]>
>To: Mark Murphy <[EMAIL PROTECTED]>
>cc: [EMAIL PROTECTED]
>Subject: Re: mod_perl 1.24 testing keeps failing
>MIME-Version: 1.0
>X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
>
>On Tue, 23 May 2000, Mark Murphy wrote:
>
>> Here is some more information I gathered from trying the "make test" under 
>> mod_perl. I ran the command by hand and discovered that I'm getting a core 
dump.
> 
>> (gdb) backtrace
>> #0  0xff1c5568 in _smalloc () from /usr/lib/libc.so.1
>> #1  0xff1c55ac in malloc () from /usr/lib/libc.so.1
>> #2  0xff0e2940 in Perl_savepvn ()
>
>ah, looks like typical solaris dso problem, which mod_perl's Makefile.PL
>should have warned you about and suggested solutions to pick from:
>
>if ($] < 5.006) {
>phat_warn(suggestions:
>   *) Do not configure mod_perl as a DSO
>   *) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005)
>   *) Configure Perl with -Uusemymalloc (not recommended for performance)
>EOF
> }
> elsif ($bincompat) {
> phat_warn(suggestions:
>   *) Do not configure mod_perl as a DSO
>   *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)
>EOF
>}
>

I double checked but never received this message from mod_perl's Makefile.PL. I 
decided to install Perl 5.6.0 with the following command:

  sh Configure -Dcc=gcc -Ubincompat5005
  
I did use all the defaults and I had to include the location to my BerkeleyDB 
include and lib paths.

   -I/usr/local/BerkeleyDB.3.0/include
   -L/usr/local/BerkeleyDB.3.0/lib

Everything went fine and I then proceeded with a clean install of the mod_ssl 
2.6.4, mod_perl 1.24, and apache 1.3.12. 

I followed the Install.simple.mod_ssl file in the mod_perl source. I did alter 
the mod_perl part to include other arguments.

perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
> SSL_BASE=/usr/local/src/openSSL/0.9.5a/openssl-0.9.5a \
> APACHE_PREFIX=/usr/local/apache \
> APACHE_SRC=/usr/local/src/apache/1.3.12/apache_1.3.12/src \
> DO_HTTPD=1 \ 
> APACI_ARGS=--enable-module=most,--enable-shared=max,--enable-module=ssl

I then proceeded to build apache and install it. There were no warnings or 
problems up to this point. I then tried to run apache and received the 
following error.

# ./apachectl start
Syntax error on line 213 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_negotiation.so into server: ld.so.1: 
/usr/local/apache/bin/httpd: fatal: relocation error: file 
/usr/local/apache/libexec/mod_negotiation.so: symbol __floatdisf: referenced 
symbol not found
./apachectl start: httpd could not be started
# 

I commented out the LoadModule for mod_negotiation.so and then received the 
error

# ./apachectl start
Syntax error on line 232 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libproxy.so into server: ld.so.1: 
/usr/local/apache/bin/httpd: fatal: relocation error: file 
/usr/local/apache/libexec/libproxy.so: symbol __floatdisf: referenced symbol 
not found
./apachectl start: httpd could not be started
# 

I did the same for libproxy module and then I was able to start the server.

# ./apachectl start
./apachectl start: httpd started
# 


Any ideas to what might be causing this??


When I do the make test in the mod_perl directory. I'm still getting a failure, 
however, its not a core dump. It seems that the error_log is telling me that 
mod_ssl has failed to Inititalize

[Thu May 25 12:06:22 2000] [error] mod_ssl: Init: Failed to generate temporary 
512 bit RSA private key

I don't know if this is because I didn't load the other two modules or not. I 
was able to load the apache ssl version and successfully connect to it with 
https://:. Perhaps the test is tring to write the key in the apache 
install area and not the mod_perl test area. I'll do some further experiments 
with that. 



Mark MurphyWayne State University
Systems Analyst II Computing & Information Technology (C&IT)
(313) 577-4795 Voice   Academic Computing & Customer Services (ACCS)
(313) 577-8787 Fax 5425 Woodward Ave.
   Detroit,  MI.   48202

Email: [EMAIL PROTECTED]
WWW  : http://www.wayne.edu/




Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, ___cliff rayman___ wrote:
> >  PeerAddr  => 209.10.98.1,

> > print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";
 
> your answer #1 is correct.
> you have already connected to 209.10.98.1 via http protocol.

but since both are to the same address, it should work fine, which is what
the 1.22 fix i mentioned deals with.




Re: REPOST: Limiting Resources

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Vivek Khera wrote:
> >> limit of RLimitCPU. But
 
> No; you are wrong.

wrt RLimitCPU and friends, he is right.  the built-in apache RLimit
directives only work for mod_cgi processes, which are set in
ap_call_exec().  hmm, i bet the RLimit* directives could be moved to a
child_init handler, in which case, they should work for mod_perl processes
and we wouldn't need Apache::Resource.




Re: REPOST: Limiting Resources

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Suresh wrote:

> I am trying to limit the execution of a mod_perl script by setting the 
> limit of RLimitCPU. But
> this does not seem to work. I am using apache 1.3.12 , mod_perl. I 
> tired using the module
> Apache::Resource but even that did not work.
> 
> Does any body know why this is or am i missing something.

no clue.  you don't mention what os or what Apache::Resource config you
are using.




Re: Apache::PerlVINC

2000-05-25 Thread Stas Bekman

On Wed, 24 May 2000, Kees Vonk 7249 24549 wrote:

> > try this in httpd.conf:
> > 
> > 
> > delete $INC{'Apache/PerlVINC.pm'};
> > require Apache::PerlVINC;
> > 
> 
> Apache start up now (why does mod_perl not do this, can you 
> explain?), however I get the following error when trying to 
> access a page that contains the reloaded module:
> 
> 
> 
> [Wed May 24 09:00:15 2000] [warn] Apache::PerlVINC: reloading 
> 'Ward/IDV/IDVDatabase.pm'
> 
> [Wed May 24 09:00:15 2000] [error] Can't locate 
> Ward/IDV/IDVDatabase.pm in @INC (@INC contains:) at 
> /opt/perl5/lib/site_perl/PA-RISC1.1/Apache/PerlVINC.pm line 
> 59.
> 
> -
> 
> 
> I played around a little bit and found that I have to put the 
> PerlVersionINC directive before the PerlINC directive (which 
> makes sense looking at the code) and then that works (you 
> might want to change this in your example, (and in the guide, 
> Stas)).

Kees, thanks for the update. Will add this.

P.S. I watch the list even if I'm silent, so I pick all your notes
regarding the guide, even if I don't respond... So keep on those comming,
your contributions is what really makes the guide invaluable!

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




Re: Search for Apache::Safe

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Alexander Lazic wrote:

> hi,
> 
> i search for the Apache::Safe Module which isn´t in mod_perl-1.24
> included.

it doesn't exist.  i had written a version once, but wasn't happy with it.
there is an experimental PerlOpmask directive that was added to mod_perl
in 1.15_01 (see Changes 9/98), but i haven't looked at since.  this
directive is intended to mask op codes (e.g. system, backticks) and skips
the namespace protection that Safe.pm attempts to provide, that simply
cause too much trouble when trying to implement Apache::Safe.




Re: httpd exits with apache-1.3.12 and mod_perl-1.21 on Redhat 6.2

2000-05-25 Thread Stas Bekman

On Wed, 24 May 2000, Roberto Bourgonjen wrote:

> Hi all,
> 
> I am encountering strange problems on redhat 6.2 installations with
> rpm's apache-1.3.12-2 and mod_perl-1.21-10 (the latest available
> versions from redhat. I _have_ to use rpm's). I've tried two machines.

If the latest mod_perl solves the problem, creating a new RPM is a matter
of downloading the SRPM file (source, e.g. mod_perl-1.21-10.src.rpm),
running:

% rpm -i mod_perl-1.21-10.src.rpm

going into /usr/src/redhat/SOURCES/

putting mod_perl-1.24.tar.gz there

editing /usr/src/redhat/SPECS/mod_perl-1.21-10.spec to pick the latest
tar.gz instead of mod_perl-1.21.tar.gz, renaming the spec file to
mod_perl-1.24-1.spec or else and builing the rpm:

% rpm -ba  /usr/src/redhat/SPECS/mod_perl-1.24-1.spec

and you will get both the src and i386 rpms created.

Enjoy.

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




Re: GET html page - permission denied

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Prasit P wrote:

> Hi guys,
> 
> I've built Apache 1.3.12 with mod_perl 1.21.

try upgrading mod_perl, 1.22 has this change:

=item 1.22 - March 22, 2000

proxy support fixed wrt RFC2068, thanks to Benjamin Elijah
Griffin for the spot





Re: Can't call method "bytes_sent"

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Kees Vonk 7249 24549 wrote:

> What could cause the following error in a  Section (in 
> the middle of a virtual host declaration)?
> 
> Syntax error on line 350 of /opt/ward/apache/conf/httpd.conf:
> Can't call method "bytes_sent" on an undefined value at 

you can't call Apache->bytes_sent() when the server is starting.




Re: CGI.pm broken with Apache/mod_perl/warnings? (was Re: XHTML_DTDredefined?)

2000-05-25 Thread Doug MacEachern

On 25 May 2000, Randal L. Schwartz wrote:
 
> Yeah, it's CGI.pm alright.  So do I complain to Lincoln to fix it, or
> is it just a synergy thing between mod_perl, Apache, and CGI.pm that I'll
> have to live with?

are you re-loading CGI.pm?  that's the only way this warning can be
triggered, from what i can see.  in which case, this wouldn't be a bug in
CGI.pm, the re-loader simply needs:
{
no warnings;
}




Re: PerlTransHandler

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Sergey Ivanyuk wrote:

> Hi All. 
> 
> I'm having problems with the PerlTransHandler handler.  I would like
> to only translate some requests, but keep Aliases working.  However, I
> just can't get that done.  If I use a simple 'return DECLINED;', all
> my cgi scripts and aliases directories return 'Not found'.  I know the
> handler is executed, and if I remove it from httpd.conf, everything
> works fine.  What am I doing wrong?  Should a simple 'return
> DECLINED;' run default handlers, or am I missing something?  Thanks in
> advance.

return DECLINED; should work fine.  can you post a tiny example config and
handler?  Apache::ShowRequest (part of the Apache::Module package on CPAN)
can also help debug this sort of problem. 




Re: Need help in compiling the mod-perl

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Seshagiri Rao Maddirala wrote:

> Hi,
> 
> I am tryong to compile modperl with gcc2.8.1 on solaris 7.
> Even before make finishes I get out with error:
> 
> mod_perl.c at line 278 'aptestconfigonly' - Unresolved symbol.
> I picked it up today afternoon from ftp site of perl.apache.org.

> similar to that) and log file shows up that apache 1.3.6 with

try apache 1.3.12




Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Doug MacEachern

On Thu, 25 May 2000, Marc Lehmann wrote:
 
> Actually, and to my surprise, PerlModule/PerlRequire is not done twice,
> at leats not with respect to reparsing. They simply don't reparse the
> modules, so mod_perl works *perfectly* without PerlFreshRestart, and
> without special measures.

right, because when you 'require Foo::Module', Perl caches Foo/Module.pm
in %INC and does not re-parse it.  PerlFreshRestart On causes
delete $INC{'Foo/Module.pm'}; to happen, so Perl will re-parse it.




Re: httpd exits with apache-1.3.12 and mod_perl-1.21 on Redhat 6.2

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Roberto Bourgonjen wrote:

> Hi all,
> 
> I am encountering strange problems on redhat 6.2 installations with
> rpm's apache-1.3.12-2 and mod_perl-1.21-10 (the latest available
> versions from redhat. I _have_ to use rpm's). I've tried two machines.
> 
> As soon as load certain modules the server exits immediately, without 
> producing the slightest error message.

try this:

% gdb httpd
(gdb) b exit
(gdb) run -X

whether it core dumps or exit() is called, post the output of:

(gdb) bt





Re: difference between ...

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, David Hajoglou wrote:

> Would there ever be any difference between the output of the following:
> 
> (looking on the mod_perl quick reference card)
> 
> >From Apache::URI
>   $str = $uri->query()
> 
> 
> >From Request object
>   $str = $r->args();
> 
> As far as what they hold about the request, would these ever differ, or
> do they access the same data (in different ways)?

they are the same, see http_protocol.c:

r->args = r->parsed_uri.query;




Re: Apache::Registry script problem

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Drew Taylor wrote:

> Hi all,
> 
> I'm having a serious, but intermittent, problem with my Apache::Registry
> scripts. I have 2 (soon to be more!) site running on the same physical
> server. Each site is driven by a set of short perl-script scripts. The
> scripts execute code in OO modules that are shared among all servers.
> The scripts are identical between all sites except for the following:
> 
> (index.pl)
> my $SITENAME = 'cloudstock';
> my $SITEID = 1;
> OR
> my $SITENAME = 'wiredstock';
> my $SITEID = 2;
> 
> (all others in /cgi-bin)
> my $search = eLogix::Search->new($CGI, 'cloudstock', 1);
> $search->blah
> OR
> my $search = eLogix::Search->new($CGI, 'wiredstock', 2);
> $search->blah
> ETC
> 
> The part that changes is the 'cloudstock' and '1'. However, I
> occasionally (and not reliably) get a page from cloudstock.com using the
> wiredstock.com scripts! On some debugging, I can verify that when this
> happens the script has the wrong values. It seems that apache is
> confused and sometimes serves the wrong script for the given domain!

sounds like the 'variable won't stay shared' problem, see
http://perl.apache.org/guide/





Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Perrin Harkins wrote:

> On Wed, 24 May 2000, Marc Lehmann wrote:
> > I was under the impression that you cannot configure Apache from a
> > PerlRequire. If that is not the case (and somehow works) I'd really like
> > to get away from perlsections.
> 
> You can only configure Apache from  sections, but you can load all
> your modules, shared data, etc. from a file pulled in with PerlRequire.

actually you can, if a module defines variables in the
Apache::ReadConfig:: namespace, they are fed to the apache config gears
just as  sections are.




Re: CORE::exit and Apache:Registry

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Mark Hewis wrote:

> As far as I have tested under Apache::Registry the following commands have
> the following effect
> 
> 1) CORE::exit -> restart all child processes for that server ( a little too
> drastic for me)

that shouldn't happen.  it should only kill the kid it was called from.

> 2) exit -> exit code but leave state of all modules the same
> 
> What am am really after is an exit which just restarts the child process (it
> is called in) resetting all module globals any suggestions?

exit(-2) will do a graceful exit of the child (unlike CORE::exit), after
logging the transaction is done and connection is closed.

> On a related topic in a given module
> 
> BEGIN{} seems to be called only on child initialisation while
> END{} is called at the end of each processed request
> 
> This seems a little inconsistant why is this? Can this behaviour be changed?
> 
> Because of this
> 
> close_everything() in END{} in BerkeleyDB.pm is called after each request
> destroying any ties or environments open which for me is not good.

see mod_perl.pod and chapter 9 of the eagle book for BEGIN/END details.
the solution for you would be to load BerkeleyDB at startup, in which
case, END is not called until the child exits.




Re: Problem compiling mod_perl 1.24 on Solaris 2.6

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Fred Miller wrote:

> Like I said, I'm a bit naive in these matters. I didn't specify using
> gcc or cc. I used the same path to compile Perl, Apache, and Mod_Perl.
> When I aaksed which gcc and which cc, my machine does report gcc
> appearing in my path ahead of cc. Could that be the problem?

i could try re-building Perl like so:

% ./Configure -des -Dcc=gcc && make test && make install

that is, go with all the defaults, but force Perl to use gcc.




Re: Apache::PerlVINC

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Kees Vonk 7249 24549 wrote:

> > try this in httpd.conf:
> > 
> > 
> > delete $INC{'Apache/PerlVINC.pm'};
> > require Apache::PerlVINC;
> > 
> 
> Apache start up now (why does mod_perl not do this, can you 
> explain?), 

i can't explain because i haven't been able to reproduce it yet.
actually, i can explain this:
PerlModule Apache::PerlVINC
triggers a call to: ap_add_module(&XS_Apache__PerlVINC);
which makes the command table available to apache, for PerlINC, etc.
directives.  when apache re-reads it's config at startup, it clears the
module list first.  since Apache/PerlVINC.pm is already in %INC, Perl
would not try to re-load it, hence, skipping the call to ap_add_module(),
so apache can no longer see the Apache::PerlVINC command table.  mod_perl
has logic to delete the %INC entry so it is re-loaded, but certain cases
seems to prevent that from happening.  i'm not sure what case(s) that
is yet.  the  trick forces that to happen.

> however I get the following error when trying to 
> access a page that contains the reloaded module:
... 
> I played around a little bit and found that I have to put the 
> PerlVersionINC directive before the PerlINC directive (which 
> makes sense looking at the code) and then that works (you 
> might want to change this in your example, (and in the guide, 
> Stas)).

ok thanks!
 
> Thank you very much, your help has been invaluable.

no problem, glad you've found a solution.
 
> PS. my offer of helping out mainting this module still 
> stands, I start understanding it better all the time.

ok, whenever you're ready, just say the word :) 




Re: REPOST: Limiting Resources

2000-05-25 Thread Steve van der Burg

>> Steve van der Burg <[EMAIL PROTECTED]> writes:
>
>>> I am trying to limit the execution of a mod_perl script by setting the 
>>> limit of RLimitCPU. But
>>> this does not seem to work. I am using apache 1.3.12 , mod_perl. I 
>>> tired using the module
>>> Apache::Resource but even that did not work.
>>> 
>>> Does any body know why this is or am i missing something.
>>> 
>
>SvdB> The RLimit stuff only affects processes forked from the httpd
>SvdB> children (ie. CGI processes).  mod_perl code is part of the
>SvdB> webserver child, so the limits don't apply.  You'll need to look
>
>No; you are wrong.  They do apply to the httpd child process when
>using Apache::Resource.
>
>Here's how I set it up:
>
># limit CPU usage in seconds
>PerlSetEnv PERL_RLIMIT_CPU 90:600
># limit DATA segment in MB
>PerlSetEnv PERL_RLIMIT_DATA 32:64
>PerlChildInitHandler Apache::Resource
>
>Then in my startup.perl script I "use Apache::Resource".
>
>The CPU time is indeed enforced on the mod_perl code.

Thanks for the info, although I'd file this under "other methods", since it's not 
using Apache's RLimitCPU directive.  I'll definitely start doing this myself now.  I'm 
not sure how I missed it before!

...Steve



-- 
Steve van der Burg
Information Services
London Health Sciences Centre
(519) 685-8300 ext 35559
[EMAIL PROTECTED]




Re: global variables and reparsing question (low priority ;)

2000-05-25 Thread Doug MacEachern

On Wed, 24 May 2000, Marc Lehmann wrote:
 
> You must be kidding here!!! Using lexicals on package level is broken??? If
> it is broken, then _why_ is it recommended programming practise in perl (see
> perltoot for example)?

i'm not kidding.  i don't understand whay you mean by 'using lexicals on
package level is broken'.  i see no problem with that.  maybe you could
post an example, your first one, as you said yourself, was broken.  here's
a tiny example that is not broken:

% cat MyTest.pm
package MyTest;

my $x = 0;

sub inc_x {
$x++;
}

sub print_x {
print "x=$x\n";
}

print "MyTest loaded\n";

1;

% cat test.pl
for (1..2) {

delete $INC{'MyTest.pm'};
require MyTest;

for (1..5) {
MyTest::inc_x();
MyTest::print_x();
}

}

% perl test.pl
MyTest loaded
x=1
x=2
x=3
x=4
x=5
MyTest loaded
x=1
x=2
x=3
x=4
x=5

are you expecting different results?

and, like i said, i realize that certain modules make assumptions that
they will only be loaded once in the same process and that re-parsing them
can uncover subtle problems.  but i still consider such assumptions to be
broken.




Re: GET html page - permission denied

2000-05-25 Thread ___cliff rayman___


 
Prasit P wrote:
Hi guys,
I've built Apache 1.3.12 with mod_perl 1.21.
I would get permission denied message, if I use this perl script.
$remote = IO::Socket::INET->new( Proto => "tcp",

PeerAddr  => 209.10.98.1,

PeerPort  => 80,
   
);
print $remote "GET http://209.10.98.1/index.html
HTTP/1.0\n\n";
However, the script would work fine if I use either one of these workarounds:
1. Change "print" line to
print $remote "GET index.html HTTP/1.0\n\n";
 
your answer #1 is correct.
you have already connected to 209.10.98.1 via http protocol.
 
--
___cliff [EMAIL PROTECTED]
 


Re: REPOST: Limiting Resources

2000-05-25 Thread Vivek Khera

> "SvdB" == Steve van der Burg <[EMAIL PROTECTED]> writes:

>> I am trying to limit the execution of a mod_perl script by setting the 
>> limit of RLimitCPU. But
>> this does not seem to work. I am using apache 1.3.12 , mod_perl. I 
>> tired using the module
>> Apache::Resource but even that did not work.
>> 
>> Does any body know why this is or am i missing something.
>> 

SvdB> The RLimit stuff only affects processes forked from the httpd
SvdB> children (ie. CGI processes).  mod_perl code is part of the
SvdB> webserver child, so the limits don't apply.  You'll need to look

No; you are wrong.  They do apply to the httpd child process when
using Apache::Resource.

Here's how I set it up:

# limit CPU usage in seconds
PerlSetEnv PERL_RLIMIT_CPU 90:600
# limit DATA segment in MB
PerlSetEnv PERL_RLIMIT_DATA 32:64
PerlChildInitHandler Apache::Resource

Then in my startup.perl script I "use Apache::Resource".

The CPU time is indeed enforced on the mod_perl code.




Re: REPOST: Limiting Resources

2000-05-25 Thread Steve van der Burg

>I am trying to limit the execution of a mod_perl script by setting the 
>limit of RLimitCPU. But
>this does not seem to work. I am using apache 1.3.12 , mod_perl. I 
>tired using the module
>Apache::Resource but even that did not work.
>
>Does any body know why this is or am i missing something.
>

The RLimit stuff only affects processes forked from the httpd children (ie. CGI 
processes).  mod_perl code is part of the webserver child, so the limits don't apply.  
You'll need to look into limiting the httpd processes using another method (like in 
the shell that's used to launch the httpd parent).

...Steve


-- 
Steve van der Burg
Information Services
London Health Sciences Centre
(519) 685-8300 ext 35559
[EMAIL PROTECTED]




REPOST: Limiting Resources

2000-05-25 Thread Suresh


Hi all,



I am trying to limit the execution of a mod_perl script by setting the 
limit of RLimitCPU. But
this does not seem to work. I am using apache 1.3.12 , mod_perl. I 
tired using the module
Apache::Resource but even that did not work.

Does any body know why this is or am i missing something.

suresh



__
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/



Re: Error in running apache::asp, part 3

2000-05-25 Thread Ime Smits

| [error] Undefined subroutine &Apache::ASP::handler called.
| what does it mean?
| How to fix it?

Considering the errors you posted the past hour, I think something went
wrong during the Apache::ASP installation. Consider installing Apache::ASP
once again with the cpan installer (possibly use force install) and examine
the output very carefully for missing dependencies. My experience is that
most of the time a single "install Apache::ASP" in cpan isn't sufficient and
the installer doesn't seem te resolve all dependencies right automatically,
so you have to do some things manually on a really clean system. And...
don't forget to restart your mod_perl enhanced Apache after that.

Ime




Error in running apache::asp, part 3

2000-05-25 Thread Art

Hi,

After fixing the MD5 error, when I tried to run a script, I got

internal error on the browser.

In the error log, I got:

[error] Undefined subroutine &Apache::ASP::handler called.


what does it mean?

How to fix it?

Arthur (newbie)



Search for Apache::Safe

2000-05-25 Thread Alexander Lazic

hi,

i search for the Apache::Safe Module which isn´t in mod_perl-1.24
included.

mod_perl-1.24/MANIFEST => #lib/Apache/Safe.pm

But on

"http://www.perl.com/CPAN-local/modules/by-module/Apache/apache-modlist.html"

is listed.

Please can anyone tell me where i can get it, because i think it
cooperate better with Apache then the Safe-Module from Perl.

Why?

i want to protect the namspace vor several Script´s which run under
several Users.

thanx

al ;-)





Re: Newbie: Apache::DBI Directive bug

2000-05-25 Thread John D Groenveld

Apache might barf on the PerlModule directive if you built modperl as a 
DSO, but forgot to actually include in httpd.conf
LoadModule perl_module libexec/libperl.so

Did you confirm that Apache has modperl loaded, perhaps with
HEAD http://localhost/

John
[EMAIL PROTECTED]




Re: Another problem with Apache::ASP and DynaLoader.pm

2000-05-25 Thread Prasit P

Download MD5 module and install it.

http://theoryx5.uwinnipeg.ca/CPAN/by-module



--- Art <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> In the the error log I got the following error:
> 
> [Thu May 25 08:05:41 2000] [error] Can't load
> '/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/MD5/MD5.so' for
> module MD5:
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/MD5/MD5.so:
> Undefined symbol "PL_markstack_ptr" at
> /usr/libdata/perl/5.00503/DynaLoader.pm line 169.
> 
>  at /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 13
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 13.
> 
> [Thu May 25 08:05:41 2000] [error] Undefined subroutine
> &Apache::ASP::handler called.
> 
> 
> Please tell me how to fix it.
> 
> 
> Yours sincerely,
> 
> Arthur


=

"God is REAL ... 
 unless previously declared as an INTEGER."

   - anonymous


__
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/



Another problem with Apache::ASP and DynaLoader.pm

2000-05-25 Thread Art

Hi.

In the the error log I got the following error:

[Thu May 25 08:05:41 2000] [error] Can't load
'/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/MD5/MD5.so' for
module MD5:
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/MD5/MD5.so:
Undefined symbol "PL_markstack_ptr" at
/usr/libdata/perl/5.00503/DynaLoader.pm line 169.

 at /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 13
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 13.

[Thu May 25 08:05:41 2000] [error] Undefined subroutine
&Apache::ASP::handler called.


Please tell me how to fix it.


Yours sincerely,

Arthur



Re: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread JoshNarins

The United Nation's IMIS Project definitely exceeded 100,000
lines of Perl. If you throw in all the utilites and admin 
stuff, the total probably tops 200,000. The design was decent 
enough that it was rare that any particular module was 
completlely overhauled or found to be unncessary. IMIS 
manages the payroll for the UN, which has one of the world's 
more complex payroll systems.

Maybe all of it wasn't art, but it wasn't spaghetti either.

Plus. there is a link here somewhere ... ah, here it is
http://perl.apache.org/guide/intro.html#High_Profile_Sites_Running_mod_p

> I'm in the process of designing an ecommerce system, and have several 
options 
> on the table.  Since I love perl/mod_perl/apache, my knee-jerk reaction is 
to 
> write it in perl.  However, in the best interest of the project, I need to 
> look at other possibilities, and take an objective look at the problem.
>  
>  This site will have major traffic, will need to be extended and changed (a 
> lot), and needs to scale very well.  My experience with Perl (as well as 
what 
> I've heard from other developers) is that Perl turns to spaghetti rapidly 
> once you hit the 10,000 line mark.  I know Perl can handle the performance. 
 
> What are your experiences with extendability and readability of code?
>  
>  Could someone also give me a quick list (or a link to where I can find a 
> list) of some high-profile sites that use Perl, and pull it off?  Theres a 
> difference between a company using something successfully, and just getting 
> by with something (Amazon comes to mind for a system just getting by...
> solving their pasta-problems by adding more developers).
>  
>  Thanks, I want to use Perl, but it has to be a justified decision.



GET html page - permission denied

2000-05-25 Thread Prasit P

Hi guys,

I've built Apache 1.3.12 with mod_perl 1.21.

I would get permission denied message, if I use this perl script.

$remote = IO::Socket::INET->new( Proto => "tcp",
 PeerAddr  => 209.10.98.1,
 PeerPort  => 80,
);
print $remote "GET http://209.10.98.1/index.html HTTP/1.0\n\n";


However, the script would work fine if I use either one of these workarounds:

1. Change "print" line to

print $remote "GET index.html HTTP/1.0\n\n";

2. Remove the line, "Addmodule mod_perl.c", from httpd.conf (that's mean I
can't don't use mod_perl in the Apache)


Unfortunately, I need both mod_perl & my original script to work without the
error.  Anybody know the solution, please help.

Regards,
Prasit




=

"God is REAL ... 
 unless previously declared as an INTEGER."

   - anonymous


__
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/



RE: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Matt Sergeant

On Thu, 25 May 2000, Jason Bodnar wrote:

> > Could someone also give me a quick list (or a link to where I can find a
> > list) of some high-profile sites that use Perl, and pull it off? 
> 
> http://www.slashdot.org

Careful with this - it's a high traffic site, yes. But it doesn't exactly
pull off the scaleable code base problem. It took ages for Pudge (Hi
Chris!) to get it into a releaseable state, and even still it's not
exactly a beautiful bit of code. The problem there again: Poor initial
coder and zero design. Rob Malda wasn't even out of Uni when he started
slashdot, and it's code followed it's evolution, turning into a big
mess. I suspect there are probably days when Chris thinks about re-writing
the whole thing from scratch ;-)

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




RE: High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Jason Bodnar

On 25-May-2000 Michael Nachbaur wrote:
> This site will have major traffic, will need to be extended and changed (a
> lot), and needs to scale very well.  My experience with Perl (as well as what
> I've heard from other developers) is that Perl turns to spaghetti rapidly
> once you hit the 10,000 line mark.

I don't think this is a perl-only problem. I also don't think this is a problem
inherent to any high level language. Large projects get messy due to poor
planning and bad programming. Why would Java or C (or any other language) not
suffer from the same problems as Perl?

> I know Perl can handle the performance. 
> What are your experiences with extendability and readability of code?

Again, this is a function of the development team not the language. I've
developed some large scale web applications in Perl (intranet so I can't link
to them) and I have no problem with extensability and readability. Again, it's
just a matter of properly planning things before you write that first line of
code. I just wrapped up the third version of some web discussion forums we use
at Tivoli and had no problem adding new features to the application.
 
> Could someone also give me a quick list (or a link to where I can find a
> list) of some high-profile sites that use Perl, and pull it off? 

http://www.slashdot.org
http://www.deja.com

> Theres a
> difference between a company using something successfully, and just getting
> by with something (Amazon comes to mind for a system just getting
> by...solving their pasta-problems by adding more developers).
> 
> Thanks, I want to use Perl, but it has to be a justified decision.
> 
> -man

-- 
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

Oh everything's cruel according to you.  Keeping him chained us in the 
backyard is cruel.  Pulling his tail is cruel.  Yelling in his ears is 
cruel.  Everything is cruel.  So excuse me if I'm cruel.

-- Homer Simpson
   Bart Gets An Elephant




Error in starting Apache::ASP

2000-05-25 Thread Art

Hi, 

I am new to Perl and apache but want to setup ASP for learning it.

It got the following error in the log file:

[Thu May 25 07:10:35 2000] [alert] [client 127.0.0.1]
/usr/local/share/apache/htdocs/asp/.htaccess: Invalid command
'PerlSetVar', perhaps mis-spelled or defined by a module not included in
the server configuration
[Thu May 25 07:10:48 2000] [alert] [client 127.0.0.1]
/usr/local/share/apache/htdocs/asp/.htaccess: Invalid command
'PerlSetVar', perhaps mis-spelled or defined by a module not included in
the server configuration

what have I done wrong?

is there somewhere I should define apache::asp in like the httpd.conf?

if so, how to define it?

Yours sincerely,


Arthur



Re: Form generation libraries

2000-05-25 Thread Jeffrey W. Baker

On Thu, 25 May 2000, Peter Haworth wrote:

> On 24-May-00 at 18:50, Jeffrey W. Baker ([EMAIL PROTECTED]) wrote:
> > It's C with function pointers as struct members.
> 
> That seems a little excessive to me spacewise, but I guess it means you can
> keep the functions static, and not confuse users with differently named
> functions to do the same thing with different types of input.

Yes exactly.  For example, each type can share the addAttr, getAttr,
setAttr, and delAttr methods, and the TextInput, CheckBoxInput, and
RadioInput could all share the same render method.

> It's just that you said you were adding at the list head for performance. I
> can't see the need for a doubly linked list if you don't have a pointer to the
> tail.

It will be handy when implementing the delAttr method.

> Not sorting still gets my vote. There are too any cases where you
> can't sort on just the value or just the label.

Well as I said if the programmer doesn't want to sort anything, then they
shouldn't call the method.  I don't see anything wrong with adding a
capability that some people might not use.

> 
> Anyway, I'd still like to see the code. In the meantime, HTML::StickyForm will
> probably start off in pure perl. The internals can always be rewritten to use
> your library at some point in the future.

I attached the files common.c and hfTextInput.c.  The former contains the
attribute list manipulation routines (and should be renamed attrList.c),
and the latter is the partial implementation of the standard textbox
input.  The render() method in hfTextInput could be shared by the checkbox
and radio types without modification.

Cheers,
Jeffrey


extern void addAttr(void*, char*, char*);
extern void destroyAttrs(attrList *);


#ifndef HTMLFORMS_H
#define HTMLFORMS_H

/*
 * This header defines the public interface to the htmlforms library.
 * Only the data structures and functions declared here are for public
 * consumption.  Poking around with stuff declared elsewhere is a no-no.
 */
 
typedef struct hfTextInput hfTextInput;
typedef struct attrList attrList;

struct attrList {
attrList *next;
attrList *prev;
char *name;
char *value;
};

struct hfTextInput
{
attrList *attrs;
void (*addAttr)();
char* (*render)();
void (*destroy)();
};

extern hfTextInput * hfTextInputNew();

#endif /* HTMLFORMS_H */


#include 
#include 
#include 
#include "htmlforms.h"
#include "common.h"

typedef struct hfElement hfElement;

struct hfElement
{
attrList *attrs;
};

static attrList * newAttrList (char *, char *);
static void destroyAttrList (attrList *);

void addAttr (void *el, char *name, char *value)
{
attrList *cur, *new;
hfElement *myEl = (hfElement *)el;

new = newAttrList(name, value);

if (myEl->attrs == NULL)
myEl->attrs = new;
else 
{
cur = myEl->attrs;
while (cur->next != NULL)
cur = cur->next;

new->prev = cur;
cur->next = new;
}
}

void destroyAttrs (attrList *list)
{
attrList *next;

while (list != NULL)
{
next = list->next;
destroyAttrList(list);
list = next;
}
}

static void destroyAttrList (attrList *list)
{
free(list->name);
free(list->value);
free(list);
}

static attrList* newAttrList (char *name, char *value)
{
attrList *new;

new = malloc(sizeof(attrList));
if (new == NULL)
abort();

new->next  = NULL;
new->prev  = NULL;

new->name  = malloc(strlen(name)  + 1);
if (new->name == NULL)
abort();

strcpy(new->name, name);

if (value != NULL) 
{
new->value = malloc(strlen(value) + 1);
if (new->value == NULL)
abort();

strcpy(new->value, value);
}

return new;
}


#include "htmlforms.h"
#include "common.h"
#include 
#include 

extern hfTextInput * hfTextInputNew ();
static char * hfTextInputRender (hfTextInput *);
static void hfTextInputDestroy (hfTextInput *);

hfTextInput * hfTextInputNew ()
{
hfTextInput *new;

new = malloc(sizeof(hfTextInput));
if (new == NULL)
abort();

new->attrs   = NULL;
new->addAttr = &addAttr;
new->render  = &hfTextInputRender;
new->destroy = &hfTextInputDestroy;

return new;
}

char * hfTextInputRender (hfTextInput *self)
{
attrList *cur;
char *out;
int bytes;
   
/* \0 */
bytes = 8;

/* Count the bytes needed for each attr/value pair, including spaces */
cur = self->attrs;
while (cur != NULL)
{
bytes++; /* for the leading space */

bytes += strlen(cur->name);

if (cur->value != NULL)
bytes += (3 /* ="" */ + strlen(cur->value));

cur = cur->next;
}

out = malloc(bytes);
if (out 

Can't call method "bytes_sent"

2000-05-25 Thread Kees Vonk 7249 24549

What could cause the following error in a  Section (in 
the middle of a virtual host declaration)?

Syntax error on line 350 of /opt/ward/apache/conf/httpd.conf:
Can't call method "bytes_sent" on an undefined value at 
/opt/perl5/lib/5.00503/CGI/Carp.pm line 344.




Kees



High-volume mod_perl based ecommerce sites?

2000-05-25 Thread Michael Nachbaur

I'm in the process of designing an ecommerce system, and have several options on the 
table.  Since I love perl/mod_perl/apache, my knee-jerk reaction is to write it in 
perl.  However, in the best interest of the project, I need to look at other 
possibilities, and take an objective look at the problem.

This site will have major traffic, will need to be extended and changed (a lot), and 
needs to scale very well.  My experience with Perl (as well as what I've heard from 
other developers) is that Perl turns to spaghetti rapidly once you hit the 10,000 line 
mark.  I know Perl can handle the performance.  What are your experiences with 
extendability and readability of code?

Could someone also give me a quick list (or a link to where I can find a list) of some 
high-profile sites that use Perl, and pull it off?  Theres a difference between a 
company using something successfully, and just getting by with something (Amazon comes 
to mind for a system just getting by...solving their pasta-problems by adding more 
developers).

Thanks, I want to use Perl, but it has to be a justified decision.

-man



Re: [Re: [Re: Questions about Apache::Session]]

2000-05-25 Thread Edgardo Szulsztein

Hi

First of all, I ask my apologises with the list. In the text:
> could I do it (I don't like the list, but I couldn't find this >information
in the documentation).

I wanted to say: I don't want to bother the list with my question, but I
couldn't find this information in the documentation :-)

Michael, I'm very interested in your postgresql patch, but my doubt is how is
the performance of DBI::Store with postgresql vs. FileStore. Did you see any
difference?

Thanks all for your help

Michael Schout <[EMAIL PROTECTED]> wrote:
> On Sun, Jun 29, 2036 at 12:21:26AM +, Edgardo Szulsztein wrote:
> > Hi again
> > 
> > It worked great. Thanks for the help!
> > 
> > Now, I would like to make it work with the postgresql database server.
How
> > could I do it (I don't like the list, but I couldn't find this information
in
> > the documentation).
> 
> One of the problems I ran into when doing this was that Apache::Session
uses
> Storable to freeze the session data before storing it in the database, put
> PostgreSQL does not like binary data in TEXT fields.  So out of the box, it
> doesnt seem that you can use Apache::Session::DBI with postgresql.  
> 
> However, its very simple to get around this.  I just created my own
> Apache::Session::UUDBI and Apache::Session::UUDBIStore modules (by copying
the
> source for Apache::Session::DBI and Apache::Session::DBIStore).  I then
> modified it so that every time it wrote the session data it called
pack("u*",
> $data) to uuencode the session data.  And everywhere it retrieved the
session
> data it calls unpack("u*" $data) so that it reverses the operation.  This
> results in storing the session data in the db in uuencoded format
(text-only)
> and makes postgresql happy.
> 
> Anyway, thats how I got around it. I'm sure there are several others.
> 
> If you would be interested in my Apache::Session::UUDBI modules, send me an
> email and I will send you (or anyone else who might be interested) a copy
of
> it.
> 
> Mike



Get your own FREE, personal Netscape WebMail account today at 
http://webmail.netscape.com.



Re: Bugs 5.6.0 modperl use?

2000-05-25 Thread Tom Barron

Jeffrey W. Baker wrote:
> 
> On Wed, 24 May 2000, John M Vinopal wrote:
> > ...
> > CGI::Carp preloaded.
> > DBI preloaded.
> >
> > [Wed May 24 19:58:28 2000] [error] PerlRun: `Bizarre copy of HASH in aassign
> > at /usr5/perl/lib/5.6.0/Carp/Heavy.pm line 79.
> >
> > Prototype mismatch: sub 
>Apache::ROOT::cgi_2dbin::adtaker::get_username::SQL_INTEGER vs () at 
>/usr5/perl/lib/5.6.0/Exporter.pm line 57.
> >  at /usr5/caps_prod/scripts/adtaker/get_username line 6
> >
> > where SQL_INTEGER is imported via
> > use DBI qw(SQL_INTEGER);
> >
> > Anyone else seen these?
> 
> Is anyone else using Perl 5.6.0?

As I mentioned in the message I sent you, Jeff (intended for the whole
list, sorry), I installed 5.6.0 yesterday along with some modules I
downloaded for a particular project.  I immediately started getting the
following complaint:

   Prototype mismatch: sub IO::Handle::blocking ($;$) vs none at   
   /usr/local/lib/perl5/site_perl/5.6.0/LWP/Conn/_Connect.pm line 43.

from the following script:

   #!/usr/bin/perl
   use LWP::Conn::_Connect;

I've been able to at least suppress the complaint by adding a line to
_Connect.pm to check the version of IO::Handle (I have 1.21) and not run
the hack at the top of the file which is commented as being unnecessary
after IO::Handle 1.18.

I've sent a message and patch to the author of LWPng (Gisle Aas), which
_Connect.pm is part of, asking him to verify whether this fixes or only
masks the problem.  I'll be glad to make my patch available, but it
might be better to wait for Gisle to incorporate it (or something even
better :) into LWPng.

Tom



CGI.pm broken with Apache/mod_perl/warnings? (was Re: XHTML_DTD redefined?)

2000-05-25 Thread Randal L. Schwartz

> "Perrin" == Perrin Harkins <[EMAIL PROTECTED]> writes:

Perrin> "Randal L. Schwartz" wrote:
>> 
>> I'm getting this on every startup:
>> 
>> Constant subroutine XHTML_DTD redefined at /usr/lib/perl5/5.00503/constant.pm line 
>175.
>> 
>> what's this about?

Perrin> That would be the mandatory warning for redefined inlined subroutines. 
Perrin> That particular one looks like it comes from CGI.pm.  You can make this
Perrin> stop by using Apache::Symbol.

Yeah, it's CGI.pm alright.  So do I complain to Lincoln to fix it, or
is it just a synergy thing between mod_perl, Apache, and CGI.pm that I'll
have to live with?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Form generation libraries

2000-05-25 Thread Peter Haworth

On 24-May-00 at 18:50, Jeffrey W. Baker ([EMAIL PROTECTED]) wrote:
> On Wed, 24 May 2000, Peter Haworth wrote:
> > Jeffrey W. Baker wrote:
> > > On Wed, 24 May 2000, Peter Haworth wrote:
> > > > Jeffrey W. Baker wrote:
> > > > > myInput = hfTextInputNew();
> > > > > myInput->addAttr(myInput, "name", "first_name");
> > > > > myInput->addAttr(myInput, "value", "Jeffrey");
> > > > > printf("%s\n", myInput->render(myInput));
> > > > > myInput->destroy(myInput);
> > 
> > Is this C or C++? If C, do you have a member for each function in the
> > struct, and if it's C++, why are you passing myInput twice? Or maybe you
> > just got carried away with your example.
> 
> It's C with function pointers as struct members.

That seems a little excessive to me spacewise, but I guess it means you can
keep the functions static, and not confuse users with differently named
functions to do the same thing with different types of input.

> > > Actually, there is another way, and that is to simply build a linked
> > > list of attributes.  It doesn't matter what order you put the
> > > attributes in, so I just add them to the head of the list for
> > > performance.  Adding to the head of a list is faster than hashing
> > > anyway.  If you use the setAttr(self *, char *, char *) method, the list
> > > has to be scanned, but is is likely to be so short as to not matter.
> > 
> > OK, that seems sensible. There's no reason to go overboard to get more
> > hash-like semantics, when you'll generally just be stuffing things in,
> > then reading them all out.
> 
> Exactly.  The mainstream use case is to add things and then render.  The
> capability to remove and change things exists, but doesn't need to be as
> streamlined.
> 
> > > The other advantage here is storage space.  An attribute in this
> > > implementation takes up only 4*sizeof(void *) + strlen(name) +
> > > strlen(value) + 2.
> > 
> > Is it a doubly linked list, or are you storing something other than name,
> > value, next?
> 
> Doubly-linked.  You aren't sweating those extra 32 bits are you? ;)

It's just that you said you were adding at the list head for performance. I
can't see the need for a doubly linked list if you don't have a pointer to the
tail.

> > Well, personally, I'd have sorted my options before setting them up.
> > Otherwise you need unnecessarily complicated comparison functions to
> > keep your "Please select something" option at the top. ALthough, if it
> > works that way, adding options to a select has to add to the tail of the
> > list, or you'd have to add your options in reverse order.
> 
> If the options are sorted before adding, then you just wouldn't call the
> sort() method.  Or maybe it would be sortByValue() and
> sortByLabel().  That sounds more flexible.

Not sorting still gets my vote. There are too any cases where you can't sort on
just the value or just the label.

Anyway, I'd still like to see the code. In the meantime, HTML::StickyForm will
probably start off in pure perl. The internals can always be rewritten to use
your library at some point in the future.

-- 
Peter Haworth   [EMAIL PROTECTED]
The world is coming to an end. Please log off.




Re: XHTML_DTD redefined?

2000-05-25 Thread Jeremy Howard

> I'm getting this on every startup:
> 
> Constant subroutine XHTML_DTD redefined at /usr/lib/perl5/5.00503/constant.pm 
>line 175.
> 
> what's this about?
> 
This isn't actually a mandatory warning any more (as others have
suggested), but of course being a good boy you've got -w on, so you get
the warning anyway ;-)

I'm a good boy too, so rather than just turn -w off, I've patched my
constants.pm so that in the import sub, it first checks whether the
symbol is defined in the calling package (and if so, it does nothing).

I'd attach the patch, but since I upgraded to 5.6 this problem has fixed
itself, so I haven't got the patched version anymore (I'm a bigger
masochist than you, Randal--I upgraded Perl, mod_perl, and Apache all at
the same time!)

-- 
  Jeremy Howard
  [EMAIL PROTECTED]



Re: Bugs 5.6.0 modperl use?

2000-05-25 Thread Jeremy Howard

> CGI::Carp preloaded.
> DBI preloaded.
> 
> [Wed May 24 19:58:28 2000] [error] PerlRun: `Bizarre copy of HASH in aassign
> at /usr5/perl/lib/5.6.0/Carp/Heavy.pm line 79.
> 
> ...
> Anyone else seen these?

Oh yes, I've been battling that tonight...

Do the following:

In Carp::Heavy, change 'DB' to 'DB_tmp':
Line 39: while (do { { package DB_tmp; @a = caller($i++) } } ) {
Line 79: @a = @{DB_tmp::args}; # must get local copy of args

In CGI::Carp, change Line 257:
FROM: my $message = shift;
TO: my ($message) = @_;

Yes, this really does matter--I carefully reproduced a problem that only
occured when 'shift' was used!

I'll contact the relevant authors tomorrow. I don't know if this is a
Perl 5.6 bug, or a module bug that 5.6 has surfaced.

-- 
  Jeremy Howard
  [EMAIL PROTECTED]



Re: [newbie]: Catching apache output.

2000-05-25 Thread Ask Bjoern Hansen

On Thu, 25 May 2000, Alexei V. Alexandrov wrote:

[...]
>   written in perl can catch the output (any script [php, cgi, etc.],
>   any html file) and parse the output and make some changes to it (say
>   like parsing href tags). Where should i look?

That's not possible with apache 1.3. It's planned for the apache 2 series.

If all your modules are perl modules there is some workarounds to make it
possible.


 - ask 

-- 
ask bjoern hansen - 
more than 70M impressions per day, 




RE: Newbie: Apache::DBI Directive bug

2000-05-25 Thread Geoffrey Young



> -Original Message-
> From: Nigel Hamilton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 25, 2000 3:40 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie: Apache::DBI Directive bug
> 
> 
> Hi,
>   I've got a showstopper bug ...
> 
>   Whenever I place the directive to load Apache::DBI in httpd.conf
>  I get a config file syntax error.

can you be more specific about the contents of the error?  Apache-DBI is not
DBI, so you need to install both packages to get DBI to work...

> 
>   The directive is: PerlModule Apache::DBI
> 
>   I compiled mod_perl with EVERYTHING=1 ... can anyone tell me
> why this would be the case?
> 
> Thanks
> 
> Nige
> 
> p.s. also I've seen 'startup.pl' mentioned in FAQ's and in 
> the list ...
> I'm interested in seeing an example startup.pl for DBI .. and how the
> Apache server 'sources' this file at startup.

look in the eg directory of the Apache-DBI installation for a startup.pl
example...

HTH

--Geoff

> 
> 
> 
> 



Re: [newbie]: Catching apache output.

2000-05-25 Thread Matt Sergeant

On Thu, 25 May 2000, Alexei V. Alexandrov wrote:

> Hello modperl,
> 
>   The problem i would like to solve is that i want to catch the actual
>   output from the apache. I have bought "Writing apache modules with
>   perl and C" there are two examples on how to write thing like Echo
>   or NavBar. These two scripts just parse the actual file that is
>   requested by the client. The thing i want to make is that a module
>   written in perl can catch the output (any script [php, cgi, etc.],
>   any html file) and parse the output and make some changes to it (say
>   like parsing href tags). Where should i look?

The short and sweet of it is that you can't. Apache doesn't cache the
output before sending it like some web servers (Roxen comes to mind), it
sends it as you "print" so you can't. There are things you can do.. for
example if your modules are all mod_perl modules you can use the
techniques used by the Filter/Chain modules, or what AxKit does is
overload Apache.pm's print() method and catches the output that way.

Hope that helps...

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: Preloading modules

2000-05-25 Thread David Hodgkinson


"Eric Jain" <[EMAIL PROTECTED]> writes:

> Any Perl module required from within a module which has been preloaded
> through PerlRequire or PerlModule in httpd.conf will be preloaded into
> shared memory as well. Correct?

Yes. Thus saving some latency when Apache forks a new child.

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



[newbie]: Catching apache output.

2000-05-25 Thread Alexei V. Alexandrov

Hello modperl,

  The problem i would like to solve is that i want to catch the actual
  output from the apache. I have bought "Writing apache modules with
  perl and C" there are two examples on how to write thing like Echo
  or NavBar. These two scripts just parse the actual file that is
  requested by the client. The thing i want to make is that a module
  written in perl can catch the output (any script [php, cgi, etc.],
  any html file) and parse the output and make some changes to it (say
  like parsing href tags). Where should i look?

Best regards,
Alexei V. Alexandrov   [AA4460, AVA32-RIPN, AA1829-RIPE]

*** Alexei V. Alexandrov --- www.elcomsoft.com --- [EMAIL PROTECTED] ***






Preloading modules

2000-05-25 Thread Eric Jain

Any Perl module required from within a module which has been preloaded
through PerlRequire or PerlModule in httpd.conf will be preloaded into
shared memory as well. Correct?


--
Eric Jain




Re: Apache::ASP

2000-05-25 Thread Joshua Chamas

Forever Young wrote:
> 
> Hi Guys,
> I am new to Apache Mod Perl, today I saw the Apache::ASP at www.cpan.org
> I wonder do I need an IIS server to run it? Or can I run it under Linux
> Redhat Apache
> server as well?
> 

Yes, its a perl native port to Apache + mod_perl.  Check out 
  http://www.nodeworks.com/asp/

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Apache::ASP

2000-05-25 Thread Forever Young

Hi Guys,
I am new to Apache Mod Perl, today I saw the Apache::ASP at www.cpan.org
I wonder do I need an IIS server to run it? Or can I run it under Linux
Redhat Apache
server as well?

Thanks you,
Chiang



AxKit article

2000-05-25 Thread Matt Sergeant

http://www.xml.com/pub/2000/05/24/axkit/index.html

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Newbie: Apache::DBI Directive bug

2000-05-25 Thread Nigel Hamilton

Hi,
I've got a showstopper bug ...

Whenever I place the directive to load Apache::DBI in httpd.conf
... I get a config file syntax error.

The directive is: PerlModule Apache::DBI

I compiled mod_perl with EVERYTHING=1 ... can anyone tell me
why this would be the case?

Thanks

Nige

p.s. also I've seen 'startup.pl' mentioned in FAQ's and in the list ...
I'm interested in seeing an example startup.pl for DBI .. and how the
Apache server 'sources' this file at startup.







PerlTransHandler

2000-05-25 Thread Sergey Ivanyuk

Hi All. 

I'm having problems with the PerlTransHandler handler.  I would like
to only translate some requests, but keep Aliases working.  However, I
just can't get that done.  If I use a simple 'return DECLINED;', all
my cgi scripts and aliases directories return 'Not found'.  I know the
handler is executed, and if I remove it from httpd.conf, everything
works fine.  What am I doing wrong?  Should a simple 'return
DECLINED;' run default handlers, or am I missing something?  Thanks in
advance.




Re: Bugs 5.6.0 modperl use?

2000-05-25 Thread Jeffrey W. Baker

On Wed, 24 May 2000, John M Vinopal wrote:

> 
> Apache 1.3.12
> modperl 1.24
> perl 5.6.0
> 
> CGI::Carp preloaded.
> DBI preloaded.
> 
> [Wed May 24 19:58:28 2000] [error] PerlRun: `Bizarre copy of HASH in aassign
> at /usr5/perl/lib/5.6.0/Carp/Heavy.pm line 79.
> 
> Prototype mismatch: sub Apache::ROOT::cgi_2dbin::adtaker::get_username::SQL_INTEGER 
>vs () at /usr5/perl/lib/5.6.0/Exporter.pm line 57.
>  at /usr5/caps_prod/scripts/adtaker/get_username line 6
> 
> where SQL_INTEGER is imported via
> use DBI qw(SQL_INTEGER);
> 
> Anyone else seen these?

Is anyone else using Perl 5.6.0?

-jwb




Re: Need help in compiling the mod-perl

2000-05-25 Thread Ged Haywood

Hi there,

I found it difficult to understand exactly what you mean in some parts
of your message.  I am sorry.  When you give error messages and
configuration details please try to give the exact wording.  Make
these parts of your message separate from the rest of the text of your
message, for example by putting hard returns in the text.

On Wed, 24 May 2000, Seshagiri Rao Maddirala wrote:

> I am tryong to compile modperl with gcc2.8.1 on solaris 7.
[snip]
> log file shows up that apache 1.3.6 with mod_perl 1.24 is loaded 
> and started.

Congratulations!

> But how do I check a perl file whether it is executing.

http://perl.apache.org/guide

> Because the ToDo file says...

Ignore it.

> When I include in httpd.conf, the httpd does not start. Comes out
> with segmentation file and core file generated.

What did you include in httpd.conf?

> I am still doing my home work looking in for any similar problems in
> mailing lists.

Read the Guide - it's probably in there.

73,
Ged.