exit with alarm

2002-03-11 Thread Mark Maunder

I've written a rather large mod_perl app that initiates a bunch of
socket connects using a subclassed IO::Socket::INET. Every now and then
I'm getting this:

child pid 22743 exit signal Alarm clock (14)

It happens infrequently and I can't find a pattern of any kind. The
request that seems to cause it gets served up without any problems. I
supect something I'm using is setting $SIG{ALRM}, but I thought this was
fixed a while ago so that mod_perl saves SIGALRM for restoring at the
end of a request? (I'm running mod_perl 1.26)

thanks

Mark.





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: apache for windows/linux

2002-03-11 Thread Perrin Harkins

Wilfred Chan wrote:
 I am fairly new at 
 this and I just wanted to ask what you guys think the differences are 
 between running apache on Windows VS on linux.

The bottom line is that mod_perl has better performance on Linux because 
of threading issues on Windows.  There's a link to a writeup about this 
on the main mod_perl page.

- Perrin




Re: apache for windows/linux

2002-03-11 Thread Kurt Hansen

Wilfred Chan said:

 Hi, I have limited knowledge with http servers.  I was told that apache was
 the best a few years back and I tried apache with my Win98 OS at that time.
 I pretty much just edited the configurations so that the webpage will load
 and left everything in default.  I am fairly new at this and I just wanted
 to ask what you guys think the differences are between running apache on
 Windows VS on linux.  I am not good with linux.  Thanks!

Based on my own experience, if you have worked with Unix machines sometime in your
past -- it could be in your distant past --, choose Apache on Linux or any flavor
of Unix over Windows. Unix is far easier to comprehend than Windows, the
documentation is better, and the help more readily given and abundant. Oh yeah,
and more stable.

The key is that you need to read the documentation, starting with the INSTALL and
README files that come with most Open Source software. Also, investing in a few,
good reference manuals is a big help. O'Reilly (http://www.oreilly.com/) publishes
a lot of good manuals. Coming from the Windows world, you will be amazed at the
quality of the documentation that exists in Open Source.

I know I was, and I had used and supported Windows machines for almost a decade
before returning to Unix for mission-critical stuff.

One final piece of advice and why the [OT] is in my reply -- this list discusses
mod_perl, which is a module that can be used in Apache. The folks here are --
present writer excepted -- very knowledgeable, very helpful, and very polite.
However, your question would be best addressed to a pure Apache mailing list. A
description can be found here:

http://httpd.apache.org/userslist.html

or you can subscribe by mailing an empty message to the address below:

[EMAIL PROTECTED]

Take care,

Kurt Hansen
[EMAIL PROTECTED]





[OT] RE: apache for windows/linux

2002-03-11 Thread Jonathan M. Hollin

:: Based on my own experience, if you have worked with Unix 
:: machines sometime in your past -- it could be in your 
:: distant past --, choose Apache on Linux or any flavor of 
:: Unix over Windows. Unix is far easier to comprehend than 
:: Windows, the documentation is better, and the help more 
:: readily given and abundant. Oh yeah, and more stable.

Having just migrated my mod-perl software from Win2K to Linux I heartily
agree with Kurt.  With only very limited Unix knowledge, I have managed
to setup my server, secure it, and install and configure all the systems
I needed.  I have found the Linux brigade to be very knowledgeable, very
helpful and very willing to SHARE (thank you #Linux).  The quality and
volume of documentation will surprise you too.

Why did I migrate?  My Windows server (running Microsofts' latest and
greatest) rarely stayed up for longer than 48 consecutive hours.  My
Linux box has not been down since I installed (about 2 weeks ago).
Benchmarks also demonstrate a performance gain in my mod_perl apps of
around 20% over the same apps, in the same setup, under Windows.  I
expect to increase this with a little tweaking in the future.

All the best.


Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/ 




Apache::Session problem with DBD::Oracle

2002-03-11 Thread Brian Lavender

I am trying to install Apache::Session and it is failing on
the DBD::Oracle tests. It is asking for a default user. Do
I need to configure Oracle for a default user? Or do I need
to set some environment variable with a user id and password?

brian

Here are the errors I am getting:

t/99oracle..DBI-connect(sgum) failed: ORA-01004: default username feature not 
supported; logon denied (DBD ERROR: OCISessionBegin) at 
blib/lib/Apache/Session/Store/Oracle.pm line 45
(in cleanup) DBI-connect(sgum) failed: ORA-01004: default username feature 
not supported; logon denied (DBD ERROR: OCISessionBegin) at 
blib/lib/Apache/Session/Store/Oracle.pm line 45
t/99oracle..dubious  
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
-- 
Brian Lavender
http://www.brie.com/brian/



Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Geoffrey Young

Brian Lavender wrote:
 
 I am trying to install Apache::Session and it is failing on
 the DBD::Oracle tests. It is asking for a default user. Do
 I need to configure Oracle for a default user? Or do I need
 to set some environment variable with a user id and password?

well, looking at t/99oracle.t (line 45) it looks like you need to
define the following environment variables:

ORACLE_HOME (of course) 
AS_ORACLE_USER
AS_ORACLE_PASS

HTH

--Geoff



Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Ken Y. Clark

On Mon, 11 Mar 2002, Brian Lavender wrote:

 Date: Mon, 11 Mar 2002 11:24:35 -0800
 From: Brian Lavender [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Apache::Session problem with DBD::Oracle

 I am trying to install Apache::Session and it is failing on
 the DBD::Oracle tests. It is asking for a default user. Do
 I need to configure Oracle for a default user? Or do I need
 to set some environment variable with a user id and password?

 brian

 Here are the errors I am getting:

 t/99oracle..DBI-connect(sgum) failed: ORA-01004: default username feature 
not supported; logon denied (DBD ERROR: OCISessionBegin) at 
blib/lib/Apache/Session/Store/Oracle.pm line 45
 (in cleanup) DBI-connect(sgum) failed: ORA-01004: default username feature 
not supported; logon denied (DBD ERROR: OCISessionBegin) at 
blib/lib/Apache/Session/Store/Oracle.pm line 45
 t/99oracle..dubious
 Test returned status 255 (wstat 65280, 0xff00)
 DIED. FAILED tests 1-10
 Failed 10/10 tests, 0.00% okay


Oracle is fairly picky about the connection info.  Here's an example
of one I use:

use constant FooDataSource = 'dbi:Oracle:';
use constant FooDBUser = 
q{user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SID=sid)))};
use constant FooDBPassword = '';
use constant FooDBOptions  = {
RaiseError   = 1,
FetchHashKeyName = 'NAME_lc',
LongReadLen  = 3000,
LongTruncOk  = 1,
};

