Re: [OT] Better Linux server platform: Redhat or SuSe?

2002-07-09 Thread Ged Haywood

Hi all,

On Mon, 8 Jul 2002, Owen Scott Medd wrote:

 On Mon, 8 Jul 2002, Ganesan M wrote:
   Schoolmaster.net, 167,000 lines of Perl code, another 30,000 lines of C.
   
   Rich.
   
  How do you run 'C' code from Apache/mod_perl?
 
 Using the perl XS interface usually... that's how we access our text 
 analysis routines which are in C.

Or use Inline.pm if you don't want to get too deeply into it.

Or put your compiled code in the cgi-bin directory if you really can't
be bothered at all, but that's nasty.

73,
Ged.




Re: nice mod_perl statistics to share

2002-07-05 Thread Ged Haywood

Hi all,

On 5 Jul 2002, Dave Hodgkinson wrote:

 Matt Sergeant [EMAIL PROTECTED] writes:
 
  On 5 Jul 2002, Dave Hodgkinson wrote:
  
   RH comes as default with mod_perl compiled as a DSO.
  
  No it does not - it doesn't install Apache by default.
 
 Come again? 

RH offers several options in its automated install routine.  One of
them is server and I think what Dave meant was that this installs
Apache/mod_perl for you - does it?

73,
Ged.




Re: Optional HTTP Authentication ?

2002-07-01 Thread Ged Haywood

Hi there,

On 30 Jun 2002, Randal L. Schwartz wrote:

 What?  The EU is going to make cookies *illegal*?  I highly doubt this.

There is already EU legislation which might make the use of cookies suspect.
It concerns, for example, the monitoring of individual keyboard operators
to measure their performance.  That's been illegal in the EU for some time.
You only have to start counting your cookies to be treading on shaky ground.

73,
Ged.

BTW it's modperlatperldotapachedotorg




Re: Need Porting Sanity Check

2002-06-30 Thread Ged Haywood

Hi there,

Sorry there's a lot to digest all at once in your message, but here's
one tip:

On Sat, 29 Jun 2002, Jeff wrote:

 - Use 'open my $fh, $filename or die $!; wherever I open files

Use Symbol::gensym if you can, it makes dealing with files much less
accident prone.

73,
Ged.




Re: missing .al files with apache/mod_perl

2002-06-27 Thread Ged Haywood

Hi there,

On Wed, 26 Jun 2002, Perrin Harkins wrote:

 Furthermore, this file doesn't exist in my filesystem.  How is it possible
 that (1) the module works without this apparently required file at the
 command line but (2) doesn't work with apache/mod_perl ?
 
 
 How is it possible?  Two ways: you could be wrong about the existence of 
 the file, or the situtation that requires the file might only arise when 
 you use it with mod_perl.  I'd suggest you start debugging it by looking 
 at the things that are different when running it from mod_perl: the 
 user, environment variables, working directory, ways that you call it, 
 etc.  One of those things is probably responsible.

'Perl -V' would tell us what's in INC amongst other things...

73,
Ged.




Re: Any known good configuration for mod_perl DSO?

2002-06-24 Thread Ged Haywood

Hi there,

On Mon, 24 Jun 2002, Wilbur, Charlton wrote:

 I have the task of making Apache, mod_perl, and HTML::Mason work together
 under RedHat.  I know this is a problem;

Not necessarily; look at this thread for example...

73,
Ged.

--

From [EMAIL PROTECTED] Tue Jun 25 00:08:24 2002
Date: 22 Jun 2002 23:23:01 -0400
From: Chip Turner [EMAIL PROTECTED]
To: Zac Morris [EMAIL PROTECTED]
Cc: Jeremy Weatherford [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Fascinating segfault at Apache startup

Zac Morris [EMAIL PROTECTED] writes:

 Honestly though Chip I have to pipe up here.
 
 I was a gung ho RedHat supporter when I first got involved in the
 linux world, and I still believe with it's RPMs and GUI tools it's
 still the best for both new users and corporate environments, but
 man, if you wanna do something that not the EXACT OS version-RPM
 based software version, (hmmm, like DEVELOPMENT) you are SERIOUSLY
 screwed with RPM more times than not.

It depends.  Usually it isn't RPM that is the problem, it's the
-other- software you've installed with RPM.  Dependencies tend to be
an all-or-nothing affair, though, which makes the situation more
complicated.

 So I have spent the last FIVE full days about 10 hours a day setting
 up redhat 7.3 (sans as many of the RPMs as I could possible get away
 with).  Now granted perl 5.6.1 was one of the RPMs I *did* install,
 as was sendmail (since Redhat has REALLY whacked that one up with
 the assumed workstation mode, but I at least know how to FIX
 that), but my apache, mod_perl, java, tomcat, etc I built entirely
 from source utilizing my /opt/{appname} everything all together
 strategy.
 
 I now have a pretty swank lil server setup here.  I just
 successfully tested my perl/DBD::Pg connections and i'll confirm
 jdbc to Pg tomorrow and I'll be set for some major develpment
 efforts.

I'm not familiar with tomcat, so I can't really comment on it
specifically.  But, before I came to Red Hat, I was a compile from
source guy, even on production servers.  Lots of reasons, but one was
that I didn't know RPM.  It seemed like a hassle to deal with it for
little things, etc... so I didn't.

My personal suggestion would be to try to work with the default OS
instead of against it.  Sometimes this is impossible, but sometimes it
isn't so bad.  For instance, instead of compiling straight from
source, you could take our RPMs, modify them (such as making apache
live in /opt), maybe throw in a more recent version, and see how it
works.  Likewise, building tomcat, java, etc, as RPMs may save you
time later when you need to rebuild a box, or clone the system, or
should disaster strike.  Recompiling, checking dependencies by hand,
etc, really is time consuming.  But, of course, so is learning RPM :)
It definitely is a difficult road.  Having travelled it myself,
though, I find it to be tremendously better than how I used to do
things.  It depends on your own personal preferences, though, as well
as company policies, your peers' skillsets, etc.  No one answer fits
everything, but I really do think that package management of some kind
(RPMs, debian, etc) offers many superiorities over recompiling from
source.  YMMV :)  There's no one single answer (too much context), but
in general, whatever OS you use, it usually is easier to work with it
and the tools it provides than against it.

When it comes to perl and mod_perl, we've been working to try to make
sure it works reliably from RPMs.  RH 7.3 should work well out of the
box, as should 7.2, once all errata applied.  The rest of this thread
points out a few issues, though, but I think that tends to be issues
with other perl modules that have shared library components.  If you
(or anyone else!) have specific failures or test cases you've seen,
though, I'll look into it and see if it is something we can fix.

Cheers,
Chip

-- 
Chip Turner   [EMAIL PROTECTED]
  Red Hat, Inc.




Re: perl xml api's

2002-06-22 Thread Ged Haywood

Hi guys,

On Sat, 22 Jun 2002 [EMAIL PROTECTED] wrote:

 thanks matt, i'll get it(XML::LibXML) andgiveit a go.

The subject line for this message was missing the RE: tag.

Just a reminder to anyone new to the List that there are packages
(and people:) which (who) might be confused by this...

73,
Ged.





Re: [JOB] Crack OOP Perl whitebox tester wanted

2002-06-22 Thread Ged Haywood

Hi all,

On Fri, 21 Jun 2002, Zac Morris wrote:

 Old fashioned is right,

Can we decide whether this kind of post is or is not welcome on the List?

My 0.02 is that if someone has decided on the terms of reference for
an offer of employment which he is making then if it's legal, that's
the way it has to be and we don't need to discuss it here - especially
not at such length.

73,
Ged.





Re: apache 1.3.24 mod_perl 1.27 perl 5.6.1 segv

2002-06-22 Thread Ged Haywood

Hi there,

On Fri, 21 Jun 2002, John Saylor wrote:

 Try as I might, I cannot get apache to run. It just keeps segv-ing.

Did you compile everything yourself?

Did you see the document in mod_perl-1.27/SUPPORT ?

73,
Ged.




Re: Illegal Instruction

2002-06-20 Thread Ged Haywood

Hi there,

On Thu, 20 Jun 2002, Prakash Chatterjee wrote:

 I keep getting
 
 child pid 25870 exit signal Illegal Instruction (4) when trying my modperl
 code.

Did you compile Perl and mod_perl yourself?

There's very little to go on in your post, have you read the document
in a file called SUPPORT (which you will find in the mod_perl-x.xx
directory if you grab the source tarball and extract it)?

If not please do so and post the information requested.

73,
Ged.





Re: Idiot question: headers at the base of the page.

2002-06-13 Thread Ged Haywood

Hi all,

