child seg fault (11) with mod_perl as DSO (Sol 8, perl 5.6, gcc2.95.2)

2000-10-22 Thread Gary Goldberg


Hello. I am build a machine from scratch, so I've done this:

1. Installed clean Solaris 8 Intel.
2. Installed SFWgcc (2.95.2) from Solaris install.
3. Used Solaris-installed perl 5.005 to build perl 5.6 in /opt. (Everything
in /opt).
4. Used CPAN to install libnet, MD5, CPAN bundles.
5. Installed Mysql 3.23.26 into /opt.
6. Installed Bundle::Mysql, Bundle::Apache using CPAN.
7. Installed Berkeley db 3.1 into /opt.
8. Reinstalled perl 5.6 using -Ubincomat5005 enabling large file support.
8. Used clean dists of apache 1.3.14, php 4.03pl1, mod_perl 1.24.

   Built apache using suexec config, --enable=module=most --enable-shared-max
   with largefile support. Make, install.

   Built mod_perl using USE_APXS=1 WITH_APXS=/opt/apache/bin/apxs EVERYTHING=1
   and make, install.

   Built php4 using APXS. Make, install.

Everything seems fine, but when I try to access the status module or the
webroot home page I get "child exit segmentation fault (11)".

All previous messages in the list archive did not seem to apply, although
I tried their suggestions also. Nothing seems to work and I am stuck
here, Any ideaa? THanks to all in advance, -Gary



-- 
- "Two peanuts crossed the street. One was assaulted."
Gary Goldberg KA3ZYW <[EMAIL PROTECTED]>   V:301/249-6501 F:301/390-1955
Digital Marketing Inc., Bowie MD    ICQ:22569505




unscribe

2000-10-22 Thread Philip Tse





bidirectional pipe problem --- process doesn't see input

2000-10-22 Thread Darren Stuart Embry

Environment --- perl-5.6.0/mod_perl-1.24 on an apache-1.3.12 server.

Problem --- I'm trying to use the IPC::Open2 module to do a
bidirectional pipe in a mod_perl handler, but it is not working
properly.

What happens is that the program I want to read from/write to
doesn't see what I'm inputting into it but I can still see what
it's outputting.  So the program's running.  And that's even
though I'm autoflushing all input and output handles, both from
the parent and inside the script.

The same thing happens if I use pipe() and fork() manually, so I
don't think this is strictly a problem with IPC::Open2().

This problem does not occur if I'm using perl-5.005_03, all
other things (Apache version, mod_perl version) being equal.

This problem does also not occur when I run a program using such
code from the command line, all other things (perl version)
being equal.

Files included in this post, in order:

- WebOnAStick::Test::Test (don't ask about the name), a demo module I
  wrote which implements the two different forms of using a
  bidirectional pipe, and which also serves as the content handler.

- test-io, the program I want to read from and write to.

- test-io2, a command-line program that uses the demo Perl modoule to
  illustrate that bidirectional pipes work fine from the command line.

The content handler's output:

Input


This is a test.  foo.
This is another test.  foo.


Output 1


I received 0 lines.


Output 2


I received 0 lines.


The command line program's (test-io2) output:


{test-io was here}This is a test.  bar.
{test-io was here}This is another test.  bar.
I received 2 lines.


{test-io was here}This is a test.  bar.
{test-io was here}This is another test.  bar.
I received 2 lines.


Thanks a lot,
Darren



package WebOnAStick::Test::Test;
###-
### This module contains try_pipe_1() and try_pipe_2(), two different
### demonstrations of how to use a bidirectional pipe.  The first uses
### IPC::Open2(); the second uses pipe() and fork().  It also
### contains a mod_perl content handler to demonstrate that the code
### doesn't work properly when using perl-5.6.0/mod_perl-1.24.  This
### type of code works properly when using perl-5.005_03/mod_perl-1.24
### (well, you'd have to change the our declarations, obviously), and 
### it also works just fine from the command line.
###-
use strict;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw();
our @EXPORT_OK = qw(try_pipe_1 try_pipe_2);

use Apache::Constants qw(:common);
use IPC::Open2;
use IO::Handle;

sub try_pipe_1 {
my $input = shift();
my @pipe = ('/home/dse/bin/test-io');
my $rh = new IO::Handle; my $wh = new IO::Handle;
my $pid = open2($rh,$wh,@pipe); # can't pass undef handles under 5.005...
unless($pid) {
return (0,"open2 failed: $!\n");
}
$rh->autoflush(); $wh->autoflush();
$wh->print($input); $wh->close();
my $output = join('',<$rh>); $rh->close();
waitpid($pid,0);
return (1,$output);
}

sub try_pipe_2 {
my $input = shift();
my @pipe = ('/home/dse/bin/test-io');
my $r1 = new IO::Handle; my $w1 = new IO::Handle; pipe($r1,$w1);
my $r2 = new IO::Handle; my $w2 = new IO::Handle; pipe($r2,$w2);
$w1->autoflush(); $r2->autoflush();
$w2->autoflush(); $r1->autoflush();
my $pid = fork();
if (!defined($pid)) {
return (0,"could not fork: $!\n");
}
if (!$pid) {
# child: read from pipe1, write to pipe2
close($w1); close($r2);
open(STDIN,'<&='.fileno($r1));
open(STDOUT,'>&='.fileno($w2));
select(STDIN); $|=1;
select(STDOUT); $|=1;
exec(@pipe) or exit(86);
}
# parent: read from pipe2, write to pipe1
close($r1); close($w2);
$w1->print($input); $w1->close();
waitpid($pid,0);
my $output = join('',<$r2>); $r2->close();
return (1,$output);
}

use HTML::Entities;

sub handler {
my $r = shift();
my $input = "This is a test.  foo.\nThis is another test.  foo.\n";
my ($status1,$output1) = try_pipe_1($input);
if (!$status1) {
$r->log_error($output1);
return SERVER_ERROR;
}
my ($status2,$output2) = try_pipe_2($input);
if (!$status2) {
$r->log_error($output2);
return SERVER_ERROR;
}
$r->content_type('text/html');
$r->send_http_header();
$r->print("Input\n");
$r->print("".encode_entities($input)."\n\n");
$r->print("Output 1\n");
$r->print("".encode_entities($output1)."\n\n");
$r->print("Output 2\n");
$r->print("".encode_entities($output2)."\n\n");
return OK;
}

1;

==

DBD-Oracle

2000-10-22 Thread Daniel Hutchison

I just transplanted our website from a computer that had only Net8
installed, to a computer that has an entire Oracle Database installed.  As
far as I can tell I otherwise fully replicated the original system on the
new machine.

These errors are appearing in error_log:

[Sun Oct 22 14:03:49 2000] Carp.pm: Use of uninitialized value at
/usr/local/lib/perl5/5.6.0/Carp.pm
  line 119.
[Sun Oct 22 14:03:49 2000] Carp.pm: Use of inherited AUTOLOAD for non-method
  DBD::Oracle::ORA_OCI() is
deprecated at
 
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/DBD/Oracle.pm line 48.

I've done a search on the web that return this that seems to indicate the
AUTOLOAD error has something to do with LD_LIBRARY_PATH, but my I have set
that variable using both SetEnv and PerlSetEnv.  Any help would be
appreciated! Thanks.

Daniel Hutchison
Target Analysis Group
mailto:[EMAIL PROTECTED]  
617.583.8411



Re: IPC::Shareable (was Re: Perl module - LWP)

2000-10-22 Thread Steven Cotton

On Sat, 21 Oct 2000, Alexander Farber (EED) wrote:

> Is anybody successfully using it under Solaris or OpenBSD?
> "make test" hangs for me on these platforms and the module
> author is unreachable :-(

What version of Perl are you using? I had some problems with make test,
one of the tests doesn't return and I got a few munged shared memory
segment errors, I was attempting to install under Solaris 7 and Perl
5.6.0.

> If not IPC::Shareable, what module do you use for fast
> communication between Apache-children?

I started with IPC::SharedCache since it did most of what I wanted, but
took Sam Tregars advice and went with IPC::ShareLite (and serialised all
data myself with Storables freeze & thaw methods) and it works a dream.
One thing I couldn't seem to do was delete() tied IPC::Shareable hash
elements without getting the aforementioned "munged shared memory segment"
errors, which I can do with IPC::ShareLite.

-- 
steven




HELP: testing access with different methods

2000-10-22 Thread karnurme


Hello!

This seems like a simple thing, but somehow I cannot make it work... In
spite that this is propably a FAQ, I didn't find a solution.

How to test access to the given url with the given method?

For example, is the current user allowed to POST into
/some/dir/file.document ?

Sounds like a subrequest, but doesn't it need some method setting before
$r->lookup_uri?

Please, make my day!

-- 

Kari Nurmela,
[EMAIL PROTECTED], (02) 333 8847 / (0400) 786 547




Re: [ RFC ] New Module Apache::SessionManager

2000-10-22 Thread Greg Cope

Gunther Birznieks wrote:
> 
> I believe Greg is familiar with Apache::Session. There have been
> discussions about this before. A session manager manages the workflow
> around sessions. A session stores information. They are two different things.
> 
> In addition, I believe the name session manager has come up on this list
> before with regards to this.

That just about covers it.  Thanks Gunther

As for cpan, I have an aliase for th cpan shell, and excellent module.

Greg



> 
> Later,
> Gunther
> 
> At 07:04 PM 10/21/00 -0500, James G Smith wrote:
> >Check out Apache::Session, available on CPAN and see if your code
> >could be moulded to fit it's way of thinking.  If they are too
> >much different, then you might want to consider contacting the
> >module list to see if what you have is a good name (it probably
> >is) before going all out with distribution (and consider CPAN).
> >
> >For more information,
> >
> >http://www.cpan.org/modules/00modlist.long.html#Part1-Modules:C
> >
> >
> >
> >Greg Cope <[EMAIL PROTECTED]> wrote:
> > >Greg Cope wrote:
> > >>
> > >> Dear ALL
> > >>
> > >> I've writen a module that does transparent session management via either
> > >> Cookies, Munged URI or Query Args.
> > >>
> > >> It has quite a few options to change the behavour, and appears stable in
> > >> my developement environment.
> > >>
> > >> What I suggest is that unless there is a major objection I call it
> > >> Apache::SessionManager and set up a Source Forge project with the same
> > >> name.
> > >>
> > >> Unless there is a major issue I assume that by the weekend everyone whom
> > >> wants to will have made thier view clear and will hopefully go forward
> > >> from there.
> > >>
> > >> Regards
> > >>
> > >> Greg
> > >
> > >
> > >Dear All
> > >
> > >Not having heard anything bad about this I will go ahead a setup a
> > >sourceforge project.
> > >
> > >I also hot heard anything back from the poeple I sent a copy to, I can
> > >hence only assume that its so good that it's made them speachless ;-)
> > >
> > >Seriously, could poeple drop me a note as to how they found it ?  I do
> > >not want to go to all the trouble of writing docs / install files /
> > >source forge projects etc ... if its a load of rubbish and I am wasteing
> > >my time.
> > >
> > >Regards
> > >
> > >Greg Cope
> > >
> >
> >--
> >James Smith <[EMAIL PROTECTED]>, 979-862-3725
> >Texas A&M CIS Operating Systems Group, Unix
> 
> __
> Gunther Birznieks ([EMAIL PROTECTED])
> eXtropia - The Web Technology Company
> http://www.extropia.com/