my $db = DBI-connect(FooDataSource, FooDBUser, FooDBPassword, FooDBOptions);

I'm also fairly sure that some environment variables should be set.
If I grep my env for ORA, I see:

ORACLE_SID=name changed to protect the innocent
ORACLE_BASE=/oracle1/app/oracle
ORACLE_HOME=/oracle1/app/oracle/product/8.0.5
ORACLE_TERM=xsun5

Obviously, the $ENV{'ORACLE_SID'} matches the SID in the FooDBUser
string.  The above string is used from a host other than the machine
that houses Oracle, so it may have more in it than you need if you're
on the same machine.

HTH,

ky




Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Brian Lavender

Yup, that fixed it. 

I have another problem with the File portion. Seems that the test
giving the following fail statements. I checked /tmp and there is a
lock file. I am not sure about how File::Store all works, and I couldn't
quite understand the test file either. Should I just

$ make install 

anyway?

t/99dbfile..File exists at t/99dbfile.t line 77.
t/99dbfile..dubious  
Test returned status 17 (wstat 4352, 0x1100)
after all the subtests completed successfully
t/99dbfilestore.File exists at t/99dbfilestore.t line 73.
t/99dbfilestore.dubious  
Test returned status 17 (wstat 4352, 0x1100)
after all the subtests completed successfully