On Thu, 13 Jun 2002, Issac Goldstand wrote:

 - Original Message -
 From: Rafiq Ismail (ADMIN) [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 13, 2002 12:19 AM
 
  Under what circumstances would my page render, dumping the HTTP
  headers at the base?  Other than their being sequentially out of
  order, that is.
 
 umm... If you send them twice.  Aside from happening by doing
 $r-send_http_header twice (it's happened), it could be something else is
 automatically sending header s for you...

Or there might be some funny buffering going on that you don't know about.
(Or this might be happening as well as incorrectly sending things twice:).

73,
Ged.




RE: AuthenNTLM, IE, KeepAlives, Post?

2002-06-11 Thread Ged Haywood

Hi there,

On Tue, 11 Jun 2002, Harnish, Joe wrote:

 Does anyone know of issues with mod_perl and post?

Here's one.

73,
Ged.


From [EMAIL PROTECTED] Tue Jun 11 18:16:11 2002
Date: Wed, 20 Mar 2002 19:20:29 + (GMT)
From: Ged Haywood [EMAIL PROTECTED]
To: Stas Bekman [EMAIL PROTECTED]
Subject: Re: mod_perl does not see multipart POSTs -- SOLVED

Hi Stas,

On Thu, 21 Mar 2002, Stas Bekman wrote:

 Vuillemot, Ward W wrote:
  Using the POST2GET snippet was interferring.

I kept trying to tell him that...

 Ward, Ernest, can you please send the me the required changes

If you look in CGI.pm you'll see that the file upload code won't get
called if the request is GET, so POST2GET guarantees that it will fail
for CGI.pm.  Here's a snippet from the modified CGI.pm that I sent to
him and which it seems he never bothered to try out.

--
  # Process multipart postings, but only if the initializer is
  # not defined.

# debugging... --GWH--
my $tempEnvContentType = $ENV{'CONTENT_TYPE'};
print STDERR CGI.pm: \$ENV{'CONTENT_TYPE'}=[$tempEnvContentType]\n;
print STDERR CGI.pm: \$meth=[$meth]\n;
  if ($meth eq 'POST'
   defined($ENV{'CONTENT_TYPE'})
   $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data|
   !defined($initializer)
  ) {
  my($boundary) = $ENV{'CONTENT_TYPE'} =~ /boundary=\?([^\;,]+)\?/;
  $self-read_multipart($boundary,$content_length);
  last METHOD;
  } 
--

73,
Ged.





RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread Ged Haywood

Hi all,

On Fri, 7 Jun 2002, Valerio_Valdez Paolini wrote:

 
 On Thu, 6 Jun 2002, Jeff wrote:
 
  We can take the discussion off-line if the list feels it will be too OT.
 
 No, please :)

Yes, please.

73,
Ged.




Re: Cheap and unique

2002-04-30 Thread Ged Haywood

Hi there,

On Tue, 30 Apr 2002, David Jacobs wrote:

 I'm converting a few CGI scripts that used the PID as a cyclical unique 
 number (in concert with TIMESTAMP - so it was TIMESTAMP.PID).
 
 Our goal is to find a replacement function that is extremely cheap 
 (cheaper than say, random(100)) and will never repeat. Any ideas? 

Have a look at Time::HiRes?

73,
Ged.





Re: Apache2/mod_perl2 an order of magnitude more powerful?

2002-04-24 Thread Ged Haywood

Hi there,

On Wed, 24 Apr 2002, Nigel Hamilton wrote:

   250 http server threads running concurrently would be an order of
 magnitude more powerful than my current set up.
 
   Have I got this right? or am I missing a big catch?

No and yes in that order.  Your computer won't be any more powerful,
no matter how many threads you run...

73,
Ged.




Re: [SOT] C/F77 Wrapper for Perl

2002-04-23 Thread Ged Haywood

Hi there,

On Tue, 23 Apr 2002, Vuillemot, Ward W wrote:

 Is it possible to write a simple C wrapper to the f77 library, and then link
 to Perl as a module?

Have a look at Inline.pm.

73,
Ged.




Re: libperl.so vs mod_perl.so

2002-04-11 Thread Ged Haywood

Hi there,

On Thu, 11 Apr 2002, Mike Loiterman wrote:

 -BEGIN PGP SIGNED MESSAGE-

There's really no need for all this... :)

 but there is no entry for LoadModule /libexec/apache/mod_perl.so

That's because mod_perl.so doesn't exist.

 There is a an entry for libperl.so and there is a file called
 libperl.so.

That's the one!

 How can I quickly and easily test if mod_perl is inded installed

Read the Guide some more...

http://perl.apache.org/guide

... and check the error_log.

73,
Ged.




Re: how to make apache server to understand the perl commands inhttpsd.conf

2002-04-11 Thread Ged Haywood

Hi there,

On Thu, 11 Apr 2002, Mrajesh wrote:

 So, to run both the codes, we included the commands like
 
 PerlSetvar  MasonCompRoot /usr/local/apache/htdocs
 PerlSetVar MasonDataDir /usr/local/apache/mason
 PerlModule HTML::Mason::ApacheHandler
 
 in httpsd.conf file.
 
 Now, when we are trying to start the HTTPS, it is giving the errors like
 
 Invalid command PerlSetVar either mis-spelled or server is not configured correctly

Are you sure you have a mod_perl server?  What do you get in the
error_log when you start it?

73,
Ged.




Re: how to configure perl with apache server

2002-04-10 Thread Ged Haywood

Hi there,

On Wed, 10 Apr 2002, rajesh wrote:

 We are facing problems in configuring perl with apache.

Please see the mod_perl Guide at http://perl.apache.org/guide, the
mod_perl cookbook (see http://modperlcookbook.org for details) and the
book we know here as the Eagle book which is in reality called
Writing Apache Modules with Perl and C, ISBN 1-56592-567-X.

Also see the file .../mod_perl-x.xx/SUPPORT for information about what
to tell this List when you have problems.

 We are getting errors like
 
 Invalid command PerlSetVar in httpsd.conf file.

You don't have mod_perl in your server.  mod_perl can either be
compiled in (in which case you can see it if you give the -l switch to
the Apache binary to see what it says is compiled in) or it may be
loaded after you start Apache (this is what we call DSO, in this case
you need at least to have mod_so.c compiled into the server.  Again
you will see this module with the -l switch.)  If mod_perl is not
compiled in you need to configure Apache to load the .so file, to do
that you need AddModule and LoadModule directives in the configuration
file.  It's all in the documentation but it takes time to read it all.
I urge you to do that.

73,
Ged.




Re: PATH-like module?

2002-04-09 Thread Ged Haywood

Hi there,

On Tue, 9 Apr 2002, Lyle Brooks wrote:

 Is there a module that provides a PATH-like capability for URLs?

ViLib does this (and truckloads of things you didn't ask for:), sorry
I don't have a URI handy but you'll probably find it at utac.net or
with a search engine.  Failing that contact me privately and I'll mail
you a copy of the tarball.

73,
Ged.





Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Ged Haywood

Hi Stas,

On Mon, 8 Apr 2002, Stas Bekman wrote:

 John Siracusa wrote:
  downside (see attached screenshot).
 
 the idea was to make certain messages more outstanding

Then print only the messages you want people to see.  In my view there
is far too much output from a typical build and install (of anything:).

Compilations should be SILENT unless something goes wrong.

73,
Ged.





[JOB WABTED] [OT]

2002-04-08 Thread Ged Haywood

Hi all,

Sorry this is somewhat off-topic.  A colleague who is seeking work
(preferably contract) has asked me to let people know.  His name is
Bill Horsman.  I've known him for several years, he's a good man.

Hope this is useful to someone.

73,
Ged.

--
Capabilities:

1.  Expert Java programmer, 4+ years experience (10 years IT contracting).

2.  Lots of Web Application exprience.  Servlets.  Java Server Pages.
Resin servlet engine.  Linux (web  system administration).  Good HTML
design, CSS.  SQL Databases (e.g. Ingres, DB2, Oracle).

3.  Technical Architect.  Object Oriented design.  Efficient re-use of
open source components.  Extreme Programming.  Refactoring.

4.  Lots of experience of complete project lifecycle.  Able to satisfy
high-level deadlines whilst remaining focused on development. 

5.  Novice Perl Programmer.  (Well, I said it was OT :)

6.  Willing to work on site, any location.

7.  CV at http://www.logicalcobwebs.com/billhorsman.cv.html
--





Re: Help Requested: Segfault 11 7 MONTHS after compilation on multipleservers all compiled the same running different code and different RedhatReleased all on the same day [BUG]

2002-04-08 Thread Ged Haywood

Hi there,

On Mon, 8 Apr 2002, Kevin A. McGrail wrote:

 help in regards to making a core file.

Check the debug section of the Guide:

http://perl.apache.org/guide

Also see the file .../mod_perl-x.xx/SUPPORT for advice on what
information should be posted with a reort such as yours.

73,
Ged.

PS: That's a VERY long subject line... :)




Re: sun4-solaris polluted installation

2002-04-07 Thread Ged Haywood

Hi there,

On Sat, 6 Apr 2002, Slava Bizyayev wrote:

 a lot of mess in common perl libraries. What of that could affect the
 installation?

All sorts of things, but I'm still puzzled.  To my mind you do not
yet have enough evidence to point to a particular part of the system.

If your production system were not using Perl in any way I would
suggest that you delete the entire Perl installation and rebuild it
from scratch with 5.6.1.  (Actually I prefer 5.7.2 but I hesitate to
suggest it for production use even though it seems fine to me. :)  If
it were my machine that is what I would do, production or not, because
you really need to be able to rely on your Perl installation and at
the moment evidently you cannot.  Of course there is a risk that
something would break, so you might prefer to rename the old Perl
installation rather than delete it.  You should of course make sure
that the same compiler which built Perl also built mod_perl, for
preference also using the same C libraries.

Have you tried to run Perl's own 'make test' suite?

73,
Ged.




Re: Ordering in %INC for PerlRestart

2002-04-07 Thread Ged Haywood

Hi there,

On Tue, 2 Apr 2002, [iso-8859-1] Sreeji K Das wrote:

 I use PerlFreshRestart on to reload my modules.
[snip]
 However, here my modules are getting loaded before the
 PerlRequire'd is loaded (since %INC is a hash).
 
 First, can some1 suggest a solution for this ?

I always stop (with SIGTERM) and start my servers rather than using
restart (SIGUSR1) as I find that there are fewer surprises.  I think
that Perrin will agree.  There are very few systems that can't cope
with a few seconds of downtime.

73,
Ged.





Re: sun4-solaris polluted installation

2002-04-06 Thread Ged Haywood

Hi there,

On Fri, 5 Apr 2002, Slava Bizyayev wrote:

 Nice try. Unfortunately, helpless...  Don't you see two instances of
 mod_perl in common perl libraries? That's just flowers...

Are you sure you understood my message?

I don't understand your reply but you seem to be a little frustrated.

Running two instances of a mod_perl Apache does not necessarily
require that you run the Apache nor mod_perl 'make install' twice
(although you may wish to compile different Apache and/or mod_perl
binaries).  You just have to create a second configuration and start a
second server.  You can for example compile a mod_perl Apache in your
home directory and run it without root permissions.  You don't need to
do anything at all to the system's Perl installation until you mean to
run the mod_perl Apache in production, listening to port 80.  In fact
it's probably better if you don't.

Did you get 'make test' to run ok before attempting 'make install'?

73,
Ged.






Re: mod_perl and open files limit

2002-04-06 Thread Ged Haywood

Hi there,

On Wed, 3 Apr 2002, Mike V. Andreev wrote:

 files limit problem.
 
 httpd.conf:
 KeepAlive On
 MaxKeepAliveRequests 100
 KeepAliveTimeout 15
 MinSpareServers 5
 MaxSpareServers 10
 StartServers 5
 MaxRequestsPerChild 0

MaxClients?

 What kind of diagnostics can be done to find out what causes the problem?

http://perl.apache.org/guide has a lot of useful pointers.

I'd suggest setting MaxRequestsPerChild to a low value (I generally
use something in the range of 50-100 but Perrin will tell you that's
*very* low... :) to avoid leak problems.

73,
Ged.




Re: mod_perl and open files limit

2002-04-06 Thread Ged Haywood

Hi again,

On Thu, 4 Apr 2002, Mike V. Andreev wrote:

 MaxRequestsPerChild 0 -- if I set this limit to 10 then the problem disappear
 but that way deprives project of mod_perl usage advantages

Not at all, for example 90 percent of your requests won't have to
reload Perl.  (Of course they won't all need to but the other ten
percent will reload it anyway unless you're using a light front
end... :).  But even I wouldn't usually use a value as low as 10.

Anyway, it looks like you're on the right track - probably a filehandle
not being closed or something.  Why not try using the Symbol::gensym
technique as shown in the Guide, this closes filehandles automatically
when they go out of scope.  It works very well for me.

73,
Ged.

PS: BTW it's modperlatperldotapachedotorg now




Re: sun4-solaris polluted installation

2002-04-05 Thread Ged Haywood

Hi there,

On Fri, 5 Apr 2002, Slava Bizyayev wrote:

 I have to (re)install mod_perl enabled Apache on prod server, which
 is polluted with the several previous unsuccessful attempts [snip]
 Actually, I need somebody very experienced with the sun4-solaris
 environment to assist me carefully on this slippery road...

It's not that difficult.  You can build another Apache with mod_perl
and run it on the same machine without having any effect at all on the
existing server, which can continue to run as normal.  All you have to
do is to configure the new server to listen to a port other than port
80 (to which presumably your production server is currently listening)
and you can play with your new server until you get it to do what it
needs to do.

The details are all in the Guide:

http://perl.apache.org/guide

and you might also want to have a look at the Eagle Book:

Writing Apache Modules with Perl and C, ISBN 1-56592-567-X

and/or the Cookbook

http://www.modperlcookbook.org

if you haven't already.

73,
Ged.

(PS: GY: OK?)




Re: Pipelinning Output APP Framework

2002-04-05 Thread Ged Haywood

Hi there,

On Fri, 5 Apr 2002 [EMAIL PROTECTED] wrote:

[snip,snip]
 My goal is to develop an open source chemical tracking system.
 The requirements are
 -web based
 -FAST

These two requirements are mutually exclusive.  If you can be a little
more specific about your requirements I can probably be more helpful.

73,
Ged.




Re: Astronomical Information [OT]

2002-04-03 Thread Ged Haywood

Hi there,

On 2 Apr 2002, simran wrote:

 I have (for weeks) been trying to find a Perl Module (preferablly
 one that works under mod_perl) that does various astronomical
 calculations - in particular i want to be able to work out the
 distance of a planet (in our solar system) on a given date.

If you need only approximate answers then you can assume that the
planets are all in the same plane, and use Kepler's laws (very simple
geometry) to calculate the positions based on a known set of initial
positions at a given date and time.  You could modify your inital
conditions occasionally to maintain reasonable accuracy.

Please contact me privately if you wish to pursue the idea, this is
way Off Topic for this list.

73,
Ged.




Re: make test fails on redhat

2002-04-03 Thread Ged Haywood

Hi there,

On Wed, 3 Apr 2002, Jie Gao wrote:

 All tests successful, 6 tests skipped.

Are you sure about your subject line?

 Files=34, Tests=382,  9 wallclock secs ( 4.47 cusr +  0.44 csys =  4.91 CPU)
 kill `cat t/logs/httpd.pid`
 cat: t/logs/httpd.pid: No such file or directory

There may be permissions problems in the directory tree, did you
'make' and 'make test' as root?  I find it's best not to do that.

73,
Ged.




Re: PDF generation

2002-04-03 Thread Ged Haywood

Hi there,

On Wed, 3 Apr 2002, Mike808 wrote:

 Don't know if you can run a JServ+mod_perl or JPerl hybrid, though.

You can certainly run Java on one server and mod_perl on another, I do
this routinely in production.  (With mod_perl on the FRONT end... :)

73,
Ged.




Re: AddModule mod_perl.c

2002-03-30 Thread Ged Haywood

Hi all,

On Sat, 30 Mar 2002, Per Einar Ellefsen wrote:

 It just doesn't work w/ mod_perl.  I am stumped and am
 probably going to give up shortly - thank anyways.
 
 That's because you haven't compiled it statically. Try starting with a 
 clean build: only mod_perl, build it statically, add only minimal extra 
 configuration, and test that.

Which is what I told him nearly two weeks ago.

I am probably going to give up shortly too.

73,
Ged.




Re: odd ld error

2002-03-28 Thread Ged Haywood

Hi there,

On Thu, 28 Mar 2002, Kreimendahl, Chad J wrote:

 
 all of this is on Solaris 8 (Netra T1)... any help would be much appreciated
 
 [error] install_driver(Oracle) failed: Can't load
 '/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/Oracle.so
[snip]
 Permission denied [snip]

Looks like there's no permission to read the file.

73,
Ged.

PS: You can remove that old_mod_perl address now




Re: AddModule mod_perl.c

2002-03-27 Thread Ged Haywood

Hi Perrin,

On Wed, 27 Mar 2002, Perrin Harkins wrote:

 Stas Bekman wrote:
  Arh, I mean to use the hints how to get the core dump backtrace.
 
 Hang on, this guy is just trying to do an install.  He shouldn't need
 to troubleshoot at that low a level.

Quite right Perrin, but I'm afraid we're having a little trouble
communicating with Mr. Kolvereid.  Here is one of several messages
which I sent to him last week.

73,
Ged.
--
From [EMAIL PROTECTED] Wed Mar 27 19:51:14 2002
Date: Mon, 18 Mar 2002 00:45:49 + (GMT)
From: Ged Haywood [EMAIL PROTECTED]
To: John Kolvereid [EMAIL PROTECTED]
Cc: mod_perl Mailing List [EMAIL PROTECTED]
Subject: Re: Trouble w/ LWP during mod_perl install

Hi there,

On Sun, 17 Mar 2002, John Kolvereid wrote:

   In order to try and install mod_perl-1.26 in RedHat
 6.2 w/ Apache 1.3.22 I, as ROOT, run the following
 in my /home/ssl/mod_perl-1.26:
  perl Makefile.PL \
[snip]
[snip]
 Then I try running
  /usr/local/apache/bin/apachectl startssl

I think you're getting confused with too many Apache modules.  Try to
build without ssl to begin with, so that you can check that what
you're doing for mod_perl is OK.

Please read the installation section of the Guide and follow the
instructions carefully.  You will see that it suggests that you do the
'make' and 'make test' steps NOT as root, then 'make install' as root.
It's not unknown for things to get a little screwy if you try to build
as root, and especially if sometimes you're logged in as root and
sometimes you're not.  It might be best if you delete the source trees
in /home/ssl/mod_perl-1.26 and /home/ssl/apache_1.3.22 and start
again, or start again in a new directory, say something like this:

$ cd /home/fred/src/apache_1.3.22/
$ tar xzvf .../apache_1.3.22.tar.gz
$ cd /home/fred/src/mod_perl-1.26/
$ tar xzvf .../mod_perl-1.26.tar.gz
$ cp makepl_args.mod_perl .
$ perl Makefile.PL
$ make
$ su
# make install
# ls -l /usr/local/sbin/httpd
... (Check here that the date and time of the binary look sensible:)
# /usr/local/sbin/httpd -f /usr/local/apache/conf/httpd.conf
# tail /usr/local/apache/logs/error_log
... (Check that Apache started and that it says it's a mod_perl Apache:)

The file makepl_args.mod_perl is below, and there is a sample in the
mod_perl/eg directory too.  You might want to adjust these a little to
suit your needs.  You can also put the file in the home directory of
the user who does 'make' but then you need to prefix the filename with
a dot, i.e. .makepl_args.mod_perl.

   Invalid command 'LoadModule', perhaps mis-spelled or
   defined by a module not included in the server
 configuration
   could not locate Module SSL (line 206 httpd.conf)
 
 My only recourse is then to rebuild Apache w/o mod_perl.

This error has nothing to do with mod_perl.  You have a 'loadmodule'
directive in httpd.conf but you don't have mod_so.c compiled into the
Apache which you are trying to start using that httpd.conf - as you
will see if you will get the output of 'httpd -l' as I asked you to do
in my previous message.  Try to understand what you're doing, it's not
really that complicated if you are methodical.  You are going to build
a binary called 'httpd' and you can run it without 'apachectl'.  This
is a script that does some other stuff too.  You can try for example
'apachectl configtest'.  'apachectl' is created by 'make install'.
You need to check that it is starting the right Apache, i.e. the one
you just built!  Be careful, there may be several of them (both httpd
and apachectl) kicking around if you have been trying lots of builds
in desperation...

 I am having a great deal of difficulty installing mod_perl.  I am
 not sure it is worth it.

It's worth it but you will have to do quite a bit of reading and it
won't all happen overnight.  Your difficulties at the moment do not
seem to stem primarily from mod_perl itself.

   I have been reading installation excerpts frm various sources

...and then you have to do what it says in the things you've read. :)

 w/ Perl and C', and the internet CPAN sites.  My build in

?  Your message seems to have been truncated here.

73,
Ged.

8--
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.12/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/
APACI_ARGS=--sysconfdir=/usr/local/apache/conf
APACI_ARGS=--runtimedir=/usr/local/apache/run
APACI_ARGS=--logfiledir=/usr/local/apache/logs
8--





Re: Problems installing on Solaris 8

2002-03-25 Thread Ged Haywood

Hi there,

On 23 Mar 2002, Wayne Pascoe wrote:

 Angel R. Rivera [EMAIL PROTECTED] writes:
 
  Sorry to come in late into this.  I had the same problems and spent a
  while getting it all to build right.  I am running on an Ultra class
  [snip]
  I built it DSO.
 
 I was hoping to get away with it compiled in as static. I've heard
 fearful tales of memory leaks and other problems when using it as a
 DSO. Are these still present ? 


Argh.  :)

73,
Ged.
--
From [EMAIL PROTECTED] Mon Mar 25 10:42:35 2002
Date: Sat, 23 Mar 2002 08:24:16 + (GMT)
From: Ged Haywood [EMAIL PROTECTED]
To: Wayne Pascoe [EMAIL PROTECTED]
Cc: mod_perl Mailing List [EMAIL PROTECTED]
Subject: Re: Problems installing on Solaris 8

Hi there,

On 23 Mar 2002, Wayne Pascoe wrote:

 Why does mod_perl need ssl and crypto ? Just curious...

It doesn't.  Have you tried sompiling static instead of DSO?  There
have been DSO problems on Solaris (and elsewhere :) in the past but I
thought they were mostly put to bed now.

73,
Ged.






Re: mod_perl on Mac OSX?

2002-03-25 Thread Ged Haywood

On Sun, 24 Mar 2002 [EMAIL PROTECTED] wrote:

 Can anyone help point me in the right direction for installing mod_perl for 
 Apache on Mac OSX?

Try searching the archives, a list of them appears on the mod_perl
home page at http://perl.apache.org.

I found this one...

[EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/fermkhiwhand/[EMAIL PROTECTED]

But be preapared for at least some pain.  ( I've never done it :).

73,
Ged.




Re: [OT] Replacing reverse squid with mod_proxy

2002-03-25 Thread Ged Haywood

Hi there,

On Mon, 25 Mar 2002, Hans Juergen von Lengerke wrote:

 I am looking into replacing the squid with apache+mod_proxy.

I don't know if it will do what you need, but you might want to have
a look at mod_accel.  If this URI is broken mail dapiatmaildotru
for the information.

http://dapi.chaz.ru/articles/mod_accel.xml?lang=en

73,
Ged.





Re: AddModule mod_perl.c

2002-03-24 Thread Ged Haywood

Hi there,

On Sat, 23 Mar 2002, John Kolvereid wrote:

 Which Guide?  Please advise.

http://perl.apache.org/guide


Did you read any of the other documentation?  Please let me know why
you did not know about the Guide, we have obviously failed you.

73,
Ged.




Re: Be carefull with apache 1.3.24

2002-03-24 Thread Ged Haywood

Hi Pedro,

On Sun, 24 Mar 2002, Pedro Melo Cunha wrote:

[snip,snip]
 Looking at the change log, they mention a bug that multiple set-cookie's
 will fail (only the last one will be sent to the client, the proxy will
 eat the others). And it was true... The problem is that 1.3.24 final
 also has that bug: only the last set-cookie will reach your browser.
 
 This was a show-stopper for my application. So I sat down, read the
 proxy code, and made a patch to solve the bug. [snip]
 
 Anyway, I attached here. Maybe someone here can push it into apache for
 the next release, and in the meantime you can use it, if you want.
 
 I also attach a cgi that set's two cookies, to demonstrate the problem.


Pedro, thanks a real bunch!  You just saved me a load of work!

If we ever meet, I'll buy you a beer, I promise!

73,
Ged.




Re: Problems installing on Solaris 8

2002-03-23 Thread Ged Haywood

Hi there,

On 23 Mar 2002, Wayne Pascoe wrote:

 Why does mod_perl need ssl and crypto ? Just curious...

It doesn't.  Have you tried sompiling static instead of DSO?  There
have been DSO problems on Solaris (and elsewhere :) in the past but I
thought they were mostly put to bed now.

73,
Ged.





Re: Apache and Perl with Virtual Host [OT]

2002-03-23 Thread Ged Haywood

Hi again,

Oh, rats, I'm sorry, I shouldn't have sent that.  I'm not sure that
it's your 'Options' settings at all.  Have you got the right execute
permisions on the directories/files that you're trying to get Apache
to search and/or execute?  Have you got anything in the error_log?

By way of further apology, if you'd care to reply to me privately
we'll get it running for you off-list as it's not a mod_perl issue.

73,
Ged.

--

On Sat, 23 Mar 2002, Ged Haywood wrote:

 Hi there,
 
 On Fri, 22 Mar 2002, Matt Phelps wrote:
 
 [snip,snip]
  Okay, this is still giving me problems. Here is my config. I've
  tried several things and still nothing. For some reason I can't get
  cgi scripts to run under any virtual webs, but the default web.
 
 What's a 'web'?  I think you mean 'host'.  (It helps if we all speak
 the same language, especially if we are using a search engine... :)
 
  I do have mod_perl installed.
 
 Oh, all right then... :)
 
  I'm sure it's got to be something so simple.
 
 I think it's called 'reading the documentation'... :)
 
  VirtualHost 192.168.1.106
  DocumentRoot /var/www/html
  ServerName www2.zeetec.net
  Options +ExecCGI
  Alias /host/ /webhome/host/
  Alias /cgi-bin/ /var/www/cgi-bin/
  ScriptAlias /cgi-bin/ /var/www/cgi-bin
  Location /perl
  SetHandler perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On   
  Options +ExecCGI
  /Location
  Directory /var/www/cgi-bin
  AllowOverride None
  Options None   --- This removes 'ExecCGI' from your Options
  Order allow,deny
  Allow from all
  /Directory
  /VirtualHost
 
 Check the Apache docs about the behaviour of the 'Options' directive.
 
 73,
 Ged.
 
 




Re: Problems installing on Solaris 8

2002-03-23 Thread Ged Haywood

Hi there,

On 23 Mar 2002, Wayne Pascoe wrote:

 Ged Haywood [EMAIL PROTECTED] writes:
 
  Have you tried sompiling static instead of DSO?
 
 This is a static build.

Sorry, I've deleted the original message.  Why did I think it wasn't?
I must be having a very bad day today.

 if I compile Apache with mod_perl, then mod_auth_db, mod_proxy and
 mod_negotiation all stop working. If I compile Apache without
 mod_perl then they continue to work just fine.

Something very wrong there.  Do you have squeaky clean source trees?
I'd be tempted to erase the lot and start again.  What's the compiler?
Post your httpd.conf?  Have you built other (older) versions of Apache
and mod_perl on the same OS?

73,
Ged.




Re: Problems installing on Solaris 8

2002-03-23 Thread Ged Haywood

Hi all,

 Wayne Pascoe [EMAIL PROTECTED] writes:
  [8:37am]# httpd -l
  Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
  suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec

I didn't think I'd been dreaming.

 As a matter of principle, I tend not to mix static and dynamic.

Me too.

 where I'm unsure, I go all static and build distinct binaries.

Me too.  But if you go all dynamic it's quicker to pull modules out,
and you can change the order they're loaded which is important in some
cases.  Pity my Solaris box isn't with me (1,000 miles away) or I'd
ask you to send me your config. and try to repeat your problem.

Come to think of it I did ask, anyway...

On 23 Mar 2002, Dave Hodgkinson wrote:
 Wayne Pascoe [EMAIL PROTECTED] writes:
  Dave Hodgkinson [EMAIL PROTECTED] writes:
   Ged Haywood [EMAIL PROTECTED] writes:
Post your httpd.conf?

73,
Ged.




Re: AddModule mod_perl.c

2002-03-23 Thread Ged Haywood

Hi there,

On Sat, 23 Mar 2002, John Kolvereid wrote:

I am trying to install/configure mod_perl.  I think
 it is installed but not quite sure.

It's in the Guide. (How do I know if mod_perl is installed?)

 According to the mod_perl Reference Guide the line
  AddModule mod_perl.c
 should be added to my httpd.conf, otherwise mod_perl
 is not activated.

I think you'd better have a more careful look at that Guide.  You only
need that in your config if you have mod_perl built as a DSO (Dynamic
Shared Object) which means that Apache starts without trhe mod_perl
module and then loads it later when it reads the line

  AddModule mod_perl.c

in httpd.conf.

 when I include the line and try
 to load any page into my browser I get the msg:
   The document contained no data

Something isn't working right.  :)  Could be all sorts of things.
Read the file mod_perl/SUPPORT to begin with.  Post the information
requested in there.

73,
Ged.




Re: Apache and Perl with Virtual Host

2002-03-22 Thread Ged Haywood

Hi there,

On Fri, 22 Mar 2002, Matt Phelps wrote:

[snip,snip]
 Okay, this is still giving me problems. Here is my config. I've
 tried several things and still nothing. For some reason I can't get
 cgi scripts to run under any virtual webs, but the default web.

What's a 'web'?  I think you mean 'host'.  (It helps if we all speak
the same language, especially if we are using a search engine... :)

 I do have mod_perl installed.

