IPC::SysV make test fails with 'test program seems to have generated a core'

1999-12-16 Thread Brian S. Craigie


Hi, on Solaris 7/Sparc, I'm trying to get Apache-DBILogin-1.5 to work
and apparently it needs IPC-SysV for some reason.  IPC-SysV-1.03 make'd
ok, but make test fails on t/sem as below.

Is this test failure anything to worry about anybody?

IPC-SysV-1.03 [ 178 ] make test
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
-I/usr/local/lib/perl5/sun4-solaris/5.00404 -I/usr/local/lib/perl5 -e
'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;'
t/*.t
t/msg...ok
t/sem...Use of uninitialized value at
blib/lib/IPC/Semaphore.pm line 134.
Use of uninitialized value at blib/lib/IPC/Semaphore.pm line 134.
Bad arg length for semctl, is 6, should be 8 at
blib/lib/IPC/Semaphore.pm line 135.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar.
dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core
Failed Test  Status Wstat Total Fail  Failed  List of failed
---
t/sem.t   0   139??   ??   %  ??
Failed 1/2 test scripts, 50.00% okay. 0/9 subtests failed, 100.00% okay.
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'


Thanks in advance :-)

-- 

Best Regards,

Brian S. Craigie
Unix Sysadmin
NEC Semiconductors (UK) Ltd



Re: Hanging processes SOLVED!

1999-12-16 Thread Tony Demark


That got it. I cannot thank you enough. The sites are smokin' now.

Recap for interested parties:
* Solaris 2.7
* mod_perl 1.21

Observed bugs:

* occassional httpd processes stop responding
* they stay in 'run' state (via 'top')
* only print 'brk(...)' on occasion via 'truss'
* utilyze all available CPU
* continuously allocate more mem into heap (/usr/proc/bin/pmap)

Cause (Please correct me if this is not correct):

* AUTOLOADing of Apache::Constants::OPT_EXECCGI() can cause this to occur

Fix:

Preload Apache::Constants::OPT_EXECCGI() in either PerlRequire'd file or 
Perl section
(Thanks to Chris Remshaw for coming up with it and to Doug MacEachern for 
pointing it out to me)

Lessons (re)?learned:

* gdb and debugging versions are your friend
* Check the CVS tree for fixes and reports - who know, you might actually find 
the answer
* You definately find better products in the bazaar than in the cathedral

- Tony

In message [EMAIL PROTECTED], Doug MacEac
hern writes:
 (gdb) perl_get_sv("Apache::Constants::AUTOLOAD")
 Apache::Constants::OPT_EXECCGI

what I was about to suggest trying is already in the modperl cvs Changes:
 preload Apache::Constants::OPT_EXECCGI() for Apache::{Registry,PerlRun}
 thanks to Chris Remshaw for spotting this w/ Apache::DProf

so try the cvs snapshot, or in a PerlRequire file, preload it like so:

Apache::Constants::OPT_EXECCGI();






possible patch for Apache::AuthCookie

1999-12-16 Thread Robert Locke


Hi all,

Currently, Apache::AuthCookie uses:
$r-err_header_out("Set-Cookie" = ...

to set its cookie.

However, if you're authentication or authorization routines also sets
a cookie, then it will get overwritten by the above code.

Below is a proposed patch to AuthCookie.pm that I believe solves this
problem.  Basically, I replaced each occurrence of the above with:
$r-err_headers_out-add("Set-Cookie" = ...

This assumes that you have Apache::Table compiled in.

The corresponding code to read in the cookies (using err_header_in) is
not a problem since it seems that browsers return all cookies destined
for a particular domain/path in a single ";" delimited HTTP header
field.

Thanks!

Rob

PS. Who's the current maintainer of Apache::AuthCookie?  I seem to
remember reading somehwere that it is no longer Eric Bartley.

--
diff AuthCookie.pm*
112c112
   $r-err_headers_out-add("Set-Cookie" = $auth_type . "_" .
---
   $r-err_header_out("Set-Cookie" = $auth_type . "_" .
114c114
   $r-log_error("set_cookie " . $r-err_headers_out-add("Set-Cookie"))
---
   $r-log_error("set_cookie " . $r-err_header_out("Set-Cookie"))
142c142
   $r-err_headers_out-add("Set-Cookie" = $auth_type . "_" . $auth_name .
---
   $r-err_header_out("Set-Cookie" = $auth_type . "_" . $auth_name .
145c145
   $r-log_error("set_cookie " . $r-err_headers_out-add("Set-Cookie"))
---
   $r-log_error("set_cookie " . $r-err_header_out("Set-Cookie"))
--



Managing session state over multiple servers

1999-12-16 Thread Simon Rosenthal


Hi:

We're planning on migrating to an Apache::Session + mysql approach for 
managing session state, for a large-ish site hosted on multiple servers. 
While there have been many useful discussions on this list concerning the 
technologies involved, I haven't seen many war stories from the field, as 
it were.

I have some specific questions  - hopefully someone out there has had to 
address these issues and may have some good advice.

a) If your site runs on multiple servers, do you attempt to cache session 
state records on the web server for any length of time after they are 
retrieved from the DBMS ? and if so, how do you handle cache consistency 
across all your servers  - (we have rather blind load balancing hardware in 
front of our server farm with no way  of implementing any kind of server 
affinity that I am aware of)

b) Does anyone have redundant database servers ? If so ... are there any 
implementation gotchas ? and if you have a single server, how does session 
management work  when it goes down ? (I'm pretty happy with the hardware - 
Suns - which we have, but a disk can go at any time)

c) This is more of a mysql question  When do people consider a session 
to have expired ? and what is the best strategy for deleting expired 
sessions from a database, especially given that mysql's table based locking 
seems to leave a bit to be desired if you're trying to mix update 
operations with a big SELECT/DELETE to purge expired sessions  ?

TIA

- Simon
-
Simon Rosenthal ([EMAIL PROTECTED])  
Web Systems Architect
Northern Light Technology   222 Third Street, Cambridge MA 02142
Phone:  (617)577-2796  :   URL:  http://www.northernlight.com
"Northern Light - Just what you've been searching for"



Re: Managing session state over multiple servers

1999-12-16 Thread James G Smith

Simon Rosenthal [EMAIL PROTECTED] wrote:

b) Does anyone have redundant database servers ? If so ... are there any 
implementation gotchas ? and if you have a single server, how does session 
management work  when it goes down ? (I'm pretty happy with the hardware - 
Suns - which we have, but a disk can go at any time)

Sun (and most other server/disk providers - e.g., SGI, NetAPP) provides a 
volume manager that can handle RAID volumes.  If you have a spare disk in the 
system and a disk goes bad in the volume, you can take the bad disk out, put 
the spare in, and then replace the bad disk at a convenient time.  The machine 
has to only be down for the hardware replacement then (Sun server), not at all 
(SGI disk array) or quiesced for a few seconds (NetApp).  Disclaimer -- I am 
not an employee of any of the companies mentioned, nor am I endorsing any 
particular product or company.  These are the systems that we have on the 
floor.

I would suggest Apache::DBI to have persistant connections to the database and 
a fast local network to reduce latencies, though that's probably not the 
largest source of them.
-- 
James Smith [EMAIL PROTECTED], 409-862-3725
Texas AM CIS Operating Systems Group, Unix




Re: Problems with dynamically-loaded perl modules under Solaris2.5.1

1999-12-16 Thread Eugene Miretskiy

Recently I experienced similar problems on Solaris.

I had to rebuild perl as shared libperl.so Perl library for mod_perl
to work -- see perl intall manpages.


Dan Rench wrote:
 
 On Mon, 13 Dec 1999, Doug MacEachern wrote:
 
  are you still stuck on this?
 
 Yes.  To reiterate:
 
 Solaris 2.5.1 sparc, gcc 2.95, perl 5.005_03 (configured with Solaris hints),
 mod_perl 1.21, apache 1.3.9, mod_fastcgi 2.2.2.
 
 Everything works fine EXCEPT when I try to "use" a dynamically loaded module
 (Data::Dumper or Storable, for example) inside a mod_perl handler.  I have no
 trouble using these modules in regular perl scripts, mod_cgi scripts, or
 mod_fastcgi scripts.
 
  did you link mod_perl static or dso?  if dso, try static.
 
 All of my Apache modules are compiled statically.
 
  you can also try configuring Perl with -Dusemymalloc=n,
  but that comes with a large performance hit.
 
 I've tried it both ways, using perl's malloc or Solaris', and both
 give me the same result in my error logs:
 
 [Tue Dec 14 08:36:01 1999] [error] Can't load 
'/usr/local/lib/perl5/5.00503/sun4-solaris/auto/Data/Dumper/Dumper.so' for module 
Data::Dumper: ld.so.1: /usr/local/web/bin/httpd: fatal: relocation error: symbol not 
found: main: referenced in 
/usr/local/lib/perl5/5.00503/sun4-solaris/auto/Data/Dumper/Dumper.so at 
/usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.
 
 All I need to do is add "use Data::Dumper;" in a handler to trigger this.
 
 And as I mentioned in my previous messages, this same setup works fine under
 Linux and FreeBSD.  I can also get the problem to go away on Solaris by
 downgrading perl to 5.004_05 or upgrading it to 5.005_62.
 
 A co-worker who understands Perl internals better than I do seems to have
 tracked it down to a problem with Dynaloader's dlopen() call, though looking
 at ext/Dynaloader/dl_dlopen.xs in the various Perl sources there have
 apparently been no changes to it since 1994(?!).  So maybe the problem lies
 elsewhere.  Perl has caused my C skills to atrophy so we're getting into
 territory I don't really understand.  Would something like gdb help diagnose
 the problem?

-- 
  Eugene Miretskiy [EMAIL PROTECTED]
  InVision, INC.  (516) 543-1000x219  
  http://www.invision.net



Apache::URI choking

1999-12-16 Thread Joe Ryan

I am getting the following error when trying to 

use Apache::URI

---
[Thu Dec 16 11:52:28 1999] [error] Apache::WebSQL: `Can't locate loadable object for 
module Apache::URI in @INC (@INC contains: . /sysdev/web/apache/lib 
/usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5 
/usr/local/lib/perl5/site_perl/sun4-solaris /usr/local/lib/perl5/site_perl 
/sysdev/web/apache/ /sysdev/web/apache/lib/perl) at 
/usr/local/lib/perl5/site_perl/mod_perl.pm line 16
---

here are the lines in mod_perl.pm causing problems

---
 14 if ($ENV{MOD_PERL}) {
 15 (defined {$class.'::bootstrap'} ?
 16  \{$class.'::bootstrap'} :
 17  \DynaLoader::bootstrap)-
 18  ($class, $version);
 19 }
---

Any ideas?  
Thanks very much for any help!

Joe
--
Joseph Ryan
Programmer
National Human Genome Research Institute



mod_perl + DSO + solaris problems

1999-12-16 Thread Schlottke, Mirko \(ARD-aktuell\)

Hi!

I've got some problems here in compiling mod_perl with DSO support on a
solaris server.
I always get a "relocation error: ... :symbol main: referenced symbol not
found"

Anybody could help me with this ? 

-- Mirko



Managing session state over multiple servers

1999-12-16 Thread Robert Locke


Hi Simon,

This is not an answer to any of your questions, but your mail reminded
me of a "gotcha" relating to Apache::Session and Apache::DBI that is
probably totally obvious to the gurus on this list.

When Apache::Session::DBI connects to a database, it calls:

$self-{dbh} = DBI-connect(
$datasource,
$username,
$password,
{ RaiseError = 1, AutoCommit = 1 }
);

If you use Apache::DBI, make sure that you call "connect" with the
same arguments as above in your other scripts or you will find
yourself with more than one connection/process to the database, which
may not be your intention.  I spotted this by running "httpd -X" and
noticing that it would spawn a second db connection whenever a session
was created.

Hope this helps somebody!

Rob



Re: 'var' instead of var ... (getting crazy)

1999-12-16 Thread Dmitry Beransky

Hi Andrea,

Have you looked at 
http://perl.apache.org/guide/porting.html#Sometimes_it_Works_Sometimes_it_?
This may not answer your question directly, but at least may give you some 
ideas on how to approach the problem...

Cheers
Dmitry

At 10:05 AM 12/16/99 , Andrea Brugiolo wrote:
 But  it  doesn't  (always)  understand  it,  as  i  told  you,
 expecially just  after I  restart Apache  (after some  hits it
 begins to  behave better, but  there is not  guarantee anyway,
 for all the session).



RE: How Embperl sub routine retun value?

1999-12-16 Thread Albert Liu


Read about how Perl passes parameters :-)

You shift the value of your parameter into $bb, now you modifiy $bb, but $bb
is a variable of it's own, it has nothing to do with the parameter you pass.
Reread my example and write your sub like this:

[$ sub TTEST $]
[- $aa = 3;  -]
p$aa is [+$aa+]
[- $_[0] = $aa; -]
[$ endsub $]



Gerald


It works, but I never thought i can use this way to pass parameter. Indeed
i never read this in "Programming Perl" book. Perhaps it is at some where
it the book

Anyway, thank you.
Albert



Re: [Re: more then one PerlTransHandler]

1999-12-16 Thread Evgenii Bazarov

I use Apache config file with
PerlTransHandler entry. Yes I set
DECLINED, but actually it doesn't matter
in this case, because the LAST
handler out of all installed PerlTransHandlers in the
file actually gets invoked by Apache in my test. 
If it be the FIRST, I would suspect that I 
messed up return codes.

You said it works fine for you... What is your set
up?!

Best regards,
Evg


"Andrei A. Voropaev" [EMAIL PROTECTED] wrote:
How did you try to set it? It works for me fine.

Do you know that if your PerlTransHandler returns OK then no other
TransHandlers are executed? If you want others to work then return DECLINED

Andrei

On Sun, Dec 12, 1999 at 07:46:01AM -0700, Evgenii Bazarov wrote:
 Hi!
 
 I tried to set more then one PerlTransHandler but
 if I specify both on the same line, Apache says
 "syntax error", otherwise it see only the last one.
 
 Apache 1.3.6 on Linux with mod_perl 1.19
 
 According to "Apache Modules" book it should be
 possible... Any advice will be highly appreciated!
 
 Cheers,
 Evg
 
 
 Get free email and a permanent address at http://www.netaddress.com/?N=1

-- 



Get free email and a permanent address at http://www.netaddress.com/?N=1



Re: VelociGen for Perl, Competetive Analysis?

1999-12-16 Thread *

My apologies to Alex... I wasn't expecting Parand Darugar to forward this
to the modperl list in the first place.

I do still feel the same way that I did when I first wrote the letter,
though... Focus on vender support instead of compairing it to mod_perl, I
think it is a better marketing strategy anyway - just look what it did for
linux ;^)

again - sorry for opening up old wounds,
--
/* 



Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)

1999-12-16 Thread Michael Plump

On 14 Dec 1999, Randal L. Schwartz wrote:

 Sounds to me like they are precisely at odds with anyone doing the
 kind of blocking that I want to do.

That seems like a weird policy, though.  nmap, for example, helps people
do dastardly things, but that doesn't mean nmap is a bad program; it's how
you use it that makes you bad.

Teleport Pro, by default, is setup to be a nice little web robot.  Just
because one user configures the program to be evil doesn't mean you should
stop other people who are trying to play nice.  And since you can change
its User-Agent, it doesn't seem like that's going to be very effective,
anyway.

--
Michael Plump | [EMAIL PROTECTED] | email me about making $ selling snorks
The ultimate Joe Dietz repository: http://www.skylab.org/~plumpy/dietz.txt



DocumentRoot hardcoded?

1999-12-16 Thread Evgenii Bazarov

Hi everybody!

I set 

DocumentRoot  /home/httpd

in httpd.conf

However I am getting  $r-document_root()

as '/home/httpd/html' in my first Translation handler.

I am wondering is there another place where it
might be soft/hard coded? I use prebuilt version
of Apache coming with Linux distribution.

This question might be more appropriate for Apache
list, but may be somebody here can help as well?

Cheers,
Evg 


Get free email and a permanent address at http://www.netaddress.com/?N=1



RE: mod_perl 1.21 - CGI.pm 2.56 error in phase other than content

1999-12-16 Thread sam

  PerlPostReadRequestHandler 'sub { Apache-request(shift) }'

doug,
thanks for the response.  I had tried the bandaid with no luck.
Probably should have said that in the post :-) I will try to get a simple
example out today that shows the problem in full.  I have worked around it
by creating an empty CGI object and the populating it from $r-content.  But
this seems to be a really ugly way through the problem.  I have also noticed
some funny effects on basic_auth when I do this.  But I will try to get a
small example of the problem.  Overall what I am trying to achieve (in
common with others) is to enable a handler to make decisions about a request
based on data in a POST request and still have this data correctly available
for later phases of the request.  



Re: Session

1999-12-16 Thread Francesc Guasch

raptor wrote:
 
 hi,
 
 Is there Session module that has capability more like ASP::Session
 rather than Apache::Session.(I mean hanlidng the cookies too, Joshua is
 it easy to extract Session functionality from ASP as a standalone module
 :")).
 OR
 what mostly the MASON people use to handle Sessions.
put this inside your handler.pl

my %session;
my $cookie_rec = $r-header_in('Cookie');
my ($cookie) = $cookie_rec=~/SESSION_ID=(\w+)/;
tie %session, 'Apache::Session::DBI', $cookie,
{DataSource = 'dbi:mysql:sessions',
UserName   = 'the username',
   Password   = 'the password'
};
$r-header_out("Set-Cookie" =
"SESSION_ID=".$session{_session_id}.
";
expires=".HTTP::Date::time2str(time+180*24*60*60) )
if ( !$cookie or $cookie ne $session{_session_id});
my $result=$ah-handle_request($r);
untie %HTML::Mason::Commands::session if $SESSION;
return $result;


Just cutted and pasted from mine, I removed some code not important
for the example. Take it easy.

-- 
 ^-^,-. mailto:[EMAIL PROTECTED]
 o o   )http://www.etsetb.upc.es/~frankie
  Y (_ (__(OOOo



Re: [Re: again - more then one PerlTransHandler]

1999-12-16 Thread Evgenii Bazarov

Waa!!! So far nobody who answered even doubted that
it should be possible to have more then one 
PerlTransHandler. The "Eagle" book also says
that it should be possible. People suggested that
either my mod_perl built with wrong flags or I messed
up return codes OK/DECLINED (which I didn't!).

Is what you saying documented somewhere?!!!

Thanks,
Evg


darren chamberlain [EMAIL PROTECTED] wrote:
You're not missing anything. You can only have one translation handler. In
the case of the two TransHandlers, the second definition masks the first.

Can't you just rewrite the SimpleTranslation::handler to be
ModeratelyComplexTranslation::handler, and do the Right Thing in that one
handler? I.e., if every request is being passed through 2 handlers, why not
consolidate them into one handler?

darren

Evgenii Bazarov ([EMAIL PROTECTED]) wrote:
 Hi everybody,
 
 Sorry for the poor wording of my question. Once again:
 
 I am trying to install and use more then one translation
 handler. I tried two approaches to specifying handlers
 in the Apache config file (both recommended in the 
 "Eagle" book.) First, have both handlers on the same line,
 e.g. in httpd.conf
 
 PerlTransHandler  SimpleTranslation::handler FancyTranslation::handler
 
 In this case Apache spits out error:
 
  Syntax error on line 29 of /etc/httpd/conf/perl.conf
  PerlTransHandler takes one argument, the Perl Translation handler routine 
 name.
 
 and exits.
 
 Secondly I tried to put two lines in config:
 
 PerlTransHandler  SimpleTranslation::handler
 PerlTransHandler  FancyTranslation::handler
  
 In this case, only second handler gets invoked.
 Am I missing something?!!!
 
 Evg
-- 
If God had not given us sticky tape, it would have been necessary to invent
it.



Get free email and a permanent address at http://www.netaddress.com/?N=1



Re: Managing session state over multiple servers

1999-12-16 Thread G.W. Haywood

Hi there,

On Fri, 17 Dec 1999, Robert Locke wrote:

 If you use Apache::DBI, make sure that you call "connect" with the
 same arguments as above in your other scripts or you will find
 yourself with more than one connection/process to the database, which
 may not be your intention.

See the Guide, `Opening a connection with different parameters'.

73
Ged.



RE: How Embperl sub routine retun value?

1999-12-16 Thread G.W. Haywood

Hi there,

On Mon, 13 Dec 1999, Albert Liu wrote:

 It works, but I never thought i can use this way to pass parameter. Indeed
 i never read this in "Programming Perl" book. Perhaps it is at some where
 it the book

Second edition, pages 111 to 121 inclusive.

73
Ged.



Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)

1999-12-16 Thread Randal L. Schwartz

 "Michael" == Michael Plump [EMAIL PROTECTED] writes:

Michael Teleport Pro, by default, is setup to be a nice little web
Michael robot.  Just because one user configures the program to be
Michael evil doesn't mean you should stop other people who are trying
Michael to play nice.  And since you can change its User-Agent, it
Michael doesn't seem like that's going to be very effective, anyway.

Yes, it's possible to configure it so that it works correctly, but if
I recall, I also saw it fetch /cgi/whatever, even though that was in
/robots.txt.  I *must* block anything that doesn't respect
/robots.txt.  Once they fix that, I might let it loose.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL: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: IPC::SysV make test fails with 'test program seems to have generated a core'

1999-12-16 Thread Cliff Rayman

What is Apache-DBILogin-1.5 using IPC for?
if it is semaphores - it is not going to work.
looks like there is a bad arg length.  I don't
use that package so I am not sure what is in line 135
of Semaphore.pm but you might be able to modify it
to work with Solaris.

cliff rayman
genwax.com

"Brian S. Craigie" wrote:

 Hi, on Solaris 7/Sparc, I'm trying to get Apache-DBILogin-1.5 to work
 and apparently it needs IPC-SysV for some reason.  IPC-SysV-1.03 make'd
 ok, but make test fails on t/sem as below.

 Is this test failure anything to worry about anybody?

 IPC-SysV-1.03 [ 178 ] make test
 PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
 -I/usr/local/lib/perl5/sun4-solaris/5.00404 -I/usr/local/lib/perl5 -e
 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;'
 t/*.t
 t/msg...ok
 t/sem...Use of uninitialized value at
 blib/lib/IPC/Semaphore.pm line 134.
 Use of uninitialized value at blib/lib/IPC/Semaphore.pm line 134.
 Bad arg length for semctl, is 6, should be 8 at
 blib/lib/IPC/Semaphore.pm line 135.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 Attempt to free unreferenced scalar.
 dubious
 Test returned status 0 (wstat 139, 0x8b)
 test program seems to have generated a core
 Failed Test  Status Wstat Total Fail  Failed  List of failed
 ---
 t/sem.t   0   139??   ??   %  ??
 Failed 1/2 test scripts, 50.00% okay. 0/9 subtests failed, 100.00% okay.
 *** Error code 2
 make: Fatal error: Command failed for target `test_dynamic'

 Thanks in advance :-)

 --

 Best Regards,

 Brian S. Craigie
 Unix Sysadmin
 NEC Semiconductors (UK) Ltd



Re: Managing session state over multiple servers

1999-12-16 Thread Robert Locke


All hail the Guide!  :-)

However, I would like to say that Apache::Session::DBIStore does the
following:

 $self-{dbh} = DBI-connect(
 $datasource,
 $username,
 $password,
 { RaiseError = 1, AutoCommit = 1 } 
 );

so, if, somewhere else, you use a connection string that, for example,
does NOT include:
"{ RaiseError = 1, AutoCommit = 1 }"

then a separate connection will be initiated.  That was the point I
was trying to make.

Also, re: the Guide, exactly how does one go about changing a
parameter like "LongReadLen"?  Should one set it and then reset it to
its original value, something like:
$longreadlen = $dbh-{LongReadLen};
$dbh-{LongReadLen} = 50;
[do your stuff]
$dbh-{LongReadLen} = $longreadlen;

Thanks!

Rob



Re: Managing session state over multiple servers

1999-12-16 Thread Tom Mornini

On Fri, 17 Dec 1999, Robert Locke wrote:

 If you use Apache::DBI, make sure that you call "connect" with the
 same arguments as above in your other scripts or you will find
 yourself with more than one connection/process to the database, which
 may not be your intention.  I spotted this by running "httpd -X" and
 noticing that it would spawn a second db connection whenever a session
 was created.

Actually, this whole thread reminds me of a reverse-gotcha to the one
quoted above.

We needed to run without AutoCommit (doesn't everyone?) and have the
ability to commit/rollback manually.

BUT, we were using the SAME centralized connect subroutine in our session
code (that utilized Oracle as a backing store).

So, if any session data was squirreled away in the middle of another
database transaction, we got a premature commit on the non-session SQL.
This took a while to debug! :-)

So, sometimes you WANT to have different connections, which is how we
solved this problem.

-- 
-- Tom Mornini
-- InfoMania Printing and Prepress



Re: mod_perl + DSO + solaris problems

1999-12-16 Thread Cliff Rayman

check out the mail archive.
there is alot of discussion on compiling solaris with DSO support.

http://www.geocrawler.com/search/?config=182words=solaris+DSO

cliff rayman
genwax.com

"Schlottke, Mirko (ARD-aktuell)" wrote:

 Hi!

 I've got some problems here in compiling mod_perl with DSO support on a
 solaris server.
 I always get a "relocation error: ... :symbol main: referenced symbol not
 found"

 Anybody could help me with this ?

 -- Mirko



Another install question: CGI.pm not found

1999-12-16 Thread Bill Moseley

What obvious thing am I missing?

During make test this gets written to the error log:

Can't locate CGI.pm in @INC at /mod_perl-1.21/t/net/perl/cgi.pl line 7.

Ok, so I print out @INC in cgi.pl.

78) %head t/net/perl/cgi.pl
#!/usr/local/bin/perl

BEGIN {
  print STDERR join("\n", @INC), "\n";
}

use CGI ();
use strict;

my $r = CGI-new;


And the printing of @INC shows:

/mod_perl-1.21/blib/lib
/mod_perl-1.21/blib/arch
/mod_perl-1.21/t/docs
/mod_perl-1.21/blib/lib
/mod_perl-1.21/blib/arch
blib/arch
blib/lib
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503  
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005

74) %find /usr/local/lib/perl5 -name CGI.pm
/usr/local/lib/perl5/5.00503/CGI.pm

Is @INC not what I think it is at that point?

Bill Moseley
mailto:[EMAIL PROTECTED]



Re: possible patch for Apache::AuthCookie

1999-12-16 Thread Ken Williams

[EMAIL PROTECTED] (Robert Locke) wrote:
Below is a proposed patch to AuthCookie.pm that I believe solves this
problem.  Basically, I replaced each occurrence of the above with:
$r-err_headers_out-add("Set-Cookie" = ...

I think you've got the patch backwards.

PS. Who's the current maintainer of Apache::AuthCookie?  I seem to
remember reading somehwere that it is no longer Eric Bartley.

Yeah, it's not.  I've been toying with the code and improving it, but my
improvements make it non-backward-compatible.  So I might need to change
the name and make myself the owner of the new version.  Not that I have
a lot of time...

--
diff AuthCookie.pm*
112c112
  $r-err_headers_out-add("Set-Cookie" = $auth_type . "_" .
---
  $r-err_header_out("Set-Cookie" = $auth_type . "_" .
114c114
  $r-log_error("set_cookie " . $r-err_headers_out-add("Set-Cookie"))
---
  $r-log_error("set_cookie " . $r-err_header_out("Set-Cookie"))
142c142
  $r-err_headers_out-add("Set-Cookie" = $auth_type . "_" . $auth_name .
---
  $r-err_header_out("Set-Cookie" = $auth_type . "_" . $auth_name .
145c145
  $r-log_error("set_cookie " . $r-err_headers_out-add("Set-Cookie"))
---
  $r-log_error("set_cookie " . $r-err_header_out("Set-Cookie"))
--


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)

1999-12-16 Thread Eric L. Brine


Randal Yes, it's possible to configure it so that it works correctly, 
Randal but if I recall, I also saw it fetch /cgi/whatever, even though 
Randal that was in /robots.txt.  I *must* block anything that doesn't 
Randal respect /robots.txt.  Once they fix that, I might let it loose.

Teleport Pro obeys robots.txt by default, but unfortunately, it can be
set to ignore robot exclusion rules. 

Michael Just because one user configures the program to be
Michael evil doesn't mean you should stop other people who
Michael are trying to play nice.

Yes, it does. The actions of wrong dooers affect the innocent, here and
everywhere.

ELB

--
Eric L. Brine  |  Chicken: The egg's way of making more eggs.
[EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
ICQ# 4629314   |  An optimist thinks thorn bushes have roses.



Re: [Re: again - more then one PerlTransHandler]

1999-12-16 Thread Eric Cholet

On Thu, 16 Dec 1999, you wrote:
 Waa!!! So far nobody who answered even doubted that
 it should be possible to have more then one 
 PerlTransHandler. The "Eagle" book also says
 that it should be possible. People suggested that
 either my mod_perl built with wrong flags or I messed
 up return codes OK/DECLINED (which I didn't!).
 
 Is what you saying documented somewhere?!!!

Here's a simple test I just ran (with the CVS version of mod_perl, but 1.21
should work as well, although I haven't tested it):

Foo.pm:
package Foo;
sub handler
{
$r = shift;
$r-warn("Foo translating " . $r-uri);
return DECLINED;
}
1;

Bar.pm:
package Bar;
sub handler
{
$r = shift;
$r-warn("Bar translating " . $r-uri);
return DECLINED;
}
1;

in httpd.conf:
PerlTransHandler +Foo
PerlTransHandler +Bar

after accessing the server, in error.log:
[Fri Dec 17 00:44:22 1999] [warn] Foo translating /
[Fri Dec 17 00:44:22 1999] [warn] Bar translating /

So yes it's possible to have several TransHandlers.

--
Eric Cholet



Re: Another install question: CGI.pm not found

1999-12-16 Thread Bill Moseley

Allow me to better describe what's happening.  

Here's the summary:
The site I'm working on built a new version of perl.  Old 5.005, and the
new is 5.005_03.

I can build mod_perl fine using the old 5.005, but not the new 5.005_03.

I'm not building any of this as root, but that shouldn't be a problem.

Ok, I just download my own copy of perl 5.005_03 and built it in a local
directory and used that to build mod_perl.  That worked just fine.

Question:
How do I figure out what's the problem with the new build of 5.005_03?
Would posting -V from the various perl's help?

Here's how I'm building.

61) %/usr/local/bin/perl5.005 Makefile.PL \
? APACHE_PREFIX=$HOME/httpd_heavy \
? APACHE_SRC=../apache_1.3.9/src \
? DO_HTTPD=1 \
? USE_APACI=1 \
? EVERYTHING=1
[...]
make
make test

All tests successful, 8 tests skipped.
Files=36,  Tests=370, 19 wallclock secs (13.20 cusr +  2.60 csys = 15.80 CPU)
kill `cat t/logs/httpd.pid`
rm -f t/logs/httpd.pid
rm -f t/logs/error_log

OK.  So now try with this with perl 5.005_03

69) %/usr/local/bin/perl5.00503 Makefile.PL \
? APACHE_PREFIX=$HOME/httpd_heavy \
? APACHE_SRC=../apache_1.3.9/src \
? DO_HTTPD=1 \
? USE_APACI=1 \
? EVERYTHING=1
[...]
make
make test

letting apache warm up...done
/usr/local/bin/perl5.00503 t/TEST 0
modules/actions.ok
modules/cgi.FAILED test 5
Failed 1/5 tests, 80.00% okay
modules/constants...ok
modules/cookie..skipping test on this platform
modules/fileok
modules/httpdconf...ok
modules/include.FAILED tests 2, 4
Failed 2/4 tests, 50.00% okay
modules/log.ok

79) %grep cgi.pl t/logs/error_log
Can't locate CGI.pm in @INC at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
BEGIN failed--compilation aborted at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
[Thu Dec 16 16:55:27 1999] [error] [client 127.0.0.1] Premature end of
script headers: /data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl
Can't locate CGI.pm in @INC at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
BEGIN failed--compilation aborted at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
[Thu Dec 16 16:55:30 1999] [error] [client 127.0.0.1] Premature end of
script headers: /data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl
Can't locate CGI.pm in @INC at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
BEGIN failed--compilation aborted at
/data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl line 3.
[Thu Dec 16 16:55:30 1999] [error] [client 127.0.0.1] Premature end of
script headers: /data/_g/lii/apache/src/heavy/mod_perl-1.21/t/net/perl/cgi.pl

125) ~ %/usr/local/bin/perl5.00503 -MCGI -e 'print $CGI::VERSION,"\n"'
2.46

Bill Moseley
mailto:[EMAIL PROTECTED]



Re: PerlModule/Require didn't work ??

1999-12-16 Thread Bill Marrs

This is the same problem I've been struggling with.

What has fixed it for me is building Apache and mod_perl from the tar 
archives and linking Apache statically (no .so's).

I haven't investigated much further, but even after I built Perl, Apache, 
and mod_perl by hand it still happened.  Only when I switch to a non-DSO 
Apache did it work for me.

-bill

At 03:39 PM 12/16/99 +, [EMAIL PROTECTED] wrote:
hi,

I was wondering why the PerlModule and perlRequire didn't work for me.
I have a fresh installation of :
apache 1.3.9 + mod_perl 1.21 (that is bundled in RedHat6.1),
what was my surprise to see that when I try to use something like :

PerlRequire .../startup.pl

or

PerlModule Apache::DBI Apache::ASP

the Apache won't start. When I start the apache i.e. :

/etc/rc.d/init.d/httpd start

I get  .. [OK]  , but nothing started nothing even in the error_log  :"(
(LogLevel debug).

I missed something or WHAT ?!?
I thought that it was 'cause now by default if Apache find suEXEC it runs in
suEXEC-mode, but I moved suEXEC and it dosen't use it then.

Another surprice was that if I go .../perl-status

..
Loaded Modules
...


I see CGI there, but I didn't point to it in .conf files.?!?!


Thanx alot in advance
=
iVAN
[EMAIL PROTECTED]
=