On Mon, Mar 11, 2002 at 02:33:17PM -0500, Geoffrey Young wrote:
 Brian Lavender wrote:
  
  I am trying to install Apache::Session and it is failing on
  the DBD::Oracle tests. It is asking for a default user. Do
  I need to configure Oracle for a default user? Or do I need
  to set some environment variable with a user id and password?
 
 well, looking at t/99oracle.t (line 45) it looks like you need to
 define the following environment variables:
 
 ORACLE_HOME (of course) 
 AS_ORACLE_USER
 AS_ORACLE_PASS
 
 HTH
 
 --Geoff

-- 
Brian Lavender
http://www.brie.com/brian/



Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Brian Lavender

The tests were writing to an NFS mounted directory, and I think
NFS was creating some lock files which prevented the directory
from being written to. I moved the install to a non NFS mounted
area, and it all worked.

brian

On Mon, Mar 11, 2002 at 12:00:47PM -0800, Brian Lavender wrote:
 Yup, that fixed it. 
 
 I have another problem with the File portion. Seems that the test
 giving the following fail statements. I checked /tmp and there is a
 lock file. I am not sure about how File::Store all works, and I couldn't
 quite understand the test file either. Should I just
 
 $ make install 
 
 anyway?
 
 t/99dbfile..File exists at t/99dbfile.t line 77.
 t/99dbfile..dubious  
 Test returned status 17 (wstat 4352, 0x1100)
 after all the subtests completed successfully
 t/99dbfilestore.File exists at t/99dbfilestore.t line 73.
 t/99dbfilestore.dubious  
 Test returned status 17 (wstat 4352, 0x1100)
 after all the subtests completed successfully
 
 
 On Mon, Mar 11, 2002 at 02:33:17PM -0500, Geoffrey Young wrote:
  Brian Lavender wrote:
   
   I am trying to install Apache::Session and it is failing on
   the DBD::Oracle tests. It is asking for a default user. Do
   I need to configure Oracle for a default user? Or do I need
   to set some environment variable with a user id and password?
  
  well, looking at t/99oracle.t (line 45) it looks like you need to
  define the following environment variables:
  
  ORACLE_HOME (of course) 
  AS_ORACLE_USER
  AS_ORACLE_PASS
  
  HTH
  
  --Geoff
 
 -- 
 Brian Lavender
 http://www.brie.com/brian/

-- 
Brian Lavender
http://www.brie.com/brian/



Re: [OT] Thought for the Day

2002-03-11 Thread Ryan Parr

John mentions /usr/games/fortune -o, which will print offensive messages.
They are quite funny though. To use it without offensive messages (just
funny ones) just don't pass it options.
- Original Message -
From: John Eisenschmidt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 10, 2002 1:37 PM
Subject: Re: [OT] Thought for the Day






Can't locate TIEHASH Apache::Session::Oracle

2002-03-11 Thread Brian Lavender

I am trying to test the Apache::Session::Oracle

Here is the error I am getting. What is wrong? I was able to
successfully install and test Apache::Session which tested 
Apache::Session::Oracle

This is the error.

[Mon Mar 11 14:01:23 2002] [error] Can't locate object method TIEHASH via package 
Apache::Session::Oracle at /opt/apache/perl/example.perl line 33.

This is the code I am testing.

use strict;
use Apache;
use CGI;
use Apache::Session::File;

my $db_user = 'user';
my $db_pass = 'pass';

my $r = Apache-request();

$r-status(200);
$r-content_type(text/html);

my $session_id = $r-path_info();
$session_id =~ s/^\///;

$session_id = $session_id ? $session_id : undef;

my %session;

tie %session, 'Apache::Session::Oracle', $session_id, {
   DataSource = 'dbi:Oracle:sgum',
   UserName   = $db_user,
   Password   = $db_pass,
   Commit = 1
  };

my $input = CGI::param('input');
$session{name} = $input if $input;

print__EOS__;

Hellobr
Session ID number is: $session{_session_id}br
The Session ID is embedded in the URLbr
br
Your input to the form was: $inputbr
Your name is b$session{name}/bbr

br
a href=http://penguin:8080/perl/example.perl/$session{_session_id};Reload this 
session/abr
a href=http://penguin:8080/perl/example.perl;New session/a

form action=http://penguin:8080/perl/example.perl/$session{_session_id}; 
method=post
  Type in your name here:
  input name=input
  input type=submit value=Go!