Oh, all right then... :)

 I'm sure it's got to be something so simple.

I think it's called 'reading the documentation'... :)

 VirtualHost 192.168.1.106
 DocumentRoot /var/www/html
 ServerName www2.zeetec.net
 Options +ExecCGI
 Alias /host/ /webhome/host/
 Alias /cgi-bin/ /var/www/cgi-bin/
 ScriptAlias /cgi-bin/ /var/www/cgi-bin
 Location /perl
 SetHandler perl-script
 PerlHandler Apache::Registry
 PerlSendHeader On   
 Options +ExecCGI
 /Location
 Directory /var/www/cgi-bin
 AllowOverride None
 Options None   --- This removes 'ExecCGI' from your Options
 Order allow,deny
 Allow from all
 /Directory
 /VirtualHost

Check the Apache docs about the behaviour of the 'Options' directive.

73,
Ged.




RE: 0 being appended to non mod_perl scripts.

2002-03-21 Thread Ged Haywood

Hi there,

On Thu, 21 Mar 2002, Mike Wille wrote:

[snip,snip]
 I checked to see if mod_perl was handling the scripts that sent the '0' but
 perl is indeed handling them and not httpd.

I'm not sure I understand what you're saying here.

 The server is running Apache 1.3.20.  I'm not sure how to find the version
 of mod_perl...