/form
__EOS__

-- 
Brian Lavender
http://www.brie.com/brian/



Re: Can't locate TIEHASH Apache::Session::Oracle

2002-03-11 Thread Brian Lavender

On Mon, Mar 11, 2002 at 02:08:10PM -0800, Brian Lavender wrote:
 I am trying to test the Apache::Session::Oracle
 
 Here is the error I am getting. What is wrong? I was able to
 successfully install and test Apache::Session which tested 
 Apache::Session::Oracle
 
 This is the error.
 
 [Mon Mar 11 14:01:23 2002] [error] Can't locate object method TIEHASH via package 
Apache::Session::Oracle at /opt/apache/perl/example.perl line 33.
 
 This is the code I am testing.
 
 use strict;
 use Apache;
 use CGI;
 use Apache::Session::File;

Hmm, odd how I have a problem, and in the process of posting my question,
I figure it out. The above line just needs to be changed to:

use Apache::Session::Oracle;

and voila, it works.

brian
-- 
Brian Lavender
http://www.brie.com/brian/



Re: [OT] Thought for the Day

2002-03-11 Thread John Eisenschmidt

Sinister, aren't I? G


For the record I did email directly an explanation of what -o does and to exclude it 
for clean fortunes, and that it's more fun to make your own. I have quotes from all 
the Dogma movies that are called within my mod_perl index.html on my website. =)

Suddenly this thread is on-topic.

my $foo  = qx(/usr/games/fortune fooguy);

### replace newlines in fortunes with br's
$foo =~ s/\n/br/g;

print qq(font face=$font size=2$foo/fontbrbr);

Unless the Voices are Mistaken, Ryan Parr ([EMAIL PROTECTED]) Wrote:
 John mentions /usr/games/fortune -o, which will print offensive messages.
 They are quite funny though. To use it without offensive messages (just
 funny ones) just don't pass it options.
 - Original Message -
 From: John Eisenschmidt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, March 10, 2002 1:37 PM
 Subject: Re: [OT] Thought for the Day
 
 

-- 
John W. Eisenschmidt [EMAIL PROTECTED]
 Homepage URL| http://www.eisenschmidt.org/jweisen
 PGP Public Key  | http://www.eisenschmidt.org/jweisen/misc/jeisenschmidt.asc
 PGP Fingerprint | 5F9B F916 5AD1 3295 CF99 BC1E 1F97 E6A3 37E3 BEF2



msg25513/pgp0.pgp
Description: PGP signature


Re: [OT] Thought for the Day

2002-03-11 Thread Ryan Parr

I have the exact same thing set up for my website. Just without the dogma of
course :)

I'm thinking that I'll have to collect plenty of Deep Thoughts, to change
the general tone of my site.

-- Ryan
- Original Message -
From: John Eisenschmidt [EMAIL PROTECTED]
To: Ryan Parr [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 2:46 PM
Subject: Re: [OT] Thought for the Day






cvs commit: modperl-2.0/lib/ModPerl TypeMap.pm

2002-03-11 Thread stas

stas02/03/11 02:29:44

  Modified:lib/ModPerl TypeMap.pm
  Log:
  - check return value of map_type and die if undef, otherwise were getting
  'odd number of elements in hash' error.
  
  Revision  ChangesPath
  1.15  +6 -2  modperl-2.0/lib/ModPerl/TypeMap.pm
  
  Index: TypeMap.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TypeMap.pm6 Mar 2002 06:13:39 -   1.14
  +++ TypeMap.pm11 Mar 2002 10:29:44 -  1.15
   -223,10 +223,14 
   
   return unless $self-can_map($map, $func-{return_type},
map $_-{type}, { $func-{args} });
  +
  +my $type = $map-{return_type} || $func-{return_type} || 'void';
  +my $map_type = $self-map_type($type);
  +die unknown typemap: '$type' unless defined $map_type;
  +
   my $mf = {
  name= $func-{name},
  -   return_type = $self-map_type($map-{return_type} ||
  -  $func-{return_type} || 'void'),
  +   return_type = $map_type,
  args= $self-map_args($func),
  perl_name   = $map-{name},
  thx = $func-{thx},