Does this mean you'vve *never* looked in the error_log???

73,
Ged.




Re: Subroutines taking time to return..

2002-03-21 Thread Ged Haywood

Hi there,

On Thu, 21 Mar 2002, Perrin Harkins wrote:

 When you call the script, do you get segfaults in the error log?

Coming into this thread a little late, so sorry if you already said,
what version of Perl are you using?  I had problems with Devel::Dprof
and dprofpp on 5.7.1 which were fixed by upgrading to 5.7.2 although
Dprof itself didn't change at all.

73,
Ged.




Re: Subroutines taking time to return..

2002-03-21 Thread Ged Haywood

Hi again,

On Thu, 21 Mar 2002, David Brown wrote:

 OK, I have it working now.

Guess I shold read ALL my mail before replying to any of it...

73,
Ged.




Re: Off topic question a little worried

2002-03-21 Thread Ged Haywood

Hi there,

On Thu, 21 Mar 2002, John Michael wrote:

 Any idea as to how it got on my server.

Nope.  There are a thousand ways it could have been done if your
server is not carefully secured.  Do waht Perrin said - take it
offline, it can't be trusted - and read the CERT stuff that you've
been pointed to by another useful reply.

The server probably has a dozen back-doors in it now so it would be
irresponsible to leave it on line.  Unless you *really* know what you
are doing from a security point of view (and without meaning to be
offensive it sounds vey much like you don't) you should wipe the discs
and reinstall the OS and server(s) from scratch.

Then do some serious reading about securing your server.  Don't run
any daemons you don't have to run, especially ftp and sendmail, if you
aren't sure of them.

73,
Ged.




Re: modperl and SQL db select

2002-03-21 Thread Ged Haywood

Hi all,

On Thu, 21 Mar 2002, Perrin Harkins wrote:

 
 Please, please, please KILL THIS THREAD!

I second that.  It's all been done before guys.

73,
Ged.




Re: Subroutines taking time to return..

2002-03-20 Thread Ged Haywood

Hi there,

On Wed, 20 Mar 2002, David Brown wrote:

 I've been profiling my MySQL driven Mod_Perl website
[snip]
 (using Time::HiRes)
[snip]
 I expected all the complicated DB access stuff to make up the time

MySQL is pretty quick.  :)

 instead it seems to be consuming 0.005 in returning from the subroutine to
 the main script.
 
 What's that all about ?
[snip]
 
 It SEEMS the subroutine is taking an inordinate amount of time returning to
 the main procedure.. why would this be ?

What else is the machine doing?  Is it reapeatable (i.e. not just OS
timeslices or something)?  Post the code?

73,
Ged.




RE: CGI.pm and POST requests

2002-03-20 Thread Ged Haywood

Hi there,

On Wed, 20 Mar 2002, Vuillemot, Ward W wrote:

  On Tue, 19 Mar 2002 14:06:15 -0800 Vuillemot, Ward W wrote:
   why would it work for cgi and not mod_perl?
  
  From: Ged Haywood [Replying privately because of large attachment]
  Does the attached version of CGI.pm help?  (I have added a few 'print'
  statements, they are flagged by --GWH-- for you to find them easily.)
  
  Run it and then look in the error_log...
 
 I have the latest version of CGI.  But I am not using it to read in
 sent data anymore.  Since my scripts that use CGI versus Apache::Request
 are identical except one is run in cgi space versus mod_perl space, one
 would expect everything to be hunky dory.

My point was not that you don't have the latest bersion of CGI.pm.
I sent you CGI.pm with some debugging information which will allow
you easily to see why things don't do what you expect.

 It would seem my httpd.conf file is off.

No, I don't think that's the problem.  Like I said, if you run your
scripts with the CGI.pm that I sent you may see something interesting.
(I don't want to do the whole thing for you...:)

73,
Ged.







Re: Trouble w/ LWP during mod_perl install

2002-03-18 Thread Ged Haywood

Hi John,

On Sun, 17 Mar 2002, John Kolvereid wrote:

   Thanks for sticking in there w/ me.

:)

  There are a great many options and the number
 of combinations is awesome.

True, but there's no point worrying about the number of combinations,
you need to worry about setting things up the way you want them.

 Only 1 is correct,

It's not really like that.  (You just have to decide how you want
things to be set up...:)

 I ran the build again for the mod_perl and apache using
 APACHE_PREFIX and APACHE_SRC and SSL_BASE.  When finished I tried
 the apachectl startssl and got the same LoadModule error as before.

I really think you should forget ssl for the moment until you get a
grip on compiling and configuring Apache and mod_perl.  And PLEASE
don't run apachectl until you know what it's going to do.  You can
start Apache without using a script.

 I tried the httpd -l and mod_so.c WAS present.  To be certain I did
 a 'which httpd'.  It was using the one in /usr/sbin but that's not
 new, it is dated Oct 19 2000.

That's not the one you're running.  'which' tells you what will be
used if you call the binary directly without giving the full path to
the binary, but if you try to run it with 'apachectl' then you could
be using a different one.  Why not just delete it, or rename it if you
want to keep it?  Keep a notebook to record the changes you make so
that you don't forget what you've changed.  In my last message I asked
you to run the binary by calling it with the full path name.  Don't
rely on the path in your environment by running a binary without the
full path name at this stage, you'll only confuse yourself even more.

 Moreover, the httpd.conf in the conf directory is dated Mar 4.

When you do 'make install' the scripts won't overwrite your existing
configuration.  If you delete, rename or move the conf directory and
then re-install you'll get a new httpd.conf.

 There is one dated Mar 17 (today) named httpd.conf.default but it
 does not include any reference to mod_perl.

If you compile mod_perl in statically it doesn't have to have a
loadmodule directive for mod_perl - in fact it shouldn't have one.
You need a completely new httpd.conf which is installed at the time
you build Apache and mod_perl.  But do please read it when you've
finally made it, because there are as you have said lots of things
you need to think about.

 What should I try next.

All the things I've said in my last three messages.  They *will* work
if you clean everything up like I said, RedHat 6.2 really has no
problems with Apache and mod_perl.

73,
Ged.




RE: loss of shared memory in parent httpd

2002-03-17 Thread Ged Haywood

Hi all,

On Sat, 16 Mar 2002, Bill Marrs wrote:

 leads ones to wonder if some of our assumptions or tools used to 
 monitor memory are inaccurate or we're misinterpreting them.

Well 'top' on Linux is rubbish for sure.

73,
Ged.




Re: Trouble w/ LWP during mod_perl install

2002-03-17 Thread Ged Haywood

Hi there,

On Sun, 17 Mar 2002, John Kolvereid wrote:

 I got your name from the mod_perl mailing list,

Please post to the list, not to an individual member, unless you are
replying to a message from that member on the list - in which case you
should normally cc the list.  (You will find more help about this kind
of thing in http://perl.apache.org/email-etiquette and there are some
links in there to other documents you should also read... :)

 I am trying to install mod_perl-1.26 on Linux RedHat 6.2 w/
 Apache-1.3.22.  I am using the following build file:
   perl Makefile.PL \
   APACHE_PREFIX=/usr/local/apache \
   APACHE_SRC=/home/ssl/apache_1.3.22 \
   DO_HTTPD=1 \
   USE_APACI=1 \
   EVERYTHING=1
 
 I get a lot of messages,

That's normal.  You haven't said where you have put the mod_perl
source, can I assume that it is /home/ssl/mod_perl-1.26?

 then I run 'make', and 'make test'.
 Problem is that make test complains that it cannot find LWP.

It isn't absolutely necessary but it's a good idea to get 'make test'
to run successfully, which needs LWP.

 I downloaded and installed (I think) libwww-perl-5.64.

How did you do that?  It's probably easiest to use CPAN.pm:

perl -MCPAN -eshell

 Unfortunately, it didn't seem to resolve my LWP problem.  When I do
 a 'make install' nothing seems to change.

H.  You aren't helping me very much there.  Are you following all
the instructions carefully?  What happens?

'make install' doesn't rely on LWP.  You probably need to be root to
'make install'.  Do you think you have successfully compiled a binary
after the 'make' step?  It will be called 'httpd'.  Check the date and
time of the binary to make sure it's the one you've built and not just
one that was lying around in there from an old installation.  Can you
run it with 'httpd -l' and post the result?

73,
Ged.





Re: Trouble w/ LWP during mod_perl install

2002-03-17 Thread Ged Haywood

Hi there,

On Sun, 17 Mar 2002, John Kolvereid wrote:

   In order to try and install mod_perl-1.26 in RedHat
 6.2 w/ Apache 1.3.22 I, as ROOT, run the following
 in my /home/ssl/mod_perl-1.26:
  perl Makefile.PL \
[snip]
[snip]
 Then I try running
  /usr/local/apache/bin/apachectl startssl

I think you're getting confused with too many Apache modules.  Try to
build without ssl to begin with, so that you can check that what
you're doing for mod_perl is OK.

Please read the installation section of the Guide and follow the
instructions carefully.  You will see that it suggests that you do the
'make' and 'make test' steps NOT as root, then 'make install' as root.
It's not unknown for things to get a little screwy if you try to build
as root, and especially if sometimes you're logged in as root and
sometimes you're not.  It might be best if you delete the source trees
in /home/ssl/mod_perl-1.26 and /home/ssl/apache_1.3.22 and start
again, or start again in a new directory, say something like this:

$ cd /home/fred/src/apache_1.3.22/
$ tar xzvf .../apache_1.3.22.tar.gz
$ cd /home/fred/src/mod_perl-1.26/
$ tar xzvf .../mod_perl-1.26.tar.gz
$ cp makepl_args.mod_perl .
$ perl Makefile.PL
$ make
$ su
# make install
# ls -l /usr/local/sbin/httpd
... (Check here that the date and time of the binary look sensible:)
# /usr/local/sbin/httpd -f /usr/local/apache/conf/httpd.conf
# tail /usr/local/apache/logs/error_log
... (Check that Apache started and that it says it's a mod_perl Apache:)

The file makepl_args.mod_perl is below, and there is a sample in the
mod_perl/eg directory too.  You might want to adjust these a little to
suit your needs.  You can also put the file in the home directory of
the user who does 'make' but then you need to prefix the filename with
a dot, i.e. .makepl_args.mod_perl.

   Invalid command 'LoadModule', perhaps mis-spelled or
   defined by a module not included in the server
 configuration
   could not locate Module SSL (line 206 httpd.conf)
 
 My only recourse is then to rebuild Apache w/o mod_perl.

This error has nothing to do with mod_perl.  You have a 'loadmodule'
directive in httpd.conf but you don't have mod_so.c compiled into the
Apache which you are trying to start using that httpd.conf - as you
will see if you will get the output of 'httpd -l' as I asked you to do
in my previous message.  Try to understand what you're doing, it's not
really that complicated if you are methodical.  You are going to build
a binary called 'httpd' and you can run it without 'apachectl'.  This
is a script that does some other stuff too.  You can try for example
'apachectl configtest'.  'apachectl' is created by 'make install'.
You need to check that it is starting the right Apache, i.e. the one
you just built!  Be careful, there may be several of them (both httpd
and apachectl) kicking around if you have been trying lots of builds
in desperation...

 I am having a great deal of difficulty installing mod_perl.  I am
 not sure it is worth it.

It's worth it but you will have to do quite a bit of reading and it
won't all happen overnight.  Your difficulties at the moment do not
seem to stem primarily from mod_perl itself.

   I have been reading installation excerpts frm various sources

...and then you have to do what it says in the things you've read. :)

 w/ Perl and C', and the internet CPAN sites.  My build in

?  Your message seems to have been truncated here.

73,
Ged.

8--
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.12/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/
APACI_ARGS=--sysconfdir=/usr/local/apache/conf
APACI_ARGS=--runtimedir=/usr/local/apache/run
APACI_ARGS=--logfiledir=/usr/local/apache/logs
8--




Re: problem in recompiling

2002-03-15 Thread Ged Haywood

Hi there,

On Thu, 14 Mar 2002, Parag R Naik wrote:

 I am using ActivePerl 5.6 . I had executed the Makefile.PL with Active 
 Perl hence the Makefile created contain the activeperl  entry ..

I don't know anything about ActivePerl.  I think that its use might
be the cause of your problem.  Can you perhaps install Perl from the
source tarball at www.perl.com/CPAN/src/stable.tar.gz ?

Then you should recompile Apache and mod_perl following the instructions
supplied with the packages.

Please keep your replies on the list, that way everyone can see that
this issue is being investigated.

73,
Ged.




Re: [ANNOUNCE] The New mod_perl logo - results now in...

2002-03-15 Thread Ged Haywood

Hi there,

On Fri, 15 Mar 2002, David Ranney wrote:

 I really like the new logo, and in fact I voted for it. However, I just
 realized that the logo uses modperl, whereas mod_perl's name is
 mod_perl, with the underscore. Does anyone else see this as a problem?
 I've always been annoyed at how often the spelling gets modified, and it
 seems that the logo as it is now would add to the confusion. Am I just
 picking nits?

You are quite right.  It's definitely not picking nits, it's important.

73,
Ged.




Re: problem in recompiling

2002-03-14 Thread Ged Haywood

Hi there,

On Thu, 14 Mar 2002, Parag R Naik wrote:

 Hi all,
 I am having a problem compiling mod_perl 1.26 src with apache 1.3.22 src.
 The problem on running make occur at the following command 
 
 gcc -c -I../.. -I/usr/local/ActivePerl-5.6/lib/5.6.1/i686-linux-thread-multi/COR

ActivePerl ?  I don't understand.  Tell me all about that.

73,
Ged.




Re: Tie hashes in DBIx::Recordset [OT]

2002-03-13 Thread Ged Haywood

Hi there,

On Wed, 13 Mar 2002, Marcus Claesson wrote:

 How do I succesfully preserve the column order (''$fields'=
 $joined_col') in my array-of-hashes generated using DBIx::Recordset?

Check out a Perl tutorial or the Camel book.  Perl's hashes do their own
thing with ordering, so unless you do something like (sort keys %hash)
you will get what you get.  Arrays can preserve sequences but involve
you in more coding much of the time.

73,
Ged.




Re: Blank Pages ( Revisited ) [Semi-OT]

2002-03-13 Thread Ged Haywood

Hi there,

On Wed, 13 Mar 2002 [EMAIL PROTECTED] wrote:

 However, when I do a random query I get some blank pages. I traced this to 
 the DBI Log using the DBH-Trace(2, /tmp/DBI.log). I found that sometimes 
 the execute() returns 0E0. Does anybody knows why?? 

It probably means zero multiplied by ten to the power zero, or to put
it another way, zero.

73,
Ged.





Re: query

2002-03-13 Thread Ged Haywood

Hi there,

On Wed, 13 Mar 2002, Parag R Naik wrote:

 We have installed perl 5.6

Make sure you get 5.6.1 not 5.6.0 which is buggy.

73,
Ged.




RE: Newbie install problems

2002-03-11 Thread Ged Haywood

Hi there,

On Mon, 11 Mar 2002, Nicolai Schlenzig (DXD) wrote:

 After updating my FreeBSD 4.5-STABLE I got installed perl 5.6.0 on
 top of my 5.00503 and it was all dandy... until I updated a CPAN
 module which wanted to install 5.6.1 on top again.

Why not set the CPAN configuration file so that it asks you whether
or not to update your files?

73,
Ged.




Re: where should the handler sript be kept

2002-03-11 Thread Ged Haywood

Hi there,

On Mon, 11 Mar 2002, Rizwan Majeed wrote:

 I am trying to invoke a handler script. I have set the location tag
 in httpd.conf I dont know where to place the script so that Apachi
 picks it up at run-time.

Have a look in the Guide:

http://perl.apache.org/guide

and the Eagle Book:

Writing Apache Modules with Perl and C, ISBN 1-56592-567-X

73,
Ged.




Re: SSL Installation Questions - Help

2002-03-10 Thread Ged Haywood

Hi there,

On Sat, 9 Mar 2002, Kirk Rogers wrote:

 I've acquired:
 mod_perl-1.26.tar.gz
 openssl-0.9.6c.tar.gz
 apache_1.3.22.tar.gz
 apache_1.3.22+ssl_1.47.tar.gz

I use mod_ssl with no problems, you could try that.

73,
Ged.




RE: Simple configuration question

2002-03-09 Thread Ged Haywood

Hi again,

On Fri, 8 Mar 2002, Kirk Rogers wrote:

 if I add APACHE_PREFIX=/usr/local/apache_ssl it shouldn't even touch anything
 I have in my original installation at /usr/local/apache.  Is this correct?
 
 Then I can slowly migrate my configuration file over to the new installation
 directories?

Yes, and yes.

This is how you would for example set up the light/heavy server system
where you have two copies of Apache running at the same time: a
non-modperl server listening on port 80 serves requests for static
pages itself, while passing requests for dynamic pages to a modperl
server listening on a different port.  It's in the Guide:
http://perl.apache.org/guide.

Don't try to run both Apaches at the same time on the same socket!

73,
Ged.




Re: About Apache::DBI

2002-03-09 Thread Ged Haywood

On Sat, 9 Mar 2002, Axel Andersson wrote:

 Okay, so I read up on Apache::DBI, but I still have a question or two.
 
 Specifically, am I supposed to keep my use DBI, DBI-connect(), and
 everything DBI related and not change a single thing in my source

What did you read?  Here are the first six lines from 'perldoc Apache::DBI.pm':

   Apache::DBI - Initiate a persistent database connection

# Configuration in httpd.conf or startup.pl:

PerlModule Apache::DBI  # this comes before all other modules using DBI

   Do NOT change anything in your scripts. The usage of this
   module is absolutely transparent !

73,
Ged.




Re: Hi........

2002-03-09 Thread Ged Haywood

Hi all,

On Sat, 9 Mar 2002, Mark Fowler wrote:

 On Sat, 9 Mar 2002, Balaji_Mahalingam wrote:
 
  Can any one send me the installing and configuring
  details of mod_perl-1.26
 
 There's installation instructions in the Guide:
http://perl.apache.org/guide/install.html

Not to mention in the tarball itself...

$ ls -l ~/mod_perl-1.25
total 552
drwxr-xr-x2 ged  ged  4096 Apr 24  2001 Apache
-rw-r--r--1 ged  ged 10894 Dec 22  1998 CREDITS
-rw-r--r--1 ged  ged133135 Jan 30  2001 Changes
drwxr-xr-x2 ged  ged  4096 Apr 24  2001 Connection
drwxr-xr-x2 ged  ged  4096 Apr 24  2001 Constants
drwxr-xr-x2 ged  ged  4096 Apr 24  2001 File
-rw-r--r--1 ged  ged 10776 Apr  3  2000 INSTALL
-rw-r--r--1 ged  ged 10332 Jan 26  2000 INSTALL.apaci
-rw-r--r--1 ged  ged  1658 Jul 10  2000 INSTALL.raven
-rw-r--r--1 ged  ged   456 Oct  1  1999 INSTALL.simple
-rw-r--r--1 ged  ged   681 Oct  1  1998 INSTALL.simple.mod_ssl
-rw-r--r--1 ged  ged   713 May 12  1998 INSTALL.simple.ssl
-rw-r--r--1 ged  ged   632 May 15  1998 INSTALL.simple.stronghold
-rw-r--r--1 ged  ged  4300 Dec 31  2000 INSTALL.win32
...
...

73,
Ged.




Re: segfaulting upon request

2002-03-08 Thread Ged Haywood

Hi there,

On Thu, 7 Mar 2002, Steev Hise wrote:

 On Thu, 7 Mar 2002, Ged Haywood wrote:
 
 - on redhat 7.0 linux i686, kernel 2.2.19-7.0.1smp
 ---
 - perl -V
 - Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
 -   Platform:
 ---
 - osname=linux, osvers=2.2.16-22smp, archname=i686-linux
 ---
 -
 -Hmmm.  That's interesting... do I smell RPMs?
 
 i didnt use any rpms when i built apache, modssl, php, and modperl.
 i'm not sure what you mean or how your comment is intended to help.

I apologize if my message was not clear.  Did you build your own Perl?

73,
Ged.




Re: Simple configuration question

2002-03-08 Thread Ged Haywood

Hi there,

On Fri, 8 Mar 2002, Kirk Rogers wrote:

 now I'd like to add SSL capabilities and dont want to clobber my
 existing system How can I add SSL to my existing distribution
 without overwriting any of my current configuration and files?

Go ahead and rebuild with the latest sources in a new directory.  None
of your existing files will be touched until you do '#make install'
and your existing configuration files in .../apache/conf won't be
overwritten at all.  Of course you have backups anyway, don't you?

73,
Ged.




Re: segfaulting upon request

2002-03-07 Thread Ged Haywood

Hi there,

On Mon, 4 Mar 2002, Steev Hise wrote:

 I'm having trouble with the latest version of mod_perl and apache.
 (version 1.26 with apache 1.3.23)
 
 upon startup there's a segmentation fault upon any http request.
 i'd be grateful for any assistance.
[snip]
 i built modperl and apache like this:
[snip]
 here's details of the machine:
--
 on redhat 7.0 linux i686, kernel 2.2.19-7.0.1smp
--
 perl -V
 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
--
 osname=linux, osvers=2.2.16-22smp, archname=i686-linux
--

Hmmm.  That's interesting... do I smell RPMs?

73,
Ged.




Re: RegistryLoader Segmentation fault

2002-03-01 Thread Ged Haywood

Hi there,

On Fri, 1 Mar 2002, Fran Fabrizio wrote:

 using Apache::RegistryLoader  I'm getting a seg fault when I attempt to 
 start apache

Read mod_perl/SUPPORT

Did you compile your own Perl, mod_perl and Apache?

You might be better off with Perl version 561 instead

Are you using DSO?

73,
Ged






RE: Apache stops serving requests

2002-02-28 Thread Ged Haywood

Hi again,

On Thu, 28 Feb 2002, Jeremy Rusnak wrote:

 This has been happening on both 24 and 22 machines  I've recompiled
 everything but Perl itself (560) with the stock Redhat 62 and 72

Definitely go for 561 at least, 560 is buggy  Compile your own,
don't use RPMs unless you have evidence they'll be OK  I use 572
now in development and I'd be quite happy with to go live with it,
although I don't do anything fancy in my Perl code if I can avoid it

I would stick with the compiler from 62, gcc has been having its own
growing pains recently but I'll admit I'm not up to date with the
present state of it  The last time I looked, the latest gcc couldn't
reliably compile the Linux kernel

 I'm hoping someone will be able to say this is the problem

I haven't seen anything resembling this mentioned here on the mod_perl List

 lose sleep over problems that just go away

Yep

 Compiled-in modules:
 

Nothing contentious there  You doing anything with suexec?  Dunno why I ask

 I was thinking perhaps it could be something with 1322, but
 since it isn't happening elsewhere I'm not positive

I have seen a couple of problems on 1322 which seemed to be fixed by upgrade
to 23 but as I said, they didn't seem to bear any resemblance to your trouble

 I'm maintaining around 12 web servers which all have hiccups from
 time to time

How often is from time to time?  I expect my servers to run quite
literally for years without any hiccups at all

 The problem I have described definately happens
 on the mod_perl boxes once or twice a day  The handful of problems
 on the other machines I'm of course starting to second guess and
 wonder about, but it's just paranoia

I'm not so sure  Just because you're paranoid it doesn't mean they
aren't all out to get you

 Guess I should keep a more detailed log

Agreed

Do you compile your own kernels?

73,
Ged




Re: [OT] Weird (unwanted) text on page

2002-02-25 Thread Ged Haywood

Hi there,

On Mon, 25 Feb 2002, Viljo Marrandi wrote:

 I've made one site using Embperl (but I think it's not Embperl problem)
 for image selling agency. Some time ago their HDD crashed and I had to
 restore whole site from older code,

Oops.  I guess they're doing backups now?

 Before it worked just fine, but now it's not. If I look the page
 with IE it's OK, but if I use Netscape it shows at the bottom of
 page weird error. Dunno where it comes. And interesting is, that IE
 doesn't show this error even in HTML source.

Probably nesting of tags.  Check especially in DIV blocks and TABLEs.

 And at least as weird problem is with Mac's (though I don't have a mac
 to test it, but clients complain). The whole page is screwed up, tables
 are broken, cookies won't get stored (send?) etc etc. 
 
 Anyone seen this before?

Yup.

73,
Ged.




Re: System crash related to mod_perl

2002-02-23 Thread Ged Haywood

Hi Jim,

On Sat, 23 Feb 2002, Jim Hull wrote:

 I wrote some code to dynamically create an image 
[snip]
 viola.[:)]
[snip]
 Within a few minutes my wife complains her browser has crashed.
[snip]
 I did not notice the problem as I exclusively use Mozilla,
[snip]

That's unusual, normally it's easier to crash Mozilla than IE, but
there are _lots_ of ways to break both.  Some of the easiest involve
sending broken HTML and/or headers, which is where I'd look first.
Check particularly things like Content-length for IE and tag nesting
for Netscape.

 if it works in normal perl, it should work in mod_perl (IMHO).

H...

Well it looks like it's not doing the same thing when you enable
mod_perl that it is doing when you use plain Apache.  You need to find
out what is different.  See the debugging section of the Guide, which
you can find at http://perl.apache.org/guide.

If you need to post again, first have a look at the docs mentioned in
mod_perl/SUPPORT so you can give a better description of your setup.

73,
Ged.




Re: SUCCESS: libapreq working in Mac OS X

2002-02-22 Thread Ged Haywood

Hi there,

On 22 Feb 2002, Joe Schaefer wrote:

 John Siracusa [EMAIL PROTECTED] writes:
[snip,snip]
   3) Install libapreq.so.1.0.0 (to /usr/local/lib) using:
 
 % ./configure
 % make
 % make install
 
   4) Now install Apache::Request and Apache::Cookie using
 
 % perl Makefile.PL
 % make
 % make install

Should that be

% make
% su
# make install

?

73,
Ged.




Re: [OT-ish] Session refresh philosophy

2002-02-19 Thread Ged Haywood

Hi there,

On Mon, 18 Feb 2002, Milo Hyson wrote:

 maybe I'm just approaching the problem incorrectly. If one is doing a 
 shopping-cart-style application (whereby someone selects/configures multiple 
 items before they're ultimately committed to a database) how else would you 
 do it? There has to be some semi-persistent (i.e. inter-request) data where 
 selections are stored before they're confirmed.

You can for example send a hidden form object back and forth between
your Client and the app.

73,
Ged.




Re: [OT] Really need Comments! very strange bug that happens onlyon Linux.

2002-02-19 Thread Ged Haywood

Hi all,

On 19 Feb 2002, Randal L. Schwartz wrote:

 Yes.  Learn that 1/10 doesn't have a precise representation in binary,
 so *all* floating point numbers are approximate.

Well, maybe not 0.5, 0.25,... :)

73,
Ged.




RE: mod_perl compile problem

2002-02-15 Thread Ged Haywood

Hi there,

On Thu, 14 Feb 2002, OCNS Consulting wrote:

 I Unzip/Untar the Apache tarball and change to the Apache top level
 distribution directory. I then Unzip/Untar the module dists and one by one
 prep each module for a static build and then finally build mod_perl as per
 my previous messages.

That's your problem.  Do it like I said in my last but one (?:) message.
You should finish up with the Apache and mod_perl directories at the
same level in the tree.

Hehe, it's the mistake I made when I first built mod_perl...

73,
Ged.




Re: POST without any content - sometimes

2002-02-15 Thread Ged Haywood

Hi there,

On Fri, 15 Feb 2002, Anders Knuts wrote:

 Hi again!
 No one got a clue to my problem? A hunch or just a feeling would do just
 fine :-)

Didn't you get my reply?

73,
Ged.
--
From [EMAIL PROTECTED] Fri Feb 15 17:39:58 2002
Date: Tue, 12 Feb 2002 19:42:32 + (GMT)
From: Ged Haywood [EMAIL PROTECTED]
To: Anders Knuts [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: POST without any content - sometimes

Hi there,

On Tue, 12 Feb 2002, Anders Knuts wrote:

 I have a board script to which users can post (of course)
 One IP-address has sometimes problems posting to that script, though.
[snip]
 really isn't mine, but what causes it??? How can the POST loose it's
 content like that? [snip] Could it be some kind of proxy-web-cache or
 something that causes the problem?

No idea.  Sounds like a lot of fun though.  Time to dig out tcpdump?

 Please excuse my poor english...

It's fine.

73,
Ged.





Re: POST without any content - sometimes

2002-02-15 Thread Ged Haywood

Hello again,

On Fri, 15 Feb 2002, Anders Knuts wrote:

[snip,snip]
 to use tcpdump in this case, Any hints?

You can use tcpdump to record the entire conversation between the
browser and the server.  To find out how to use it you can just type
'man tcpdump'.  If it's a problem specific to one IP address then
first I would record the conversations between a browser from an IP
address that doesn't suffer from the problem and the host, then from
the IP address which does have the problem.  My guess is that you'll
see something different when you compare these which might give you 
a clue about the problem.  You might even try spoofing the bad IP to
see if you can repeat the problem on your own.

On the other hand you might not yet have exhausted the other debugging
possibilities.  There are lots of techniques that you might try before
you get as deep into TCP as this.  You could put oodles of 'print
STDERR' statements all through your code, things like

my $dateTime   = gmtime;
print STDERR [$dateTime] foo(): Line, __LINE__,  Calling sub bar REMOTE_IP=, 
$ENV{REMOTE_ADDR}, \n;
bar($ENV{REMOTE_IP});

which is the sort of thing I do to convince myself that I really don't
know what's going on when I think I don't know what's going on.  In
fact I do it routinely in most of my new code, just to assure myself
that what I think is happening really is happening - thinkgs like
executing subroutines, grabbing variables, reading and writing files,
they mostly get an entry in the error_log at first.  I tail the logs
during development but they make pretty dull reading after a while...

There are some good debugging tips in the Guide:

http://perl.apache.org/guide

73,
Ged.





Re: FW: mod_perl compile problem

2002-02-14 Thread Ged Haywood

Hi there,

On Thu, 14 Feb 2002, IEEE Consulting wrote:

 Any other thoughts on this issue? I really would like to use mod_perl.

What's your Linux installation?

You _have_ got the Linux sources and things like that installed?

73,
Ged.

PS: you don't need to circulate to the dev list.




RE: FW: mod_perl compile problem

2002-02-14 Thread Ged Haywood

Hi there,

On Thu, 14 Feb 2002, OCNS Consulting wrote:

 The Server is installed with Redhat Linux 7.2 with latest the kernel

Sorry if this has been covered, I haven't read all the thread:
did you get the sources for Perl, Apache and mod_perl as tarballs
or did you use RPMs?  If you used RPMS I'd say

1.  Grab the .tar.gz files for each - I'd suggest Perl 5.6.1, or 5.7.2
if you like to live a fuller life.
2.  Create a directory /home/src (or something like that)
3.  Unpack the lot in there, i.e.
$ cd ~/src
$ tar xzf perl...
$ tar xzf apache-1.3.23.tar.gz
$ tar xzf mod_perl-1.26.tar.gz
$ cd perl...
$ ./configure
$ make
$ make test
$ su
# make install
# exit
$ cd ~/src/mod_perl...
etc etc, don't forget to su each time to 'make install' and
don't forget to exit from the root shell each time afterwards.

If that doesn't do it then we'll have to think again.

73,
Ged.




RE: mod_perl compile problem

2002-02-14 Thread Ged Haywood

Hi again,

On Thu, 14 Feb 2002, OCNS Consulting wrote:

 I revert back to the ActiveState rpm version 5.6.1 Build 631.  Do
 you believe that the version of PERL or APACHE has something to do
 with it?

No, I don't think it's a Perl problem, but it's a very complex bunch
of software and an awful lot of the Perl, Apache and mod_perl stuff
relies on an awful lot of other stuff so I'd always recommend that you
stay with the tried-and-tested things to start off with.  If you have
a need for something a little exotic then you can start to throw in
the unknowns (I'd include ActiveState in that:) one by one later to
see what, if anything, breaks.  Easier to delouse.

The problem seems to me to be missing or misplaced files.  That
generally means an unusual build of something which is why I suggested
starting from scratch with the tarballs.  Can you describe how you
set up the directories for your build?

73,
Ged.





Re: Genius for hire

2002-02-12 Thread Ged Haywood

Hi there,

On 11 Feb 2002, jon schatz wrote:

 Can I request then that the suggested tag [JOB] be used for such
 postings?

Please see

http://perl.apache.org/email-etiquette.html

73,
Ged.




Re: About PerlLogHandler phase

2002-02-12 Thread Ged Haywood

Hi there,

On Tue, 12 Feb 2002, James G Smith wrote:

 Randy J. Ray [EMAIL PROTECTED] wrote:
 
 * Are there ways to register other log types, in addition to the access,
   error, etc.? Such that people could specify those (and a format) the
   same way they specify the others? More to the point, so that there
   might be a ready file-descriptor I could print to, rather than having to
   deal with the open/lock/write/unlock/close cycle.

You can pipe all logs to your own scripts/executables/whatever and do
what you like with them, or use syslog if you're on *x and into that
kind of pain.  It's in the doc's.

73,
Ged.




Re: Influencing @INC list

2002-02-12 Thread Ged Haywood

Hi there,

On Mon, 11 Feb 2002, Kevin Slean wrote:

 I need to run multiple apache servers on one Solaris 2.7 box configured in
 such a way that each of them accesses their own private copy of perl
 libraries.

Could you accept recompiling Perl without the couple of paths which
get in the way, and then add the missing paths with use lib(...)?

There's lots of stuff about @INC in the Guide.

73,
Ged.




Re: POST without any content - sometimes

2002-02-12 Thread Ged Haywood

Hi there,

On Tue, 12 Feb 2002, Anders Knuts wrote:

 I have a board script to which users can post (of course)
 One IP-address has sometimes problems posting to that script, though.
[snip]
 really isn't mine, but what causes it??? How can the POST loose it's
 content like that? [snip] Could it be some kind of proxy-web-cache or
 something that causes the problem?

No idea.  Sounds like a lot of fun though.  Time to dig out tcpdump?

 Please excuse my poor english...

It's fine.

73,
Ged.




RE: mod_perl + UNIVERSAL

2002-02-12 Thread Ged Haywood

Hi all,

On Tue, 12 Feb 2002, Stathy G. Touloumis wrote:

 There really is no reason to cleanup the globals since they are still
 referenced and in memory.  Perhaps you can consider an interface around your
 code which can handle the cleanup and such of any variables.
 
 You could also set a 'cleanup' handler to 'unload' the module from the
 process when it is completed or even 'undef' specific variables.  That way
 you can clear out the namespace and then other scripts calling the same
 named module but from a different path can actually load it.

Of course all of this tends to go in the opposite direction from that
in which mod_perl tries to go: the idea is to do as little processing as
possible (particularly things like compiling modules) for each request.

73,
Ged.




Re: Weird mod_perl CGI.pm interaction (Bug?)

2002-02-08 Thread Ged Haywood

Hi Mike,

On Fri, 8 Feb 2002, Mike McLagan wrote:

My message is about data space.  The data space for the modules does not 
 seem to be recreated or reinitialized (BEGIN blocks are not rerun) from one 
 invocation of a script to another.

Yes, this is well known to mod_perl users and it's in the Guide, in
the same chapter that I've already suggested that you read:

=head1 BEGIN blocks 

Perl executes CBEGIN blocks as soon as possible, at the time of
compiling the code. The same is true under mod_perl. However, since
mod_perl normally only compiles scripts and modules once, either in
the parent server or once per-child, CBEGIN blocks in that code will
only be run once.  As the Cperlmod manpage explains, once a CBEGIN
block has run, it is immediately undefined. In the mod_perl
environment, this means that CBEGIN blocks will not be run during
the response to an incoming request unless that request happens to be
the one that causes the compilation of the code.

If you are having trouble coping with mod_perl and CGI.pm perhaps it
would better if you tried different approach, Apache::Request for
example has some useful features.

73,
Ged.






Re: DBI handle cleared whilst still active

2002-02-08 Thread Ged Haywood

Hi there,

On Fri, 8 Feb 2002 [EMAIL PROTECTED] wrote:

 I run the following script (just select the dbname and hostname from a
 function, commented out host user and password) 
[snip]
 
 abba02.orgdv perl test4.pl
 Content-type: text/plain
 
 DB: ENTWICKL auf Maschine: abbaentwickel.orgdv 
 DBI handle cleared whilst still active during global destruction.
[snip]

As mod_perl and Apache don't seem to be involved, would this question
be better asked on a DBI list?

73,
Ged.




Re: Segmentation fault

2002-02-08 Thread Ged Haywood

Hi there,

On Fri, 8 Feb 2002, Gregory Belenky wrote:

 Just found that Apache::Util::unescape_uri when gets undefined value as
 parameter not returns undefined value, but make SUBJ!
 Why that's happens?

Perhaps I'm being dense, I do not understand the question.  What is SUBJ?

 if we have to use one mod_perl-powered Apache - how we can find
 request, that breaks server?

Would it not be better to prevent the server from breaking?

73,
Ged.





Re: mod_perl, OpenPGP Math::Pari - Solved

2002-02-07 Thread Ged Haywood

Hi again,

On Fri, 8 Feb 2002, Jason Galea wrote:

 someone coulda told me to RTFM.. 8)

That's what I was trying to tell you. :)

73,
Ged.




Re: Weird mod_perl CGI.pm interaction (Bug?)

2002-02-07 Thread Ged Haywood

Hi there,

On Thu, 7 Feb 2002, Mike McLagan wrote:

I have two scripts, call them A and B.
[snip]
$q = new CGI;
[snip]
 Inveriably, I end up with B::show() in my output, not at all what I wanted, 

Isn't this mentioned in the mod_perl Guide?

http://perl.apache.org/guide

73,
Ged.




Re: Subrequests

2002-02-07 Thread Ged Haywood

Hi there,

On Thu, 7 Feb 2002, Miroslav Madzarevic wrote:

 Is it possible that my perl script (Apache::Registry, Apache::PerlRun, 
 HTML::Mason or whatever) could run multiple times with same parameters when the
 user just invokes the URL once (for example clicks on A tag)  and if so how 
 can I prevent this from happening.
 
 I guess this is because of subrequests being fired and I _explicitly_ don't 
 wish my code to run multiple times because strange things might happen.

There are lots of ways of finding out what happens when a request comes in.
Read the debugging section of the mod_perl Guide: http://perl.apache.org/guide.
I favour tailing the error_log and printing truckloads of debug info in there
as a matter of routine.  (Amazing what you find, sometimes. :)

Browsers like Netscape can fire off lots of parallel requests.  You
might not expect them to do that.  Even if everything works like you
expect, if it runs on a Webserver how are you going to prevent people
double-clicking, or lots of people all clicking at once?  You'd better
fix your code so it can cope.

73,
Ged.




RE: [Q] SIGSEGV After fork()

2002-02-07 Thread Ged Haywood

Hi there,

On Thu, 7 Feb 2002, Fister, Mark wrote:

 Tried that.  Note: you also tried to help a fellow back in November of
 2001 on this VERY same stack trace.
 
 http://groups.yahoo.com/group/modperl/message/39560

Heh, didn't get very far with Lynx on that URL...
does anybody know what happened to that one?

  You've obviously read the docs, so I take it the same compiler built
  Aapche, mod_perl and Perl.  Have you tried this on RH6.2 with the
  compiler that came with that?
 
 Yes.  Note also: the problem didn't use to happen with perl 5.00404,
 mod_perl 1.08 and apache 1.3b5 (with exactly the same codebase).

5.00404 ?? 1.08 !?!...

Ah.  Now we're getting somewhere.  Maybe.  Why not try Perl 5.7.2?
I'm using it in development, did some pretty heavy stuff with 5.7.0
and it was fine, then I ran into SIGSEVs and things trying to do some
simple profiling with Devel::DProf on some simple code (heavy data:)
which went away when I installed 5.7.2.  (BTW thanks Stas!:)

73,
Ged.






Re: Weird mod_perl CGI.pm interaction (Bug?)

2002-02-07 Thread Ged Haywood

Hi there,

On Thu, 7 Feb 2002, Mike McLagan wrote:

 Isn't this mentioned in the mod_perl Guide?
 
 http://perl.apache.org/guide
 
 
 I dug thru the guide and I found no mention at all of anything
 similar to this.

http://perl.apache.org/guide/porting.html

73,
Ged.




Re: Weird mod_perl CGI.pm interaction (Bug?)

2002-02-07 Thread Ged Haywood

Hi again,

On Thu, 7 Feb 2002, Mike McLagan wrote:

 On Fri, 8 Feb 2002 01:18:19 + (GMT), Ged Haywood wrote:
 
 On Thu, 7 Feb 2002, Mike McLagan wrote:
 
  Isn't this mentioned in the mod_perl Guide?
  
  http://perl.apache.org/guide
  
  
  I dug thru the guide and I found no mention at all of anything
  similar to this.
 
 http://perl.apache.org/guide/porting.html
 
 Could you give me the specific jump tag for the section you are refering to please?


=head3 Reloading Configuration Files


When the require(), use() and do() operators successfully return, the
file that was passed as an argument is inserted into C%INC (the key
is the name of the file and the value the path to it). Specifically,
when Perl sees require() or use() in the code, it first tests C%INC
to see whether the file is already there and thus loaded. If the test
returns true, Perl saves the overhead of code re-reading and
re-compiling; however calling do() will (re)load regardless.

You generally don't notice with plain perl scripts, but in mod_perl
it's used all the time; after the first request served by a process
all the files loaded by require() stay in memory. If the file is
preloaded at server startup, even the first request doesn't have
the loading overhead.

We use do() to reload the code in this file and not require() because
while do() behaves almost identically to require(), it reloads the
file unconditionally. If do() cannot read the file, it returns
Cundef and sets C$! to report the error.  If do() can read the
file but cannot compile it, it returns Cundef and sets an error
message in C$@. If the file is successfully compiled, do() returns
the value of the last expression evaluated.


73,
Ged.




<    1   2   3   4   5   >