cvs commit: modperl-2.0/t/response/TestAPI conn_rec.pm

2002-08-15 Thread stas

stas2002/08/15 01:42:55

  Modified:xs/Apache/Connection Apache__Connection.h
   xs/maps  modperl_functions.map apache_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
   t/response/TestAPI conn_rec.pm
  Log:
  add a wrapper for ap_get_remote_host + tests
  
  Revision  ChangesPath
  1.4   +8 -0  modperl-2.0/xs/Apache/Connection/Apache__Connection.h
  
  Index: Apache__Connection.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Apache__Connection.h  30 Jan 2002 03:30:24 -  1.3
  +++ Apache__Connection.h  15 Aug 2002 08:42:55 -  1.4
   -11,3 +11,11 
   
   return socket;
   }
  +
  +static MP_INLINE
  +char *mpxs_Apache__Connection_get_remote_host(pTHX_ conn_rec *c,
  +  int type,
  +  apr_table_t *dir_config)
  +{
  +return ap_get_remote_host(c, (void *)dir_config, type, NULL);
  +}
  
  
  
  1.40  +2 -0  modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- modperl_functions.map 21 May 2002 02:50:16 -  1.39
  +++ modperl_functions.map 15 Aug 2002 08:42:55 -  1.40
   -64,6 +64,8 
   
   MODULE=Apache::Connection
mpxs_Apache__Connection_client_socket | | c, s=NULL
  + mpxs_Apache__Connection_get_remote_host | | c, type=REMOTE_NAME, dir_config=Nullsv
  +
   
   MODULE=Apache::Filter
modperl_filter_attributes | MPXS_ | ... | MODIFY_CODE_ATTRIBUTES
  
  
  
  1.56  +0 -1  modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- apache_functions.map  24 May 2002 17:37:08 -  1.55
  +++ apache_functions.map  15 Aug 2002 08:42:55 -  1.56
   -170,7 +170,6 
ap_server_root_relative | mpxs_ | SV *:p, fname=
   
   MODULE=Apache::Connection   PACKAGE=guess
  - ap_get_remote_host
   #XXX: thought this might be useful for protocol modules
   #however it is not exported on win32
   !ap_read_request
  
  
  
  1.76  +22 -0 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- FunctionTable.pm  23 Jun 2002 21:28:15 -  1.75
  +++ FunctionTable.pm  15 Aug 2002 08:42:55 -  1.76
   -4305,6 +4305,28 
   ]
 },
 {
  +'return_type' = 'char *',
  +'name' = 'mpxs_Apache__Connection_get_remote_host',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'conn_rec *',
  +'name' = 'c'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'type'
  +  },
  +  {
  +'type' = 'apr_table_t *',
  +'name' = 'dir_config'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'apr_size_t',
   'name' = 'mpxs_Apache__Filter_print',
   'attr' = [
  
  
  
  1.6   +18 -2 modperl-2.0/t/response/TestAPI/conn_rec.pm
  
  Index: conn_rec.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/conn_rec.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- conn_rec.pm   11 Apr 2002 11:08:43 -  1.5
  +++ conn_rec.pm   15 Aug 2002 08:42:55 -  1.6
   -3,13 +3,15 
   use strict;
   use warnings FATAL = 'all';
   
  +use Apache::TestUtil;
   use Apache::Test;
   
   use Apache::RequestRec ();
   use Apache::RequestUtil ();
   use Apache::Connection ();
   
  -use Apache::Const -compile = 'OK';
  +use Apache::Const -compile = qw(OK REMOTE_HOST REMOTE_NAME
  +REMOTE_NOLOOKUP REMOTE_DOUBLE_REV);
   
   #this test module is only for testing fields in the conn_rec
   #listed in apache_structures.map
   -19,7 +21,7 
   
   my $c = $r-connection;
   
  -plan $r, tests = 15;
  +plan $r, tests = 22;
   
   ok $c;
   
   -56,6 +58,20 
   #input_filters
   #output_filters
   #remain
  +
  +# Connection utils (XXX: move to conn_utils.pm?)
  +
  +# $c-get_remote_host
  +ok $c-get_remote_host() || 1;
  +
  +for (Apache::REMOTE_HOST, 

cvs commit: modperl-2.0/t/response/TestCompat compat2.pm

2002-08-15 Thread stas

stas2002/08/15 01:44:26

  Modified:lib/Apache compat.pm
   t/response/TestCompat compat2.pm
  Log:
  $r-get_remote_host() compat wrapper ala mod_perl 1.0 + tests
  
  Revision  ChangesPath
  1.65  +5 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- compat.pm 31 Jul 2002 16:32:40 -  1.64
  +++ compat.pm 15 Aug 2002 08:44:26 -  1.65
   -127,6 +127,8 
   
   package Apache::RequestRec;
   
  +use Apache::Const -compile = qw(REMOTE_NAME);
  +
   #no longer exist in 2.0
   sub soft_timeout {}
   sub hard_timeout {}
   -201,7 +203,9 
   }
   
   sub get_remote_host {
  -shift-connection-remote_host(_);
  +my($r, $type) = _;
  +$type = Apache::REMOTE_NAME unless defined $type;
  +$r-connection-get_remote_host($type, $r-dir_config);
   }
   
   sub parse_args {
  
  
  
  1.2   +3 -2  modperl-2.0/t/response/TestCompat/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/compat2.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- compat2.pm14 Aug 2002 15:12:55 -  1.1
  +++ compat2.pm15 Aug 2002 08:44:26 -  1.2
   -10,7 +10,7 
   use Apache::Test;
   
   use Apache::compat ();
  -use Apache::Constants qw(OK);
  +use Apache::Constants qw(OK REMOTE_HOST);
   
   my %string_size = (
   '-1'= -,
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 51;
  +plan $r, tests = 52;
   
   $r-send_http_header('text/plain');
   
   -195,6 +195,7 
   
   # $r-get_remote_host
   ok $r-get_remote_host() || 1;
  +ok $r-get_remote_host(Apache::REMOTE_HOST) || 1;
   
   # Apache::Util::size_string
   {
  
  
  



cvs commit: modperl-2.0/t/response/TestCompat apache.pm apache_file.pm apache_table.pm apache_util.pm request.pm request_body.pm compat.pm compat2.pm

2002-08-15 Thread stas

stas2002/08/15 02:35:11

  Added:   t/compat request_body.t
   t/response/TestCompat apache.pm apache_file.pm
apache_table.pm apache_util.pm request.pm
request_body.pm
  Removed: t/compat compat.t
   t/response/TestCompat compat.pm compat2.pm
  Log:
  split compat tests into small groups by the package they test
  
  Revision  ChangesPath
  1.1  modperl-2.0/t/compat/request_body.t
  
  Index: request_body.t
  ===
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  
  use Apache::TestUtil;
  use Apache::TestRequest;
  
  plan tests = 3;
  
  my $location = /TestCompat::request_body;
  
  # $r-send_http_header('text/plain');
  {
  my data = (test = 'content-type');
  ok t_cmp(
  text/plain,
  HEAD(query(data))-content_type(),
  q{$r-send_http_header('text/plain')}
  );
  }
  
  # $r-content
  {
  my data = (test = 'content');
  my $content = join '=', data;
  ok t_cmp(
  data,
  POST_BODY($location, content = $content),
  q{$r-content via POST}
  );
  }
  
  # $r-Apache::args
  {
  my data = (test = 'args');
  ok t_cmp(
  data,
  GET_BODY(query(data)),
  q{$r-Apache::args}
  );
  }
  
  
  ### helper subs ###
  sub query {
  my(%args) = (_ % 2) ? %{+shift} : _;
  $location? . join '', map { $_=$args{$_} } keys %args;
  }
  
  # accepts multiline var where, the lines matching:
  # ^ok\n$  results in ok(1)
  # ^nok\n$ results in ok(0)
  # the rest is printed as is
  sub ok_nok {
  for (split /\n/, shift) {
  if (/^ok\n?$/) {
  ok 1;
  } elsif (/^nok\n?$/) {
  ok 0;
  } else {
  print $_\n;
  }
  }
  }
  
  
  
  1.1  modperl-2.0/t/response/TestCompat/apache.pm
  
  Index: apache.pm
  ===
  package TestCompat::apache;
  
  # Apache-method and Apache::function compat layer tests
  
  # these tests are all run and validated on the server side.
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::TestUtil;
  use Apache::Test;
  
  use Apache::compat ();
  use Apache::Constants qw(OK);
  
  sub handler {
  my $r = shift;
  
  plan $r, tests = 5;
  
  $r-send_http_header('text/plain');
  
  ### Apache- tests
  my $fh = Apache-gensym;
  ok t_cmp('GLOB', ref($fh), Apache-gensym);
  
  ok t_cmp(1, Apache-module('mod_perl.c'),
   Apache::module('mod_perl.c'));
  ok t_cmp(0, Apache-module('mod_ne_exists.c'),
   Apache::module('mod_ne_exists.c'));
  
  
  ok t_cmp(Apache::exists_config_define('MODPERL2'),
   Apache-define('MODPERL2'),
   'Apache-define');
  
  Apache::log_error(Apache::log_error test ok);
  ok 1;
  
  OK;
  }
  
  1;
  
  
  
  
  1.1  modperl-2.0/t/response/TestCompat/apache_file.pm
  
  Index: apache_file.pm
  ===
  package TestCompat::apache_file;
  
  # Apache::File compat layer tests
  
  # these tests are all run and validated on the server side.
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::TestUtil;
  use Apache::Test;
  
  use Apache::compat ();
  use Apache::Constants qw(OK);
  
  sub handler {
  my $r = shift;
  
  plan $r, tests = 18;
  
  $r-send_http_header('text/plain');
  
  my $cfg = Apache::Test::config();
  my $vars = $cfg-{vars};
  
  require Apache::File;
  my $file = $vars-{t_conf_file};
  
  t_debug new Apache::File file object;
  ok my $fh = Apache::File-new;
  
  t_debug open itself;
  if ($fh-open($file)) {
  ok 1;
  t_debug read from file;
  my $read = $fh;
  ok $read;
  t_debug close file;
  ok $fh-close;
  }
  else {
  t_debug open $file failed: $!;
  ok 0;
  t_debug ok: cannot read from the closed fh;
  ok 1;
  t_debug ok: close file should fail, wasn't opened;
  ok !$fh-close;
  }
  
  t_debug open non-exists;
  ok !$fh-open($file.nochance);
  
  t_debug new+open;
  if (my $fh = Apache::File-new($file)) {
  ok 1;
  $fh-close;
  }
  else {
  ok 0;
  }
  
  t_debug new+open non-exists;
  ok !Apache::File-new($file.yeahright);
  
  # tmpfile
  my ($tmpfile, $tmpfh) = Apache::File-tmpfile;
  
  t_debug open tmpfile fh;
  ok $tmpfh;
  
  t_debug open tmpfile name;
  ok $tmpfile;
  
  my $write = test $$;
  print $tmpfh $write;
  seek $tmpfh, 0, 0;
  ok t_cmp($write, scalar($tmpfh), write/read from tmpfile);
  
  ok t_cmp(Apache::OK,
   

cvs commit: modperl-2.0 Changes

2002-08-15 Thread stas

stas2002/08/15 02:48:53

  Modified:.Changes
  Log:
  document recent changes
  
  Revision  ChangesPath
  1.31  +14 -2 modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Changes   31 Jul 2002 16:32:40 -  1.30
  +++ Changes   15 Aug 2002 09:48:53 -  1.31
  @@ -10,9 +10,21 @@
   
   =item 1.99_05-dev
   
  -=item 1.99_04 - June 21, 2002
  +compat tests were split into groups by functionality.  [Stas Bekman]
  +
  +added $c-get_remote_host and a compat wrapper $r-get_remote_host +
  +tests [Stas Bekman]
  +
  +adjust the build system to support mod_perl build from the source
  +tree. [Stas Bekman]
   
  -added $r-get_remote_host to compat.pm + test [Stas Bekman]
  +ModPerl::RegistryCooker syncs with mod_perl 1.0's registry:
  + - prototypes defined checks in flush_namespace 
  +[Yair Lenga [EMAIL PROTECTED]]
  + - set error-notes on error [Geoff Young [EMAIL PROTECTED]]
  +
  +
  +=item 1.99_04 - June 21, 2002
   
   various APR PerlIO updates [Stas Bekman]
   
  
  
  



cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm RegistryCooker.pm

2002-08-15 Thread stas

stas2002/08/15 05:29:06

  Modified:ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm
RegistryCooker.pm
  Log:
  - replace the hardcoded cache and root namespaces with flexible methods
  - get rid of the CLASS attribute and no strict 'refs'
  - avoid starting the autogenerated package with __
  - make the helper function uncache_myself use the cache_table() method
  
  Revision  ChangesPath
  1.3   +23 -21modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm
  
  Index: PerlRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PerlRun.pm14 Aug 2002 14:27:03 -  1.2
  +++ PerlRun.pm15 Aug 2002 12:29:06 -  1.3
   -23,27 +23,29 
   # - speeds things up by shortcutting ISA search, so even if the
   #   default is used we still use the alias
   my %aliases = (
  - new = 'new',
  - init= 'init',
  - default_handler = 'default_handler',
  - run = 'run',
  - can_compile = 'can_compile',
  - make_namespace  = 'make_namespace',
  - namespace_from  = 'namespace_from_filename',
  - is_cached   = 'FALSE',
  - should_compile  = 'TRUE',
  - flush_namespace = 'flush_namespace_normal',
  - cache_it= 'NOP',
  - read_script = 'read_script',
  - rewrite_shebang = 'rewrite_shebang',
  - set_script_name = 'set_script_name',
  - chdir_file  = 'chdir_file_normal',
  - get_mark_line   = 'get_mark_line',
  - compile = 'compile',
  - error_check = 'error_check',
  - strip_end_data_segment = 'strip_end_data_segment',
  - convert_script_to_compiled_handler = 'convert_script_to_compiled_handler',
  -);
  +new = 'new',
  +init= 'init',
  +default_handler = 'default_handler',
  +run = 'run',
  +can_compile = 'can_compile',
  +make_namespace  = 'make_namespace',
  +namespace_root  = 'namespace_root_common',
  +namespace_from  = 'namespace_from_filename',
  +is_cached   = 'FALSE',
  +should_compile  = 'TRUE',
  +flush_namespace = 'flush_namespace_normal',
  +cache_table = 'cache_table_common',
  +cache_it= 'NOP',
  +read_script = 'read_script',
  +rewrite_shebang = 'rewrite_shebang',
  +set_script_name = 'set_script_name',
  +chdir_file  = 'chdir_file_normal',
  +get_mark_line   = 'get_mark_line',
  +compile = 'compile',
  +error_check = 'error_check',
  +strip_end_data_segment = 'strip_end_data_segment',
  +convert_script_to_compiled_handler = 'convert_script_to_compiled_handler',
  +);
   
   # in this module, all the methods are inherited from the same parent
   # class, so we fixup aliases instead of using the source package in
  
  
  
  1.4   +23 -21modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm
  
  Index: Registry.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Registry.pm   14 Aug 2002 14:27:03 -  1.3
  +++ Registry.pm   15 Aug 2002 12:29:06 -  1.4
   -22,27 +22,29 
   # - speeds things up by shortcutting ISA search, so even if the
   #   default is used we still use the alias
   my %aliases = (
  - new = 'new',
  - init= 'init',
  - default_handler = 'default_handler',
  - run = 'run',
  - can_compile = 'can_compile',
  - make_namespace  = 'make_namespace',
  - namespace_from  = 'namespace_from_filename',
  - is_cached   = 'is_cached',
  - should_compile  = 'should_compile_if_modified',
  - flush_namespace = 'NOP',
  - cache_it= 'cache_it',
  - read_script = 'read_script',
  - rewrite_shebang = 'rewrite_shebang',
  - set_script_name = 'set_script_name',
  - chdir_file  = 'chdir_file_normal',
  - get_mark_line   = 'get_mark_line',
  - compile = 'compile',
  - error_check = 'error_check',
  - strip_end_data_segment = 'strip_end_data_segment',
  - convert_script_to_compiled_handler = 'convert_script_to_compiled_handler',
  -);
  +new = 'new',
  +init= 'init',
  +default_handler = 'default_handler',
  +run = 'run',
  +can_compile = 'can_compile',
  +make_namespace  = 'make_namespace',
  +namespace_root  = 'namespace_root_common',
  +namespace_from  = 'namespace_from_filename',
  +is_cached   = 'is_cached',
  +should_compile  = 'should_compile_if_modified',
  +flush_namespace 

cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl RegistryCooker.pm

2002-08-15 Thread stas

stas2002/08/15 05:34:20

  Modified:ModPerl-Registry/lib/ModPerl RegistryCooker.pm
  Log:
  s/$o/$self/g, $o looks silly
  
  Revision  ChangesPath
  1.14  +113 -113  modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RegistryCooker.pm 15 Aug 2002 12:29:06 -  1.13
  +++ RegistryCooker.pm 15 Aug 2002 12:34:20 -  1.14
   -87,9 +87,9 
   
   sub new {
   my($class, $r) = _;
  -my $o = bless [], $class;
  -$o-init($r);
  -return $o;
  +my $self = bless [], $class;
  +$self-init($r);
  +return $self;
   }
   
   #
   -129,42 +129,42 
   # func: default_handler
   # dflt: META: see above
   # desc: META: see above
  -# args: $o - registry blessed object
  +# args: $self - registry blessed object
   # rtrn: handler's response status
   # note: that's what most sub-class handlers will call
   #
   
   sub default_handler {
  -my $o = shift;
  +my $self = shift;
   
  -$o-make_namespace;
  +$self-make_namespace;
   
  -if ($o-should_compile) {
  -my $rc = $o-can_compile;
  +if ($self-should_compile) {
  +my $rc = $self-can_compile;
   return $rc unless $rc == Apache::OK;
  -$rc = $o-convert_script_to_compiled_handler;
  +$rc = $self-convert_script_to_compiled_handler;
   return $rc unless $rc == Apache::OK;
   }
   
  -return $o-run;
  +return $self-run;
   }
   
   #
   # func: run
   # dflt: run
   # desc: executes the compiled code
  -# args: $o - registry blessed object
  +# args: $self - registry blessed object
   # rtrn: execution status (Apache::?)
   #
   
   sub run {
  -my $o = shift;
  +my $self = shift;
   
  -my $r   = $o-[REQ];
  -my $package = $o-[PACKAGE];
  +my $r   = $self-[REQ];
  +my $package = $self-[PACKAGE];
   
  -$o-set_script_name;
  -$o-chdir_file;
  +$self-set_script_name;
  +$self-chdir_file;
   
   my $rc = Apache::OK;
   my $cv = \{$package\::handler};
   -172,15 +172,15 
   { # run the code and preserve warnings setup when it's done
   no warnings;
   eval { $rc = {$cv}($r, _) };
  -$o-[STATUS] = $rc;
  +$self-[STATUS] = $rc;
   ModPerl::Global::special_list_call(END = $package);
   }
   
  -$o-flush_namespace;
  +$self-flush_namespace;
   
  -#$o-chdir_file($Apache::Server::CWD/);
  +#$self-chdir_file($Apache::Server::CWD/);
   
  -if ( ($rc = $o-error_check) != Apache::OK) {
  +if ( ($rc = $self-error_check) != Apache::OK) {
   return $rc;
   }
   
   -193,37 +193,37 
   # func: can_compile
   # dflt: can_compile
   # desc: checks whether the script is allowed and can be compiled
  -# args: $o - registry blessed object
  +# args: $self - registry blessed object
   # rtrn: $rc - return status to forward
   # efct: initializes the data object's fields: MTIME
   #
   
   sub can_compile {
  -my $o = shift;
  -my $r = $o-[REQ];
  +my $self = shift;
  +my $r = $self-[REQ];
   
   unless (-r $r-finfo  -s _) {
  -$o-log_error($o-[FILENAME] not found or unable to stat);
  +$self-log_error($self-[FILENAME] not found or unable to stat);
return Apache::NOT_FOUND;
   }
   
   return Apache::DECLINED if -d _;
   
  -$o-[MTIME] = -M _;
  +$self-[MTIME] = -M _;
   
   unless (-x _ or IS_WIN32) {
   $r-log_reason(file permissions deny server execution,
  -   $o-[FILENAME]);
  +   $self-[FILENAME]);
   return Apache::FORBIDDEN;
   }
   
   if (!($r-allow_options  Apache::OPT_EXECCGI)) {
   $r-log_reason(Options ExecCGI is off in this directory,
  -   $o-[FILENAME]);
  +   $self-[FILENAME]);
   return Apache::FORBIDDEN;
   }
   
  -$o-debug(can compile $o-[FILENAME]) if DEBUG  D_NOISE;
  +$self-debug(can compile $self-[FILENAME]) if DEBUG  D_NOISE;
   
   return Apache::OK;
   
   -232,7 +232,7 
   # func: namespace_root
   # dflt: namespace_root_common
   # desc: define the namespace root for storing compiled scripts
  -# args: $o - registry blessed object
  +# args: $self - registry blessed object
   # rtrn: the namespace root
   

cvs commit: modperl-2.0/t/response/TestAPI send_fd.pm

2002-08-15 Thread stas

stas2002/08/15 06:11:06

  Added:   t/compat send_fd.t
   t/response/TestCompat send_fd.pm
  Removed: t/apisend_fd.t
   t/response/TestAPI send_fd.pm
  Log:
  send_fd exists only in compat, move that test into compat/
  
  Revision  ChangesPath
  1.1  modperl-2.0/t/compat/send_fd.t
  
  Index: send_fd.t
  ===
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  use Apache::TestRequest;
  
  plan tests = 3;
  
  my $config = Apache::Test::config();
  
  my $url = '/TestCompat::send_fd';
  
  my $data = GET_BODY($url);
  
  ok $data;
  
  my $module = 'response/TestCompat/send_fd.pm';
  
  ok length($data) == -s $module;
  
  $data = GET_BODY($url?noexist.txt);
  
  ok $data =~ /Not Found/;
  
  
  
  1.1  modperl-2.0/t/response/TestCompat/send_fd.pm
  
  Index: send_fd.pm
  ===
  package TestCompat::send_fd;
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::compat ();
  use Apache::RequestRec ();
  
  use Apache::Const -compile = ':common';
  
  sub handler {
  my $r = shift;
  
  my $file = $r-args || __FILE__;
  
  open my $fh, $file or return Apache::NOT_FOUND;
  
  my $bytes = $r-send_fd($fh);
  
  return Apache::SERVER_ERROR unless $bytes == -s $file;
  
  Apache::OK;
  }
  
  1;
  
  
  



cvs commit: modperl-2.0 STATUS

2002-08-15 Thread stas

stas2002/08/15 08:22:02

  Modified:.STATUS
  Log:
  add several from the many outstanding issues
  
  Revision  ChangesPath
  1.6   +24 -2 modperl-2.0/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/modperl-2.0/STATUS,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- STATUS21 Jun 2002 22:25:48 -  1.5
  +++ STATUS15 Aug 2002 15:22:02 -  1.6
  @@ -31,11 +31,21 @@
   --
   
   * Fixing Apache-warn(foo)
  -  Report: Message-ID: [EMAIL PROTECTED]
  +
  +  Report: 
http:[EMAIL PROTECTED]
  +  Thread: http://mathforum.org/epigone/modperl-dev/noxtramcay
 Status: pending Apache::Log compat issues, this and other methods
 might be dropped.
   
   
  +* The Apache::Scoreboard XS implemenation with tests is awaiting to be
  +  committed
  +
  +  Report: 
http:[EMAIL PROTECTED]
  +  Status: waiting for Doug's review
  +
  +
  +
   * 
 Report: 
 Status: 
  @@ -70,9 +80,21 @@
   
   
   
  +* we need a bug reporting utility that can be used post-install, which
  +  should be similar to t/REPORT
  +
  +  Report: 
http:[EMAIL PROTECTED]
  +  thread: http://mathforum.org/epigone/modperl-dev/staiblirroo
  +  Status: +1: Stas, Doug
  +  needs to be implemented
  +
  +
  +
   * 
 Report: 
 Status: 
  +
  +
   
   Documentation:
   --
  
  
  



cvs commit: modperl-2.0 Changes

2002-08-15 Thread stas

stas2002/08/15 08:25:04

  Modified:.Changes
  Log:
  document recent changes
  
  Revision  ChangesPath
  1.32  +7 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Changes   15 Aug 2002 09:48:53 -  1.31
  +++ Changes   15 Aug 2002 15:25:04 -  1.32
  @@ -10,7 +10,12 @@
   
   =item 1.99_05-dev
   
  -compat tests were split into groups by functionality.  [Stas Bekman]
  +core Registry packages all compile the scripts into
  +ModPerl::RegistryROOT:: namespace and cache them in
  +%ModPerl::RegistryCache. Both overridable by the sub-classes. [Stas Bekman]
  +
  +compat tests were split into groups by functionality, send_fd test
  +moved to compat.  [Stas Bekman]
   
   added $c-get_remote_host and a compat wrapper $r-get_remote_host +
   tests [Stas Bekman]
  @@ -22,6 +27,7 @@
- prototypes defined checks in flush_namespace 
   [Yair Lenga [EMAIL PROTECTED]]
- set error-notes on error [Geoff Young [EMAIL PROTECTED]]
  + - preserve status in Registry scripts [Geoff Young [EMAIL PROTECTED]]
   
   
   =item 1.99_04 - June 21, 2002
  
  
  



cvs commit: modperl-2.0/ModPerl-Registry TODO

2002-08-15 Thread stas

stas2002/08/15 09:16:24

  Modified:ModPerl-Registry TODO
  Log:
  issues that have been taken care of
  
  Revision  ChangesPath
  1.8   +1 -9  modperl-2.0/ModPerl-Registry/TODO
  
  Index: TODO
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/TODO,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TODO  7 Dec 2001 18:12:17 -   1.7
  +++ TODO  15 Aug 2002 16:16:24 -  1.8
   -6,15 +6,11 
   
   ### bugs ###
   
  -- prototyping sub handler($$) segfaults on request
  -
   - consider not to use $$ in debug tracing. Not all platforms give out
 a different pid for different threads.
   
   ### missing features ###
   
  -- need to properly handle HEAD requests 
  -
   - need to port $Apache::__T, to test against when user supplies -T flag.
   
   - port Apache::PerlRunXS
   -53,10 +49,6 
   
   ### optimizations ###
   
  -- $o-[CLASS] of the subclass is known at compile time, so should
  -  create the subs using $o-[CLASS] on the fly for each subclass
  -  which wants them
  -
   - currently the default is to strip __DATA__|__END__ and everything
 after that, which incurs a little overhead because of the s/// on
 the contents of the file. This feature wasn't in 1.x, so may
   -88,7 +80,7 
   
   - could also try to privide an optional workaround for the problem
 with libs collisions as explained here:
  -  http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and
  +  
http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and
   
   - It's a known kludge with mod_perl scripts coming from mod_cgi which
 use -M for file mtime comparisons, but are not aware of the fact
  
  
  



cvs commit: modperl-2.0/ModPerl-Registry/t/conf extra.conf.in

2002-08-15 Thread stas

stas2002/08/15 09:17:53

  Modified:ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm
RegistryBB.pm RegistryCooker.pm
   ModPerl-Registry/t basic.t
   ModPerl-Registry/t/conf extra.conf.in
  Log:
  method handlers are now working
  
  Revision  ChangesPath
  1.4   +1 -2  modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm
  
  Index: PerlRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PerlRun.pm15 Aug 2002 12:29:06 -  1.3
  +++ PerlRun.pm15 Aug 2002 16:17:52 -  1.4
   -10,8 +10,7 
   
   use base qw(ModPerl::RegistryCooker);
   
  -# META: prototyping ($$) segfaults on request
  -sub handler {
  +sub handler : method {
   my $class = (_ = 2) ? shift : __PACKAGE__;
   my $r = shift;
   return $class-new($r)-default_handler();
  
  
  
  1.5   +1 -1  modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm
  
  Index: Registry.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Registry.pm   15 Aug 2002 12:29:06 -  1.4
  +++ Registry.pm   15 Aug 2002 16:17:52 -  1.5
   -10,7 +10,7 
   
   use base qw(ModPerl::RegistryCooker);
   
  -sub handler {
  +sub handler : method {
   my $class = (_ = 2) ? shift : __PACKAGE__;
   my $r = shift;
   return $class-new($r)-default_handler();
  
  
  
  1.4   +1 -2  modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm
  
  Index: RegistryBB.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RegistryBB.pm 14 Aug 2002 14:27:03 -  1.3
  +++ RegistryBB.pm 15 Aug 2002 16:17:52 -  1.4
   -10,8 +10,7 
   
   use base qw(ModPerl::RegistryCooker);
   
  -# META: prototyping ($$) segfaults on request
  -sub handler {
  +sub handler : method {
   my $class = (_ = 2) ? shift : __PACKAGE__;
   my $r = shift;
   return $class-new($r)-default_handler();
  
  
  
  1.17  +2 -2  modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RegistryCooker.pm 15 Aug 2002 14:26:10 -  1.16
  +++ RegistryCooker.pm 15 Aug 2002 16:17:52 -  1.17
   -119,10 +119,10 
   #   __PACKAGE__, which is tied to the file)
   #
   
  -sub handler {
  +sub handler : method {
   my $class = (_ = 2) ? shift : __PACKAGE__;
   my $r = shift;
  -$class-new($r)-default_handler();
  +return $class-new($r)-default_handler();
   }
   
   #
  
  
  
  1.7   +10 -1 modperl-2.0/ModPerl-Registry/t/basic.t
  
  Index: basic.t
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- basic.t   14 Aug 2002 14:27:45 -  1.6
  +++ basic.t   15 Aug 2002 16:17:52 -  1.7
   -14,7 +14,7 
   
   my aliases = sort keys %modules;
   
  -plan tests = aliases * 3;
  +plan tests = aliases * 3 + 1;
   
   # very basic compilation/response test
   for my $alias (aliases) {
   -62,3 +62,12 
   #);
   #}
   
  +# test method handlers
  +{
  +my $url = /registry_oo_conf/env.pl?foo=bar;
  +ok t_cmp(
  +foo=bar,
  +GET_BODY($url),
  +ModPerl::Registry-handler mod_cgi-like environment pre-set,
  +);
  +}
  
  
  
  1.7   +0 -1  modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in
  
  Index: extra.conf.in
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- extra.conf.in 2 Jun 2002 12:58:35 -   1.6
  +++ extra.conf.in 15 Aug 2002 16:17:52 -  1.7
   -53,7 +53,6 
   PerlOptions +ParseHeaders
   /Location
   
  -# META: dumps core on OO handlers
   Location /registry_oo_conf
   PerlOptions +GlobalRequest
   SetHandler perl-script
  
  
  



cvs commit: modperl-2.0/t/api .cvsignore

2002-08-15 Thread stas

stas2002/08/15 20:19:44

  Modified:t/apache .cvsignore
   t/api.cvsignore
  Added:   t/compat .cvsignore
  Log:
  .cvsignore updates
  
  Revision  ChangesPath
  1.1  modperl-2.0/t/compat/.cvsignore
  
  Index: .cvsignore
  ===
  apache.t
  apache_file.t
  apache_table.t
  apache_util.t
  request.t
  
  
  
  1.5   +0 -2  modperl-2.0/t/apache/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/apache/.cvsignore,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- .cvsignore25 Jan 2002 08:17:58 -  1.4
  +++ .cvsignore16 Aug 2002 03:19:44 -  1.5
   -1,6 +1,4 
   cgihandler.t
  -compat.t
  -compat2.t
   conftree.t
   constants.t
   post.t
  
  
  
  1.4   +0 -1  modperl-2.0/t/api/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/api/.cvsignore,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- .cvsignore4 Dec 2001 22:44:29 -   1.3
  +++ .cvsignore16 Aug 2002 03:19:44 -  1.4
   -8,7 +8,6 
   response.t
   r_subclass.t
   rutil.t
  -send_fd.t
   sendfile.t
   server_rec.t
   server_util.t
  
  
  



DBI make apache fail in perl58.dll

2002-08-15 Thread pascal barbedor



Hi 

the following startup.pl
makes apache segfault in perl58.dll on windows 
XP(or 2000)

version are : 
apache 2.0.40-dev
perl 5.8.0
modperl 1.99
mysqld-nt 3.23.49

DBI 1.30
DBD::Mysql 2.1017

from perl 5.8-win32-bin.tar.gz ready-to-use RK 
archive (date 25/07/02) in theoryx5.uwinnipeg.ca/public/other

here is the startup (only added lines after #added, 
everything works fine without):



use Apache2 ();use ModPerl::Util ();use 
Apache::RequestRec ();use Apache::RequestIO ();use Apache::RequestUtil 
();use Apache::Server ();use Apache::ServerUtil ();use 
Apache::Connection ();use Apache::Log ();use Apache::Const -compile 
= ':common';use APR::Const -compile = ':common';use APR::Table 
();use Apache::compat ();use ModPerl::Registry ();use CGI 
();

#added

use DBI();use DBD::Mysql();1;



- apache fails the same if use DBI() line alone or use DBD::Mysql() line 
alone
- same from a registry script


use DBI();use DBD::Mysql();
does not fail from a regularly perl script outside apache


thanks
pascal


Re: mod_perl + Apache::PageKit on Win32 problems

2002-08-15 Thread Randy Kobes

On Thu, 15 Aug 2002, Anton Permyakov wrote:

 Hello everybody,
 
 I try to install Apache::PageKit on Win32 Apache+mod_perl. I've
 installed all that's needed from perl-win32-bin-0.8.exe,
 install all packages needed for Apache::PageKit and itself
 (without PPD file, just by copying *.pm files).
 
 When i start Apache - it closes with error: Memory Access Violation.
 
 Can anyone help? By the way - how is it possible to create
 Apache-PageKit.ppd file (for ActiveState PPM)? What is needed
 for this?
 
 Thank you,
 Anton.

It may be that some of the .pm files weren't installed in the
expected loactions ... I just put up an Apache-PageKit ppm
package in our repository at
   http://theoryx5.uwinnipeg.ca/ppmpackages/
which I think includes all the required packages not
found in ActiveState's repository. Perhaps give that a
try to see if that helps.

-- 
best regards,
randy kobes




Re: mod_perl + Apache::PageKit on Win32 problems

2002-08-15 Thread Anton Permyakov

Randy, thank you,
now it looks like it will work... but my project also uses following
packages i could not install with PPM:

Class::DBI
Class::DBI::Extension
Ima::DBI

There are ppd for Class::DBI and Ima::DBI, but PPM says they are not for
this build of Perl (MSWin32-x86-multi-thread).
Is it diffucult to create ppd files from tar.gz files?
Can i do it by myself?

Anton.


- Original Message -
From: Randy Kobes [EMAIL PROTECTED]
To: Anton Permyakov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 15, 2002 1:01 PM
Subject: Re: mod_perl + Apache::PageKit on Win32 problems


 On Thu, 15 Aug 2002, Anton Permyakov wrote:

  Hello everybody,
 
  I try to install Apache::PageKit on Win32 Apache+mod_perl. I've
  installed all that's needed from perl-win32-bin-0.8.exe,
  install all packages needed for Apache::PageKit and itself
  (without PPD file, just by copying *.pm files).
 
  When i start Apache - it closes with error: Memory Access Violation.
 
  Can anyone help? By the way - how is it possible to create
  Apache-PageKit.ppd file (for ActiveState PPM)? What is needed
  for this?
 
  Thank you,
  Anton.

 It may be that some of the .pm files weren't installed in the
 expected loactions ... I just put up an Apache-PageKit ppm
 package in our repository at
http://theoryx5.uwinnipeg.ca/ppmpackages/
 which I think includes all the required packages not
 found in ActiveState's repository. Perhaps give that a
 try to see if that helps.

 --
 best regards,
 randy kobes






apache2, DBD/Oracle problem

2002-08-15 Thread Fredo Sartori

Hi, 

I have problems connecting to an Oracle-DB through apache2. A test
script, that works fine when run directly from the shell, fails to
connect to the Orcacle DB, when run through apache. As far as I can see,
the SID is not passed to the DB server. 

. 
The foolowing message is found in the error log: 

[Thu Aug 15 09:25:46 2002] [error] 27824: ModPerl::Registry:
`DBI-connect(sun1) failed: Error while trying to retrieve text for
error ORA-12505 (DBD ERROR: OCIServerAttach) at
/server/apache-dev/perl/test-oracle line 23 
' 

... 
the log file  of the Oracle listener on the DB box ahows: 


15-AUG-02 09:25:46 *
(CONNECT_DATA=(SID=*)(SERVICE_NAME=sun1.)(CID=(PROGRAM=)(HOST=ollenhauer)(USER=www-adm)))
 * (ADDRESS=(PROTOCOL=tcp)(HOST=172.22.250.27)(PORT=53048)) sh * * * 0 

.. 
The following versions are used: 
apache 2.0.39 
mod_perl: 1.99_04 
DBI: 1.30 
DBD-Oracle: 1.12 


. 
#sample script: 
#!/usr/local/bin/perl -w 

BEGIN { 
$ENV{ORACLE_HOME} = '/opt/oracle/app/product/8.1.6'; 
$ENV{ORACLE_SID}  = 'SPD'; 
} 

use CGI; 

use DBI;   

  
my $db_name = 'dbi:Oracle:sun1';  
my $db_user = 'webuser'; 
my $db_pass = 'topsecret'; 

my $q=CGI-new; 

my $dbh = DBI-connect($db_name, $db_user, $db_pass, 
   {LongReadLen = 65534, 
RaiseError  = 1, 
AutoCommit  = 0}); 

my $query = q{ 
SELECT count (*) 
FROM asdb_mgr.stammdaten14 
WHERE bis is null  }; 

my $sth = $dbh-prepare($query); 

my $rc  = $sth-execute(); 

my $count = $sth-fetchrow_array; 

print $q-header; 
print Anzahl der SPD-MdBs: $count\n; 

$sth-finish; 

$dbh-disconnect; 

... 
httpd.conf: 

Alias /perl  /server/apache-dev/perl 
IfModule mod_perl.c 

  PerlRequire /server/apache-dev/conf/perl-startup.pl 

Location /perl 
   SetHandler   perl-script 
   PerlResponseHandler ModPerl::Registry 
   PerlOptions +ParseHeaders 
   Options  +ExecCGI 
/Location 

/IfModule 

.. 
perl-startup.sh: 

#  file:perl-startup.pl 
#  --- 
  use Apache2 (); 
  use Apache::compat (); 
  
  use lib qw(/server/apache-dev/perl/); 
  
  
  use ModPerl::Util ();   
  use Apache::RequestRec (); 
  use Apache::RequestIO (); 
  use Apache::RequestUtil (); 
  
  use Apache::Server (); 
  use Apache::ServerUtil (); 
  use Apache::Connection (); 
  use Apache::Log (); 
  
  use APR::Table (); 
  
  use ModPerl::Registry (); 
  
  use Apache::Const -compile = ':common'; 
  use APR::Const -compile = ':common'; 
  
  1; 

.. 


Thanks, 

Fredo 

-- 
Dr. Fredo SartoriTel. 030-227-55061
SPD-Fraktion im Deutschen Bundestag  FAX  030-227-56169
Platz der Republik   e-mail: [EMAIL PROTECTED]
11011 Berlin




Re: mod_perl + Apache::PageKit on Win32 problems

2002-08-15 Thread Randy Kobes

On Thu, 15 Aug 2002, Anton Permyakov wrote:

 Randy, thank you,
 now it looks like it will work... but my project also uses following
 packages i could not install with PPM:
 
 Class::DBI
 Class::DBI::Extension
 Ima::DBI
 
 There are ppd for Class::DBI and Ima::DBI, but PPM says they are not for
 this build of Perl (MSWin32-x86-multi-thread).
 Is it diffucult to create ppd files from tar.gz files?
 Can i do it by myself?
 
 Anton.

It isn't that difficult, at least for distributions that don't
need a C compiler. But if there are no ppm packages available,
it's worth setting up the CPAN.pm module to build things -
   C:\ perl -MCPAN -e shell
will start things off. You'll need 'nmake' as your make
program, which you can get from
  ftp://ftp.microsoft.com/softlib/mslfiles/nmake15.exe 
as a self-extracting archive. One nice thing about CPAN.pm is 
that it will follow and build for you any required dependencies.

-- 
best regards,
randy




Re: apache2, DBD/Oracle problem

2002-08-15 Thread Mike P. Mikhailov

Hello Fredo Sartori,

You are connecting to Oracle with service specified in connect
string. Does this service resolves correctly with tnsping ?

Does this code work correctly as regular perl script ?

Thursday, August 15, 2002, 1:44:34 PM, you wrote:

FS Hi, 

FS I have problems connecting to an Oracle-DB through apache2. A test
FS script, that works fine when run directly from the shell, fails to
FS connect to the Orcacle DB, when run through apache. As far as I can see,
FS the SID is not passed to the DB server. 

FS . 
FS The foolowing message is found in the error log: 

FS [Thu Aug 15 09:25:46 2002] [error] 27824: ModPerl::Registry:
`DBI-connect(sun1) failed: Error while trying to retrieve text for
FS error ORA-12505 (DBD ERROR: OCIServerAttach) at
FS /server/apache-dev/perl/test-oracle line 23 
FS ' 

FS ... 
FS the log file  of the Oracle listener on the DB box ahows: 


FS 15-AUG-02 09:25:46 *
FS 
(CONNECT_DATA=(SID=*)(SERVICE_NAME=sun1.)(CID=(PROGRAM=)(HOST=ollenhauer)(USER=www-adm)))
 * (ADDRESS=(PROTOCOL=tcp)(HOST=172.22.250.27)(PORT=53048)) sh * * * 0 

FS .. 
FS The following versions are used: 
FS apache 2.0.39 
FS mod_perl: 1.99_04 
FS DBI: 1.30 
FS DBD-Oracle: 1.12 


FS . 
FS #sample script: 
FS #!/usr/local/bin/perl -w 

FS BEGIN { 
FS $ENV{ORACLE_HOME} = '/opt/oracle/app/product/8.1.6'; 
FS $ENV{ORACLE_SID}  = 'SPD'; 
FS } 

FS use CGI; 

FS use DBI;   

  
FS my $db_name = 'dbi:Oracle:sun1';  
FS my $db_user = 'webuser'; 
FS my $db_pass = 'topsecret'; 

my $q=CGI-new; 

my $dbh = DBI-connect($db_name, $db_user, $db_pass, 
FS{LongReadLen = 65534, 
FS RaiseError  = 1, 
FS AutoCommit  = 0}); 

FS my $query = q{ 
FS SELECT count (*) 
FS FROM asdb_mgr.stammdaten14 
FS WHERE bis is null  }; 

my $sth = $dbh-prepare($query); 

my $rc  = $sth-execute(); 

my $count = $sth-fetchrow_array; 

print $q-header; 
FS print Anzahl der SPD-MdBs: $count\n; 

$sth-finish; 

$dbh-disconnect; 

FS ... 
FS httpd.conf: 

FS Alias /perl  /server/apache-dev/perl 
FS IfModule mod_perl.c 

FS   PerlRequire /server/apache-dev/conf/perl-startup.pl 

FS Location /perl 
FSSetHandler   perl-script 
FSPerlResponseHandler ModPerl::Registry 
FSPerlOptions +ParseHeaders 
FSOptions  +ExecCGI 
FS /Location 

FS /IfModule 

FS .. 
FS perl-startup.sh: 

FS #  file:perl-startup.pl 
FS #  --- 
FS   use Apache2 (); 
FS   use Apache::compat (); 
  
FS   use lib qw(/server/apache-dev/perl/); 
  
  
FS   use ModPerl::Util ();   
FS   use Apache::RequestRec (); 
FS   use Apache::RequestIO (); 
FS   use Apache::RequestUtil (); 
  
FS   use Apache::Server (); 
FS   use Apache::ServerUtil (); 
FS   use Apache::Connection (); 
FS   use Apache::Log (); 
  
FS   use APR::Table (); 
  
FS   use ModPerl::Registry (); 
  
FS   use Apache::Const -compile = ':common'; 
FS   use APR::Const -compile = ':common'; 
  
FS   1; 

FS .. 


FS Thanks, 

FS Fredo 




-- 
WBR, Mike P. Mikhailov
mailto:[EMAIL PROTECTED]

You can have my Unix system when you pry it from my cold, dead fingers




__floatdisf: error Compling mod_perl 1.27, apache 1.3.26 on Solaris 8 with gcc 2.95.2

2002-08-15 Thread tom . robinson

Hello,

I'm not having a great day here! :-(

Trying to install mod_perl 1.27 with apache 1.3.26 and perl 5.8.0 on
Solaris 8 using gcc 2.95.2.

I keep getting the following error when I run make test in the mod_perl
source tree:

letting apache warm up...Syntax error on line 7 of
/opt/src/mod_perl-1.27/t/conf/httpd.conf:
Cannot load
/opt/src/mod_perl-1.27/t/../../apache_1.3.26/src/modules/standard/mod_negotiation.so
into server: ld.so.1: ../apache_1.3.26/src/httpd: fatal: relocation
error: file
/opt/src/mod_perl-1.27/t/../../apache_1.3.26/src/modules/standard/mod_negotiation.so:
symbol __floatdisf: referenced symbol not found

If I comment out the offending line for mod_negotiation.so I get a
similar error on libproxy.so. With both commented out the test completes
with :

Failed 2/33 test scripts, 93.94% okay. 23/280 subtests failed, 91.79%
okay.
make: *** [run_tests] Error 29

I think the errors are:

internal/http-get.Internal Server Error
internal/http-postInternal Server Error

My main concern is the first error though. I've tried many options and
settings and browsed the archives but I'm still not able to get this
working. :-(

Any help is appreciated,

Tom


My Configs:-

PATH=/usr/local/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin

gcc -v :-
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)

apache config.status :-
CC=gcc \
CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 \
LDFLAGS=/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/libgcc.a \
./configure \
--activate-module=src/modules/perl/libperl.a \
--disable-rule=EXPAT \
--with-layout=opt \
--enable-module=most \
--enable-shared=max \
--with-perl=/usr/local/bin/perl \
$

mod_perl config :-
LDFLAGS=`gcc -print-libgcc-file-name`
CFLAGS= -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
perl Makefile.PL USE_APACI=1 APACI_ARGS='--with-layout=opt,
--enable-module=most, --enable-shared=max,
--with-perl=/usr/local/bin/perl'

 perl -V :-
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:

  Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos maserati 5.8 generic_108528-11 sun4u sparc
sunw,ultra-250 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.2 19991024 (release)',
gccosandvers='solaris2.8'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Aug 12 2002 14:08:36
  INC:
/usr/local/lib/perl5/5.8.0/sun4-solaris
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl




Re: apache2, DBD/Oracle problem

2002-08-15 Thread Fredo Sartori

Hello Mike,

the code works from the shell as a regular perl script. The service is
correctly resolved with tnsping.

Fredo

Am Don, 2002-08-15 um 10.05 schrieb Mike P. Mikhailov:
 Hello Fredo Sartori,
 
 You are connecting to Oracle with service specified in connect
 string. Does this service resolves correctly with tnsping ?
 
 Does this code work correctly as regular perl script ?
 
 Thursday, August 15, 2002, 1:44:34 PM, you wrote:
 
 -- 
 WBR, Mike P. Mikhailov
 mailto:[EMAIL PROTECTED]
 
 You can have my Unix system when you pry it from my cold, dead fingers
 
 
-- 
Dr. Fredo SartoriTel. 030-227-55061
SPD-Fraktion im Deutschen Bundestag  FAX  030-227-56169
Platz der Republik   e-mail: [EMAIL PROTECTED]
11011 Berlin




[OT] Re[2]: apache2, DBD/Oracle problem

2002-08-15 Thread Mike P. Mikhailov

Hello Fredo Sartori,

Hmm... It looks like a TNS error.

TNS-12505 TNS:listener could not resolve SID given in connect descriptor

I think it has nothing to do with mod_perl :(

Thursday, August 15, 2002, 3:10:59 PM, you wrote:

FS Hello Mike,

FS the code works from the shell as a regular perl script. The service is
FS correctly resolved with tnsping.

FS Fredo

FS Am Don, 2002-08-15 um 10.05 schrieb Mike P. Mikhailov:
 Hello Fredo Sartori,
 
 You are connecting to Oracle with service specified in connect
 string. Does this service resolves correctly with tnsping ?
 
 Does this code work correctly as regular perl script ?
 
 Thursday, August 15, 2002, 1:44:34 PM, you wrote:
 
 -- 
 WBR, Mike P. Mikhailov
 mailto:[EMAIL PROTECTED]
 
 You can have my Unix system when you pry it from my cold, dead fingers
 
 



-- 
WBR, Mike P. Mikhailov
mailto:[EMAIL PROTECTED]

I believe in God, only I spell it Nature.




PerlResponseHandler ?

2002-08-15 Thread Paul Simon
Hi All
Can somebody answer this for me? Here are two directivesfor separate directories(1 and 2) torun under ModPerl::Registry (ModPerl::Registry is being called in via a perl startup.pl):
Location /mydir1 SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
Location /mydir2 SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
I'm wondering, Is it better to create one directive like
Location /perl SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI/Location
and put /mydir1 and /mydir2 in the /perl directory? Is it just a matter of managing directories or is there a memory or performance issue? I'd prefer to use the separate directive approach, but I want to make sure it's not causing extra overhead.
ThanksDo You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Re: [OT] Re[2]: apache2, DBD/Oracle problem

2002-08-15 Thread Fredo Sartori

Hello Mike,

of course: the error message of the listener is correct: theres is no
SID sent to the DB server. But, if the same script is run from the
command line, the SID is transmitted. 

Fredo

Am Don, 2002-08-15 um 11.34 schrieb Mike P. Mikhailov:
 Hello Fredo Sartori,
 
 Hmm... It looks like a TNS error.
 
 TNS-12505 TNS:listener could not resolve SID given in connect descriptor
 
 I think it has nothing to do with mod_perl :(
 
 Thursday, August 15, 2002, 3:10:59 PM, you wrote:
 
 FS Hello Mike,
 
 FS the code works from the shell as a regular perl script. The service is
 FS correctly resolved with tnsping.
 
 FS Fredo
 
 FS Am Don, 2002-08-15 um 10.05 schrieb Mike P. Mikhailov:
  Hello Fredo Sartori,
  
  You are connecting to Oracle with service specified in connect
  string. Does this service resolves correctly with tnsping ?
  
  Does this code work correctly as regular perl script ?
  
  Thursday, August 15, 2002, 1:44:34 PM, you wrote:
  
  -- 
  WBR, Mike P. Mikhailov
  mailto:[EMAIL PROTECTED]
  
  You can have my Unix system when you pry it from my cold, dead fingers
  
  
 
 
 
 -- 
 WBR, Mike P. Mikhailov
 mailto:[EMAIL PROTECTED]
 
 I believe in God, only I spell it Nature.
 
 
-- 
Dr. Fredo SartoriTel. 030-227-55061
SPD-Fraktion im Deutschen Bundestag  FAX  030-227-56169
Platz der Republik   e-mail: [EMAIL PROTECTED]
11011 Berlin




Re: apache2, DBD/Oracle problem

2002-08-15 Thread Atsushi Fujita

Hi Fredo,

I had a similar problem in similar environment.
My simple DBD program worked fine on normal shell and normal apache, but it
didn't work under the mod_perl2.
It showed error as following in apache error_log.

[error_log]
DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
ORACLE_HOME and NLS settings etc. at
/yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
[Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot connect:
(UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
 NLS settings etc.at
/yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.


This looks like a problem of %ENV.
So, I inserted debug code in DBD.pm to output %ENV, and it was correct in
DBD.pm under mod_perl2.
But I didn't check deep C code, I gave up to check it...

My machine is as following.
  - perl5.6.1(non thread)
  - DBI-1.30
  - DBD-Oracle-1.12
  - mod_perl1.99_04(DSO build)
  - apache2.0.39(prefork)
  - Oracle9.0.1.3 for Linux in same machine

And I attached my last mail.
Sorry for being long mail...

Thank you.

Atsushi


- Original Message -
From: Atsushi Fujita [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 29, 2002 8:39 PM
Subject: mod_perl2  DBD::Oracle problem


 Hi all,

 I am trying to use DBD::Oracle1.12 on mod_perl2.
 But it doesn't work fine.
 It shows error as following in error_log at $dbh = DBI-connect.

 [error_log]
 DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
 ORACLE_HOME and NLS settings etc. at
 /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
 [Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot
connect:
 (UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
  NLS settings etc.at
 /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.
 


 [test1.cgi]
 use DBI;

 my $dsn  = 'dbi:Oracle:';
 my $user = 'username/password';
 my $password = '';

 $ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.0.1';
 $ENV{'ORACLE_SID'}  = 'ynt0';
 $ENV{'NLS_LANG'}= 'japanese_japan.ja16euc';

 print ORACLE_HOME=$ENV{'ORACLE_HOME'}br\n;
 print ORACLE_SID=$ENV{'ORACLE_SID'}br\n;
 print NLS_LANG=$ENV{'NLS_LANG'}br\n;
 print DSN=$dsn$ENV{'ORACLE_SID'}br\n;

 $dbh = DBI-connect($dsn$ENV{'ORACLE_SID'}, $user, $password)
  or die Cannot connect: .$DBI::errstr;
 ...
 

 At first, I suspect that the reason is %ENV in this script.
 But I set surely, and this output as following.

 [Broser output HTML]
 ORACLE_HOME=/u01/app/oracle/product/9.0.1
 ORACLE_SID=ynt0
 NLS_LANG=japanese_japan.ja16euc
 DSN=dbi:Oracle:ynt0

 Internal Server Error
 The server encountered an internal error or misconfiguration and was unable
to
 complete your request.
 
 

 And if I turned off the mod_perl, it works fine on normal CGI-script.
 This error occurred only mod_perl.
 (I tested mod_perl1.26  apache 1.3.26, it worked fine...)

 My machine is as following.
   - perl5.6.1(non thread)
   - DBI-1.30
   - DBD-Oracle-1.12
   - mod_perl1.99_04(DSO build)
   - apache2.0.39(prefork)


 [httpd.conf](is this wrong??)
 LoadModule perl_module modules/mod_perl.so
 ...
 IfModule mod_perl.c
 PerlModule ModPerl::Registry
 Location /cgi-bin
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 PerlOptions +ParseHeaders
 Options +ExecCGI
 /Location
 /IfModule
 


 Thanks,

 Atsushi.



- Original Message -
From: Fredo Sartori [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 15, 2002 4:44 PM
Subject: apache2, DBD/Oracle problem


 Hi,

 I have problems connecting to an Oracle-DB through apache2. A test
 script, that works fine when run directly from the shell, fails to
 connect to the Orcacle DB, when run through apache. As far as I can see,
 the SID is not passed to the DB server.

 .
 The foolowing message is found in the error log:

 [Thu Aug 15 09:25:46 2002] [error] 27824: ModPerl::Registry:
 `DBI-connect(sun1) failed: Error while trying to retrieve text for
 error ORA-12505 (DBD ERROR: OCIServerAttach) at
 /server/apache-dev/perl/test-oracle line 23
 '

 ...
 the log file  of the Oracle listener on the DB box ahows:


 15-AUG-02 09:25:46 *

(CONNECT_DATA=(SID=*)(SERVICE_NAME=sun1.)(CID=(PROGRAM=)(HOST=ollenhauer)(USER
=www-adm))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.22.250.27)(PORT=53048)) sh * *
* 0

 ..
 The following versions are used:
 apache 2.0.39
 mod_perl: 1.99_04
 DBI: 1.30
 DBD-Oracle: 1.12


 .
 #sample script:
 #!/usr/local/bin/perl -w

 BEGIN {
 $ENV{ORACLE_HOME} = '/opt/oracle/app/product/8.1.6';
 $ENV{ORACLE_SID}  = 'SPD';
 }

 use CGI;

 use DBI;


 my $db_name = 'dbi:Oracle:sun1';
 my $db_user = 'webuser';
 my $db_pass = 'topsecret';

 my $q=CGI-new;

 my $dbh 

Re: __floatdisf: error Compling mod_perl 1.27,apache 1.3.26 on Solaris 8 with gcc 2.95.2

2002-08-15 Thread David McCabe

[EMAIL PROTECTED] wrote:
 
 Hello,
 
 I'm not having a great day here! :-(

For me, it was a few weeks ago, when I posted the same question. :)
 
 Trying to install mod_perl 1.27 with apache 1.3.26 and perl 5.8.0 on
 Solaris 8 using gcc 2.95.2.

Same versions as me, except gcc is 2.95.3. :)
 
 I keep getting the following error when I run make test in the mod_perl
 source tree:

 internal/http-get.Internal Server Error
 internal/http-postInternal Server Error

Same errors I get.

 My main concern is the first error though. I've tried many options and
 settings and browsed the archives but I'm still not able to get this
 working. :-(

I treied everything I could think of too. I finally got it to work by adding
this to the Apache Configure command:

--disable-shared=perl

This will build a static mod_perl into your httpd binary, but keep everything
else DSO, since you have --enable-shared=max . I know it sucks, so that is why I
am sticking with perl 5.6.1 for the time being, as a mod_perl with that works as
a DSO on Solaris 8. :(

-- 
David McCabe  Network and Communications Services, McGill University
Montreal, Quebec, Canada  [EMAIL PROTECTED]
In theory there is no difference between theory and practice.
In practice there is.  -Yogi Berra



Re: apache2, DBD/Oracle problem

2002-08-15 Thread Lyle Brooks

I does seem to be an ORACLE environment issue.

IIRC, the original post had the Oracle environment variables set in a
BEGIN block.

I ran into a similar issue, where I changed ORACLE_HOME and TNS_ADMIN to
point to a new location.  I set these in a BEGIN block in my startup.pl
file.  But the mod_perl code kept going back to the old location.

I finally tracked it down that another section of my code base was setting
the Oracle environment variables back to their original locations.  Once
I tracked that down and corrected it, I had no more problems.  But for 
awhile I thought either mod_perl was loosing it.

Soit could be that another script (ie. something loaded in the 
startup.pl or equivalent) is affecting the Oracle environment variables
in some way.  That would be consistent with your observations that the
script works fine on the command-line, but not in the mod_perl environment.

You might want to print out the Oracle environment variables right before
you do your connect, just to test this.

Hopefully it's that simple.



Quoting Atsushi Fujita ([EMAIL PROTECTED]):
 Hi Fredo,
 
 I had a similar problem in similar environment.
 My simple DBD program worked fine on normal shell and normal apache, but it
 didn't work under the mod_perl2.
 It showed error as following in apache error_log.
 
 [error_log]
 DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
 ORACLE_HOME and NLS settings etc. at
 /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
 [Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot connect:
 (UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
  NLS settings etc.at
 /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.
 
 
 This looks like a problem of %ENV.
 So, I inserted debug code in DBD.pm to output %ENV, and it was correct in
 DBD.pm under mod_perl2.
 But I didn't check deep C code, I gave up to check it...
 
 My machine is as following.
   - perl5.6.1(non thread)
   - DBI-1.30
   - DBD-Oracle-1.12
   - mod_perl1.99_04(DSO build)
   - apache2.0.39(prefork)
   - Oracle9.0.1.3 for Linux in same machine
 
 And I attached my last mail.
 Sorry for being long mail...
 
 Thank you.
 
 Atsushi
 
 
 - Original Message -
 From: Atsushi Fujita [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 29, 2002 8:39 PM
 Subject: mod_perl2  DBD::Oracle problem
 
 
  Hi all,
 
  I am trying to use DBD::Oracle1.12 on mod_perl2.
  But it doesn't work fine.
  It shows error as following in error_log at $dbh = DBI-connect.
 
  [error_log]
  DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
  ORACLE_HOME and NLS settings etc. at
  /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
  [Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot
 connect:
  (UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
   NLS settings etc.at
  /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.
  
 
 
  [test1.cgi]
  use DBI;
 
  my $dsn  = 'dbi:Oracle:';
  my $user = 'username/password';
  my $password = '';
 
  $ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.0.1';
  $ENV{'ORACLE_SID'}  = 'ynt0';
  $ENV{'NLS_LANG'}= 'japanese_japan.ja16euc';
 
  print ORACLE_HOME=$ENV{'ORACLE_HOME'}br\n;
  print ORACLE_SID=$ENV{'ORACLE_SID'}br\n;
  print NLS_LANG=$ENV{'NLS_LANG'}br\n;
  print DSN=$dsn$ENV{'ORACLE_SID'}br\n;
 
  $dbh = DBI-connect($dsn$ENV{'ORACLE_SID'}, $user, $password)
   or die Cannot connect: .$DBI::errstr;
  ...
  
 
  At first, I suspect that the reason is %ENV in this script.
  But I set surely, and this output as following.
 
  [Broser output HTML]
  ORACLE_HOME=/u01/app/oracle/product/9.0.1
  ORACLE_SID=ynt0
  NLS_LANG=japanese_japan.ja16euc
  DSN=dbi:Oracle:ynt0
 
  Internal Server Error
  The server encountered an internal error or misconfiguration and was unable
 to
  complete your request.
  
  
 
  And if I turned off the mod_perl, it works fine on normal CGI-script.
  This error occurred only mod_perl.
  (I tested mod_perl1.26  apache 1.3.26, it worked fine...)
 
  My machine is as following.
- perl5.6.1(non thread)
- DBI-1.30
- DBD-Oracle-1.12
- mod_perl1.99_04(DSO build)
- apache2.0.39(prefork)
 
 
  [httpd.conf](is this wrong??)
  LoadModule perl_module modules/mod_perl.so
  ...
  IfModule mod_perl.c
  PerlModule ModPerl::Registry
  Location /cgi-bin
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
  Options +ExecCGI
  /Location
  /IfModule
  
 
 
  Thanks,
 
  Atsushi.
 
 
 
 - Original Message -
 From: Fredo Sartori [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 15, 2002 4:44 PM
 Subject: apache2, DBD/Oracle problem
 
 
  Hi,
 
  I have problems connecting to an Oracle-DB through apache2. A 

Possible naming error when extracting mod_perl 2 tarball

2002-08-15 Thread Tom Hibbert

Hi,

I downloaded the mod-perl 2.0 tarball today from:

http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz

When I untar'd it:

bash-2.03$ tar xf mod_perl-2.0-current.tar

It extracted to the following directory:

drwxr-x---  13 software software 512 Jun 21 23:40 mod_perl-1.99_04

I was just wondering if this was correct (i.e mod_perl 2.0 extracting to
mod_perl 1.99 directory). After looking at the files it looks like it is
mod_perl 2 and therefore just a naming error in the archive - a minor issue,
but I thought I would ask.

Cheers,
Tom




RE: can't fine ModuleConfig.c.

2002-08-15 Thread Goehring, Chuck Mr., RCI - San Diego


Thanks.  You are the hero of us lonely Windows Apache users.

Chuck


-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 11:10 PM
To: Goehring, Chuck Mr., RCI - San Diego
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: can't fine ModuleConfig.c.


On Mon, 12 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote:

 Randy,
 
 I'm using Perl 5.6.0 for this. Should I be using 5.8.0?  Does
 that affect ModuleConfig.c?
 
 Having problems running things with the version I put out last
 week.  It complains about the dumbest things and is overly
 strict.
 
 Thanks
 Chuck

I'm not sure if this will help, but an error you had in an
earlier message for 'perl Makefile.PL' indicated you didn't have
touch() on your system (which is typical for Win32). You might
want to try the attached patch to Makefile.PL, which uses a perl
command for touch().

-- 
best regards,
randy



Re: regional mod_perl mailing lists?

2002-08-15 Thread Stas Bekman

[First mentioned on the dev list, I'm moving it to the users list]

I've started International mod_perl mailing lists page
http://perl.apache.org/maillist/i18n.html

Now it includes only one Japanese list, courtesy Tatsuhiko Miyagawa

If you know about any other mod_perl mailing lists please let us know.

Thanks.

Tatsuhiko Miyagawa wrote:
 Hi
 
 I'm running Japanese mod_perl mailing list.
 http://bulknews.net/lib/ml/
 
 This list is working on a free mailing list service called freeml in
 Japan.
 
 At Tue, 12 Mar 2002 11:16:16 +0800,
 Stas Bekman wrote:
 
 
  I was thinking today about the possibility of regional mod_perl 
mailing lists - kinda like the way local perl mongers have their own 
lists to coordinate group activities, post local jobs, and just keep in 
touch with others in their area with similar interests.

This is a good idea to especially take some load off the users list. 
Plus help people with the language barrier.


  before posting an RFC to modperl@ I thought I'd ask about it here 
first: whether anyone thought it was a good idea, whether the 
perl.apache.org domain was a good place to host the lists, creation and 
management issues, and so on...

That's a tough question, I guess Ask would be the best person to answer 
this question.

Alternatively we could check the same thing with perl.org, which already 
have the infrastructure. Or why not to simply work with perl mongers and 
create a parallel tree of mod_perl mongers and ride on top of the perl 
mongers infrastructure?
 
 



-- 


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: PerlResponseHandler ?

2002-08-15 Thread Stas Bekman

Paul Simon wrote:
 Hi All
 
 Can somebody answer this for me?  Here are two directives for separate 
 directories(1 and 2) to run under ModPerl::Registry (ModPerl::Registry 
 is being called in via a perl startup.pl):
 
 Location /mydir1
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 PerlOptions +ParseHeaders
 Options +ExecCGI
 /Location
 
 Location /mydir2
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 PerlOptions +ParseHeaders
 Options +ExecCGI
 /Location
 
 I'm wondering, Is it better to create one directive like
 
 Location /perl
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 PerlOptions +ParseHeaders
 Options +ExecCGI
 /Location
 
 and put /mydir1 and /mydir2 in the /perl directory?  Is it just a matter 
 of managing directories or is there a memory or performance issue? I'd 
 prefer to use the separate directive approach, but I want to make sure 
 it's not causing extra overhead.

whichever way you prefer is fine. when Perl sections will be ported 
things will be even easier.

I doubt there is any significant speed difference. If still in doubt -- 
benchmark.



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: Possible naming error when extracting mod_perl 2 tarball

2002-08-15 Thread Stas Bekman

Tom Hibbert wrote:
 Hi,
 
 I downloaded the mod-perl 2.0 tarball today from:
 
 http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
 
 When I untar'd it:
 
 bash-2.03$ tar xf mod_perl-2.0-current.tar
 
 It extracted to the following directory:
 
 drwxr-x---  13 software software 512 Jun 21 23:40 mod_perl-1.99_04
 
 I was just wondering if this was correct (i.e mod_perl 2.0 extracting to
 mod_perl 1.99 directory). After looking at the files it looks like it is
 mod_perl 2 and therefore just a naming error in the archive - a minor issue,
 but I thought I would ask.

That's correct. It'll become mod_perl-2.0.xx when the first production 
version is released.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




SOLVED: How to access base environment from Perl sections

2002-08-15 Thread Tom Mornini

Perhaps it's obvious but after years of mod_perl, I was blocked, 
probably because using this basic Perl ability is frowned upon in 
mod_perl due to performance issues. Of course, during startup, 
performance isn't an issue. :-)

In my case, I wanted to PerlPassEnv all environment variables that began 
with EWINGZ_

Perl
   for ( grep { /^EWINGZ_/ } `env` ) {
 my ($key) = /^([^=]+)/;
 push PerlPassEnv,$key;
   }
/Perl

Stas: I asked this question almost exactly a year ago and nobody 
answered it. I asked it yesterday, and again nobody answered it. Perhaps 
this should be the Perl Sections section of the guide? After all, the 
guide already mentions something very similar to this.

--
-- Tom Mornini
-- InfoMania Printing and Prepress
--
-- ICQ: 113526784, AOL, Yahoo, MSN and Jabber: tmornini




regenerating code for modperl-2.0

2002-08-15 Thread Alexy Khrabrov


Greetings --

I've followed Doug's instructions for regenerating the source
tables with perl 5.8.0 and Apache 2.0.40-dev, but it fails parsing:

alexy@angle:/src/apache/modperl-2.0  perl build/source_scan.pl 
/usr/local/apache2/bin/apxs 
Expecting parenth after identifier in `apr_table_do_callback_fn_t *comp'
after `apr_table_do_callback_fn_t ' at /usr/local/bleedperl/lib/site_perl/C/Scan.pm 
line 851.
 C::Scan::do_declaration1('apr_table_do_callback_fn_t 
*comp','HASH(0x88bff48)','HASH(0x88bfd50)',0) called at 
/usr/local/bleedperl/lib/site_perl/C/Scan.pm line 808
 C::Scan::do_declaration('int   apr_table_do(apr_table_do_callback_fn_t *comp,\x{a}
...','HASH(0x88bff48)','HASH(0x88bfd50)') called at 
/usr/local/bleedperl/lib/site_perl/C/Scan.pm line 738
 C::Scan::do_declarations('ARRAY(0x88b37a4)','HASH(0x88bff48)','HASH(0x88bfd50)') 
called at /usr/local/bleedperl/lib/site_perl/5.8.0/Data/Flow.pm line 69
 Data::Flow::request('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls') 
called at /usr/local/bleedperl/lib/site_perl/5.8.0/Data/Flow.pm line 39
 Data::Flow::get('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls') called 
at lib/Apache/ParseSource.pm line 49
 
Apache::ParseSource::Scan::get('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls')
 called at lib/Apache/ParseSource.pm line 310
 Apache::ParseSource::get_functions('Apache::ParseSource=HASH(0x888177c)') called at 
lib/Apache/ParseSource.pm line 406
 Apache::ParseSource::write_functions_pm('Apache::ParseSource=HASH(0x888177c)') called 
at build/source_scan.pl line 18

Anybody else getting this?
Cheers,
Alexy




[JOB] Senior mod_perl programmer in Oslo, Norway

2002-08-15 Thread Salve J. Nilsen

Hi!

We're looking for a senior mod_perl programmer to bolster up the technical
department at our workplace (Tinde ASA, URL: http://www.tinde.no/).

Regretfully, we can only hire people that are fluent in Norwegian and
living in Oslo, Norway - so the rest of this mail will be in Norwegian...
(Apologies to those who feel left out. :)


Kind regards,

- Salve J. Nilsen
(Developer, Tinde ASA - on behalf of our CTO)


 Ledig teknisk stilling i Tinde ASA 

Tinde ASA drifter, utvikler og selger annonsering på eiendoms-
markedsplassen tinde.no. Kundene våre er hovedsakelig norske
eiendomsmeglere, men siden vår tekniske plattform er blitt produktifisert
(til Tinde Ad Site), lever vi også den til BoligZonen URL:
http://www.boligzonen.dk/.

Grunnet tinde.no idag er i en vekstsituasjon, ønsker vi å styrke vår
tekniske avdeling. Vi er på jakt etter en senior systemutvikler som har
flest mulig av følgende egenskaper:

Kjernekompetanse:

   * Sterk Perl-kompetanse og god kjennskap til mod_perl
   * Meget god kjennskap til objektorientering
   * Gode UNIX-kunnskaper, spesielt Linux, FreeBSD og AIX
   * Minimum 5 års arbeidserfaring innen systemutvikling

Annen nyttig erfaring / bakgrunn:

   * Høyere utdanning.
   * Erfaring med RDBMS, gjerne DB2
   * DocBook, UML
   * Kjennskap til XML, XSLT og relaterte teknologier
   * Kjennskap til HTTP, Webcaching og hvordan disse fungerer i praksis
   * Erfaringer med forskjellige utviklingsmodeller/metoder (for
 f.eks. Rapid Development, XP, QA-metoder, m.m.)
   * Gode engelskkunnskaper
   * Utvikling av mobile tjenester

Denne lista er ikke komplett - har du noen erfaringer eller egenskaper som 
kan være interessante for oss i tillegg til disse, så gi lyd fra deg!

Vi kan tilby et meget kompetent teknisk miljø, deltakelse i spennende
produktutvikling og konkurransedyktig lønn.

Interesserte kan sende en CV til teknisk direktør Tommie Antonsen 
[EMAIL PROTECTED].


mvh,

- Salve J. Nilsen
(Utvikler, Tinde ASA - på vegne av teknisk direktør.)

--
 Don't worry about what anybody else is going to do... The best way
  to predict the future is to invent it. -- Alan Kay, 1971








-Wl,-E

2002-08-15 Thread Ihor Bilyy

Hello!

I can't build apache 1.3.26 with mod_perl 1.27 on Solaris 2.8
I use:
perl Makefile.pl APACHE_SRC=../apache1/src \
NO_HTTPD=1 USE_APACI=1 PREP_HTTPD \
EVERYTHING=1

and in apache directory:
./configure --activate-module=src/modules/perl/libperl.a

here is the output:
Configuring for Apache, Version 1.3.26
 + using installation path layout: Apache (config.layout)
 + activated perl module (modules/perl/libperl.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Solaris 280 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o perl_module uses ConfigStart/End
  + mod_perl build type: OBJ
  + id: mod_perl/1.27
  + id: Perl/v5.6.1 (solaris) [perl]
  + setting up mod_perl build environment
  + adjusting Apache build environment
  + enabling Perl support for SSI (mod_include)
 + using builtin Expat
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

 Error Output for sanity check 
cd ..; gcc  -DSOLARIS2=280 -DMOD_PERL -DUSE_PERL_SSI 
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI
LE_OFFSET_BITS=64 -DUSE_EXPAT -I./lib/expat-lite 
-DNO_DL_NEEDED `./apaci` -I. -I/usr/local//lib/perl5/5.6.1/sun4-solaris
/CORE-o helpers/dummy helpers/dummy.c   -lsocket -lnsl -lpthread  
-Wl,-E  -L/usr/local/lib  
/usr/local/lib/perl5/5.6.1/sun4-solaris/auto/DynaLoader/DynaLoader.a 
-L/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE 
-lperl -lsocket -lnsl -ldl -lm -lc

/usr/ccs/bin/ld: illegal option -- E
usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:] file(s)

Does anybody know how to fix it? 
I tried MP_LD=gcc but with the same effect.

thanks
-i-





mod_perl-1.99_04 compile failure

2002-08-15 Thread J. W. Ballantine

Hi,

  I have apache 2.0.40, built and working and I'm trying to add the mod_perl 2 
  module, but when I try to install it
  I'm failing on the compile of mod_perl.c.
  
  The makefile command is:
 perl Makefile.PL MP_AP_PREFIX=/a3/APACHE/Apache2 MP_INST_APACHE2=1 
  MP_USE_STATIC=1
  This runs successfully and then I run make, with an output of:
 cd src/modules/perl  make -f Makefile.modperl
 cc -I/a4/WWW/APACHE2/mod_perl-1.99_04/src/modules/perl 
  -I/a4/WWW/APACHE2/mod_perl-1.99_04/xs -I/a3/APACHE/Apache2/include 
  -I/usr/local/include   -I/usr/add-on/perl-5.6.0/lib/5.6.0/sun4-solaris/CORE 
  -DMOD_PERL -O -c mod_perl.c
 /usr/add-on/perl-5.6.0/lib/5.6.0/sun4-solaris/CORE/perl.h, line 23: 
  warning: macro redefined: VOIDUSED
mod_perl.c, line 511: warning: improper pointer/integer combination: 
  arg #3
 mod_perl.c, line 511: prototype mismatch: 3 args passed, 4 expected
 mod_perl.c, line 515: warning: improper pointer/integer combination: arg 
  #3
 mod_perl.c, line 515: prototype mismatch: 3 args passed, 4 expected
 mod_perl.c, line 519: warning: improper pointer/integer combination: arg 
  #3
 mod_perl.c, line 519: prototype mismatch: 3 args passed, 4 expected
 mod_perl.c, line 523: warning: improper pointer/integer combination: arg 
  #3
 mod_perl.c, line 523: prototype mismatch: 3 args passed, 4 expected
 cc: acomp failed for mod_perl.c
 *** Error code 2
 make: Fatal error: Command failed for target `mod_perl.o'
 Current working directory /a4/WWW/APACHE2/mod_perl-1.99_04/src/modules/perl
 *** Error code 1
 make: Fatal error: Command failed for target `modperl_lib'
  
  I've searched the archives, and can't find any mod_perl.c problems.  Output of 
  t/REPORT follows. Does anyone have and
  pointers or suggestions??
  
  Thanks
  Jim Ballantine
  
  -8-- Start Bug Report 8--
  1. Problem Description:
  
[DESCRIBE THE PROBLEM HERE]
  
  2. Used Components and their Configuration:
  
  *** using lib/Apache/BuildConfig.pm
  *** Makefile.PL options:
MP_AP_PREFIX= /a3/APACHE/Apache2
MP_GENERATE_XS  = 1
MP_INST_APACHE2 = 1
MP_LIBNAME  = mod_perl
MP_USE_STATIC   = 1
  
  
  *** /a3/APACHE/Apache2/bin/httpd -V
  Server version: Apache/2.0.40
  Server built:   Aug 12 2002 15:12:21
  Server's Module Magic Number: 20020628:0
  Architecture:   32-bit
  Server compiled with
   -D APACHE_MPM_DIR=server/mpm/prefork
   -D APR_HAS_MMAP
   -D APR_USE_PROC_PTHREAD_SERIALIZE
   -D APR_USE_PTHREAD_SERIALIZE
   -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
   -D APR_HAS_OTHER_CHILD
   -D AP_HAVE_RELIABLE_PIPED_LOGS
   -D HTTPD_ROOT=/a3/APACHE/Apache2
   -D SUEXEC_BIN=/a3/APACHE/Apache2/bin/suexec
   -D DEFAULT_PIDLOG=logs/httpd.pid
   -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
   -D DEFAULT_LOCKFILE=logs/accept.lock
   -D DEFAULT_ERRORLOG=logs/error_log
   -D AP_TYPES_CONFIG_FILE=conf/mime.types
   -D SERVER_CONFIG_FILE=conf/httpd.conf
  
  
  *** /usr/add-on/perl-5.6.0/bin/perl -V
  Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
  osname=solaris, osvers=2.6, archname=sun4-solaris
  uname='sunos hera 5.6 generic_105181-17 sun4u sparc sunw,ultra-enterprise '
  config_args=''
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef 
  usemultiplicity=undef
  useperlio=undef d_sfio=undef uselargefiles=define 
  use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
  cc='cc', optimize='-O', gccversion=
  cppflags='-I/usr/local/include'
  ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  stdchar='unsigned char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
  lseeksize=8
  alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
  ld='cc', ldflags =' -L/usr/local/lib '
  libpth=/usr/local/lib /usr/lib /usr/ccs/lib
  libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt -lsec
  libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib'
  
  
  Characteristics of this binary (from libperl): 
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Apr 19 2000 09:57:26
%ENV:
  PERL_LWP_USE_HTTP_10=1
INC:
  /usr/add-on/perl-5.6.0/lib/5.6.0/sun4-solaris
  /usr/add-on/perl-5.6.0/lib/5.6.0
  /usr/add-on/perl-5.6.0/lib/site_perl/5.6.0/sun4-solaris
  /usr/add-on/perl-5.6.0/lib/site_perl/5.6.0
  /usr/add-on/perl-5.6.0/lib/site_perl
  .
  
  
  3. This is the core dump 

Re: NTLM module

2002-08-15 Thread ew0psceg

Am I totally wrong, or the plain and painful answer is 
that NTLM is only supported on Win32 boxes? I think 
I read somewhere that, because the module relies the 
Win32 API, it doesn't run on other systems. It even 
said something like ...whoever wants to grab some 
Samba code and port the module to *nix, please do

Again, this is just something I guess I think I read 
somewhere, so take it with a grain of salt.

Paulo Meireles
MCSE (and not ashame of it)
;-)


Como Reduzir os Riscos de Segurança da Sua Organização Whitepaper Gratuito sobre 
Serviços
de Segurança http://www.vianetworks.pt/security/whitepaper_fs.html





regenerating source for 2.0 fails

2002-08-15 Thread Alexy Khrabrov


I've followed Doug's instructions for regenerating the source
tables with perl 5.8.0 and Apache 2.0.40-dev, but it fails parsing:

alexy@angle:/src/apache/modperl-2.0  perl build/source_scan.pl 
/usr/local/apache2/bin/apxs 
Expecting parenth after identifier in `apr_table_do_callback_fn_t *comp'
after `apr_table_do_callback_fn_t ' at /usr/local/bleedperl/lib/site_perl/C/Scan.pm 
line 851.
 C::Scan::do_declaration1('apr_table_do_callback_fn_t 
*comp','HASH(0x88bff48)','HASH(0x88bfd50)',0) called at 
/usr/local/bleedperl/lib/site_perl/C/Scan.pm line 808
 C::Scan::do_declaration('int   apr_table_do(apr_table_do_callback_fn_t *comp,\x{a}
...','HASH(0x88bff48)','HASH(0x88bfd50)') called at 
/usr/local/bleedperl/lib/site_perl/C/Scan.pm line 738
 C::Scan::do_declarations('ARRAY(0x88b37a4)','HASH(0x88bff48)','HASH(0x88bfd50)') 
called at /usr/local/bleedperl/lib/site_perl/5.8.0/Data/Flow.pm line 69
 Data::Flow::request('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls') 
called at /usr/local/bleedperl/lib/site_perl/5.8.0/Data/Flow.pm line 39
 Data::Flow::get('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls') called 
at lib/Apache/ParseSource.pm line 49
 
Apache::ParseSource::Scan::get('Apache::ParseSource::Scan=ARRAY(0x887a190)','parsed_fdecls')
 called at lib/Apache/ParseSource.pm line 310
 Apache::ParseSource::get_functions('Apache::ParseSource=HASH(0x888177c)') called at 
lib/Apache/ParseSource.pm line 406
 Apache::ParseSource::write_functions_pm('Apache::ParseSource=HASH(0x888177c)') called 
at build/source_scan.pl line 18

Anybody else getting this?
Cheers,
Alexy



Re: Another mod_perl-1.99_04 compile failure

2002-08-15 Thread Kyoichi Ozaki

hi j.w., 

using mod_perl-1.99_05-dev might help.

 After applying the patch Kyoichi sent, mod_perl.c compiled fine and the make
 continued until:

--
Kyoichi Ozaki [EMAIL PROTECTED]



Re: apache2, DBD/Oracle problem

2002-08-15 Thread Atsushi Fujita

Hi Lyle,

 I does seem to be an ORACLE environment issue.

Yes, I added printing out ORACLE ENV script in Oracle.pm as following.

[perl5.6.1normal/lib/site_perl/5.6.1/i686-linux/DBD/Oracle.pm] line 259
 print DEBUG DBD[3] : dbh=[$dbh], dbname=[$dbname], user=[$user],
auth=[$auth], attr=[$attr]br\n;
 for(keys %$attr){
  print attr{$_}=[${$attr}{$_}]br\n;
 }
 for(keys %ENV){
  print ENV{$_}=[$ENV{$_}]br\n;
 }

 # Call Oracle OCI logon func in Oracle.xs file
 # and populate internal handle data.
 DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
 or return undef;



It showed correct ORACLE ENV and $dbh and so on, but it couldn't connect at
next DBD::Oracle::db::_login(). It showed errror of ORACLE_HOME and NLS
settings...

But it worked fine on normal CGI-script.
The printed out %ENV from there were as following on mod_perl2 and normal
CGI-script.


[%ENV on mod_perl2]
ENV{GATEWAY_INTERFACE}=[CGI-Perl/1.1]
ENV{SERVER_SOFTWARE}=[Apache/2.0.39 (Unix) mod_perl/1.99_04-dev Perl/v5.6.1]
ENV{MOD_PERL}=[mod_perl/1.99_04-dev]
ENV{ORACLE_HOME}=[/u01/app/oracle/product/9.0.1]
ENV{ORACLE_SID}=[ynt0]
ENV{NLS_LANG}=[japanese_japan.ja16euc]


[%ENV on normal CGI-script]
ENV{GATEWAY_INTERFACE}=[CGI/1.1]
ENV{SERVER_SOFTWARE}=[Apache/2.0.39 (Unix)]
ENV{ORACLE_HOME}=[/u01/app/oracle/product/9.0.1]
ENV{ORACLE_SID}=[ynt0]
ENV{NLS_LANG}=[japanese_japan.ja16euc]


Maybe I should check more deep area...
By the way, is there anyone who is working DBD Oracle under mod_perl2?

Thank you.

Atsushi


- Original Message -
From: Lyle Brooks [EMAIL PROTECTED]
To: Atsushi Fujita [EMAIL PROTECTED]
Cc: Fredo Sartori [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 15, 2002 11:07 PM
Subject: Re: apache2, DBD/Oracle problem


 I does seem to be an ORACLE environment issue.

 IIRC, the original post had the Oracle environment variables set in a
 BEGIN block.

 I ran into a similar issue, where I changed ORACLE_HOME and TNS_ADMIN to
 point to a new location.  I set these in a BEGIN block in my startup.pl
 file.  But the mod_perl code kept going back to the old location.

 I finally tracked it down that another section of my code base was setting
 the Oracle environment variables back to their original locations.  Once
 I tracked that down and corrected it, I had no more problems.  But for
 awhile I thought either mod_perl was loosing it.

 Soit could be that another script (ie. something loaded in the
 startup.pl or equivalent) is affecting the Oracle environment variables
 in some way.  That would be consistent with your observations that the
 script works fine on the command-line, but not in the mod_perl environment.

 You might want to print out the Oracle environment variables right before
 you do your connect, just to test this.

 Hopefully it's that simple.



 Quoting Atsushi Fujita ([EMAIL PROTECTED]):
  Hi Fredo,
 
  I had a similar problem in similar environment.
  My simple DBD program worked fine on normal shell and normal apache, but
it
  didn't work under the mod_perl2.
  It showed error as following in apache error_log.
 
  [error_log]
  DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
  ORACLE_HOME and NLS settings etc. at
  /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
  [Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot
connect:
  (UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
   NLS settings etc.at
  /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.
  
 
  This looks like a problem of %ENV.
  So, I inserted debug code in DBD.pm to output %ENV, and it was correct in
  DBD.pm under mod_perl2.
  But I didn't check deep C code, I gave up to check it...
 
  My machine is as following.
- perl5.6.1(non thread)
- DBI-1.30
- DBD-Oracle-1.12
- mod_perl1.99_04(DSO build)
- apache2.0.39(prefork)
- Oracle9.0.1.3 for Linux in same machine
 
  And I attached my last mail.
  Sorry for being long mail...
 
  Thank you.
 
  Atsushi
 
 
  - Original Message -
  From: Atsushi Fujita [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, July 29, 2002 8:39 PM
  Subject: mod_perl2  DBD::Oracle problem
 
 
   Hi all,
  
   I am trying to use DBD::Oracle1.12 on mod_perl2.
   But it doesn't work fine.
   It shows error as following in error_log at $dbh = DBI-connect.
  
   [error_log]
   DBI-connect(ynt0) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize.
Check
   ORACLE_HOME and NLS settings etc. at
   /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42
   [Mon Jul 29 20:15:37 2002] [error] 25703: ModPerl::Registry: `Cannot
  connect:
   (UNKNOWN OCI STATUS 1804) OCIInitialize. Check ORACLE_HOME and
NLS settings etc.at
   /yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin/test1.cgi line 42.
   
  
  
   [test1.cgi]
   use DBI;
  
   my $dsn  = 'dbi:Oracle:';
   my $user

Re: apache2, DBD/Oracle problem

2002-08-15 Thread Stas Bekman

Atsushi Fujita wrote:
 Hi Lyle,
 
 
I does seem to be an ORACLE environment issue.

Can you please try to convert the script into a mod_perl handler and 
test again? I doubt this is registry problem, but probably something 
that about setting up the env for mod_perl in general.

What would help most is to write a test that exposes this problem. I 
don't have Oracle, so if you could help me reproduce the problem, I'd 
know what to fix.

Thanks!

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: SOLVED: How to access base environment from Perl sections

2002-08-15 Thread Stas Bekman

Tom Mornini wrote:
 Perhaps it's obvious but after years of mod_perl, I was blocked, 
 probably because using this basic Perl ability is frowned upon in 
 mod_perl due to performance issues. Of course, during startup, 
 performance isn't an issue. :-)
 
 In my case, I wanted to PerlPassEnv all environment variables that began 
 with EWINGZ_
 
 Perl
   for ( grep { /^EWINGZ_/ } `env` ) {
 my ($key) = /^([^=]+)/;
 push @PerlPassEnv,$key;
   }
 /Perl
 
 Stas: I asked this question almost exactly a year ago and nobody 
 answered it. I asked it yesterday, and again nobody answered it. Perhaps 
 this should be the Perl Sections section of the guide? After all, the 
 guide already mentions something very similar to this.


Funny, but there are too many things in the guide to remember. The new
search feature exposes them all, just remember to use it.

I was just about to add your tip, when I've found it
http://perl.apache.org/docs/1.0/guide/porting.html#Passing_ENV_variables_to_CGI
which was added about 3 years ago:
http://perl.apache.org/docs/1.0/guide/Changes.html#05_17_1999_ver_1_11

may be we need to add a xref from the Perl sections section?


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: Another mod_perl-1.99_04 compile failure

2002-08-15 Thread Stas Bekman

J. W. Ballantine wrote:
 After applying the patch Kyoichi sent, mod_perl.c compiled fine and the make
 continued until:
 
   cd src/modules/perl  make -f Makefile.modperl
   cc -c -I/a4/WWW/APACHE2/mod_perl-1.99_04/src/modules/perl 
 -I/a4/WWW/APACHE2/mod_perl-1.99_04/xs -I/a3/APACHE/Apache2/include 
 -I/usr/local/include  -DMOD_PERL -O  -DVERSION=\0.01\  
 -DXS_VERSION=\0.01\ -KPIC -I/usr/add-on/perl-5.6.0/lib/5.6.0/sun4-solaris/COR
 E  Table.c
   /usr/add-on/perl-5.6.0/lib/5.6.0/sun4-solaris/CORE/perl.h, line 23: 
 warning: macro redefined: VOIDUSED
   /a4/WWW/APACHE2/mod_perl-1.99_04/xs/APR/Table/APR__Table.h, line 73: 
 undefined struct/union member: a
   /a4/WWW/APACHE2/mod_perl-1.99_04/xs/APR/Table/APR__Table.h, line 73: 
 non-unique member requires struct/union object: pool
   /a4/WWW/APACHE2/mod_perl-1.99_04/xs/APR/Table/APR__Table.h, line 73: 
 warning: left operand of . must be struct/union object
   /a4/WWW/APACHE2/mod_perl-1.99_04/xs/APR/Table/APR__Table.h, line 73: 
 cannot access member of non-struct/union object

Apache has changed its API again. The cvs version solves this problem.

Remember that mod_perl 1.99_04 works with Apache 2.0.39. If you take a 
newer Apache 2.0.40 or Apache cvs, you must either wait for 1.99_05 to 
be released, or use the mod_perl cvs.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: mod_perl-1.99_04 compile failure

2002-08-15 Thread Stas Bekman

J. W. Ballantine wrote:
 Thanks, that solved the problem.

which has been already solved in cvs.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: What is NTLM? (was: NTLM module)

2002-08-15 Thread Gerald Richter

  Am I totally wrong, or the plain and painful answer is
  that NTLM is only supported on Win32 boxes? I think
  I read somewhere that, because the module relies the
  Win32 API, it doesn't run on other systems. It even
  said something like ...whoever wants to grab some
  Samba code and port the module to *nix, please do
 
  Again, this is just something I guess I think I read
  somewhere, so take it with a grain of salt.

Apache::AuthenNTLM runs only on Unix and it uses Authen::smb to verify
passwords against a windows nt/2000 machine.

On the client side NTLM is only supported by Mircosoft Internet Explorer.
The main reason why you want to use it, is when you haveing an intranet
Apache server on Unix and most/all of your clients use MSIE on Windows as
browser. In this case MSIE will autheticate via NTLM automaticly as the
current logged on user, when a server requests NTLM authentication. So the
main reason to use it, is that in this case the users don't have to type in
there passwords again.


 I doubt that NTLM does not need any password. Logically, there must be a
way
 to set up the initial trustful connection between two machines. If not
 password, what will that be ? Or something like Digital Authentication ?


From the README:

The NTLM protocol performs a challenge/response to exchange a random number
(nonce) and get back a md4 hash, which is build form the users password
and the nonce. This makes sure that no cleartext password goes over the
wire,
so it's more secure than basic authentication, which doesn't mean it's
a real secure authentication scheme.

Some information about NTLM can be found at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/nt
lmssp_0k19.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/
samp/VC98/sdk/winbase/security/winnt/httpauth/httpauth.asp

More detailed implementation details are available from

http://www.opengroup.org/comsource/techref2/NCH1222X.HTM
http://www.innovation.ch/java/ntlm.html

A lot of ideas and information are taken from the similar Apache module
mod_ntlm,
which can be found at http://sourceforge.net/projects/modntlm/

Gerald


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






Re: apache2, DBD/Oracle problem

2002-08-15 Thread Mike P. Mikhailov

Hello Fredo Sartori,

Thursday, August 15, 2002, 1:44:34 PM, you wrote:

I mabe wrong, but what about to move code to setup ENV out from BEGIN
block ? I wrote simple test below:

# Test.pm
package Test;

use Apache::Constants   qw ( :common );

BEGIN {
$ENV{FOO1} = 'BAR1';
$ENV{FOO2} = 'BAR2';
}

sub handler {
my $r = shift;
$r-print(Content-Type: text/plain\n\n);
print FOO1=$ENV{FOO1}, FOO2=$ENV{FOO2}\n;
return OK;
}

1;

__END__

# httpd.conf

SetEnv   FOO1  QQ1
SetEnv   FOO2  QQ2

Location /test
SetHandler  perl-script
PerlHandler Test
PerlSendHeader  On
/Location

One the first request of the fresh apache, I got:

FOO1=BAR1, FOO2=BAR2

On all subsequent requests:

FOO1=QQ1, FOO2=QQ2

I thing this is because mod_perl reset ENV hash on each request, but
I'm not sure. And I'm on Apache/1.3.23 (Unix) mod_perl/1.26. Not on
apache2. Did you confirm such behaviour of MP2 ? Does not find any
mention which confirm this in the guide :(

FS Hi, 

FS I have problems connecting to an Oracle-DB through apache2. A test
FS script, that works fine when run directly from the shell, fails to
FS connect to the Orcacle DB, when run through apache. As far as I can see,
FS the SID is not passed to the DB server. 

FS . 
FS The foolowing message is found in the error log: 

FS [Thu Aug 15 09:25:46 2002] [error] 27824: ModPerl::Registry:
`DBI-connect(sun1) failed: Error while trying to retrieve text for
FS error ORA-12505 (DBD ERROR: OCIServerAttach) at
FS /server/apache-dev/perl/test-oracle line 23 
FS ' 

FS ... 
FS the log file  of the Oracle listener on the DB box ahows: 


FS 15-AUG-02 09:25:46 *
FS 
(CONNECT_DATA=(SID=*)(SERVICE_NAME=sun1.)(CID=(PROGRAM=)(HOST=ollenhauer)(USER=www-adm)))
 * (ADDRESS=(PROTOCOL=tcp)(HOST=172.22.250.27)(PORT=53048)) sh * * * 0 

FS .. 
FS The following versions are used: 
FS apache 2.0.39 
FS mod_perl: 1.99_04 
FS DBI: 1.30 
FS DBD-Oracle: 1.12 


FS . 
FS #sample script: 
FS #!/usr/local/bin/perl -w 

FS BEGIN { 
FS $ENV{ORACLE_HOME} = '/opt/oracle/app/product/8.1.6'; 
FS $ENV{ORACLE_SID}  = 'SPD'; 
FS } 

FS use CGI; 

FS use DBI;   

  
FS my $db_name = 'dbi:Oracle:sun1';  
FS my $db_user = 'webuser'; 
FS my $db_pass = 'topsecret'; 

my $q=CGI-new; 

my $dbh = DBI-connect($db_name, $db_user, $db_pass, 
FS{LongReadLen = 65534, 
FS RaiseError  = 1, 
FS AutoCommit  = 0}); 

FS my $query = q{ 
FS SELECT count (*) 
FS FROM asdb_mgr.stammdaten14 
FS WHERE bis is null  }; 

my $sth = $dbh-prepare($query); 

my $rc  = $sth-execute(); 

my $count = $sth-fetchrow_array; 

print $q-header; 
FS print Anzahl der SPD-MdBs: $count\n; 

$sth-finish; 

$dbh-disconnect; 

FS ... 
FS httpd.conf: 

FS Alias /perl  /server/apache-dev/perl 
FS IfModule mod_perl.c 

FS   PerlRequire /server/apache-dev/conf/perl-startup.pl 

FS Location /perl 
FSSetHandler   perl-script 
FSPerlResponseHandler ModPerl::Registry 
FSPerlOptions +ParseHeaders 
FSOptions  +ExecCGI 
FS /Location 

FS /IfModule 

FS .. 
FS perl-startup.sh: 

FS #  file:perl-startup.pl 
FS #  --- 
FS   use Apache2 (); 
FS   use Apache::compat (); 
  
FS   use lib qw(/server/apache-dev/perl/); 
  
  
FS   use ModPerl::Util ();   
FS   use Apache::RequestRec (); 
FS   use Apache::RequestIO (); 
FS   use Apache::RequestUtil (); 
  
FS   use Apache::Server (); 
FS   use Apache::ServerUtil (); 
FS   use Apache::Connection (); 
FS   use Apache::Log (); 
  
FS   use APR::Table (); 
  
FS   use ModPerl::Registry (); 
  
FS   use Apache::Const -compile = ':common'; 
FS   use APR::Const -compile = ':common'; 
  
FS   1; 

FS .. 


FS Thanks, 

FS Fredo 




-- 
WBR, Mike P. Mikhailov
mailto:[EMAIL PROTECTED]

You can have my Unix system when you pry it from my cold, dead fingers




Re: SOLVED: How to access base environment from Perl sections

2002-08-15 Thread Tom Mornini

On Thursday, August 15, 2002, at 07:47 PM, Stas Bekman wrote:

 Tom Mornini wrote:
 Perhaps it's obvious but after years of mod_perl, I was blocked, 
 probably because using this basic Perl ability is frowned upon in 
 mod_perl due to performance issues. Of course, during startup, 
 performance isn't an issue. :-)
 In my case, I wanted to PerlPassEnv all environment variables that 
 began with EWINGZ_
 Perl
   for ( grep { /^EWINGZ_/ } `env` ) {
 my ($key) = /^([^=]+)/;
 push PerlPassEnv,$key;
   }
 /Perl
 Stas: I asked this question almost exactly a year ago and nobody 
 answered it. I asked it yesterday, and again nobody answered it. 
 Perhaps this should be the Perl Sections section of the guide? After 
 all, the guide already mentions something very similar to this.

 Funny, but there are too many things in the guide to remember. The new
 search feature exposes them all, just remember to use it.

 I was just about to add your tip, when I've found it
 http://perl.apache.org/docs/1.0/guide/porting.html#Passing_ENV_variables_to_CGI
 which was added about 3 years ago:
 http://perl.apache.org/docs/1.0/guide/Changes.html#05_17_1999_ver_1_11

 may be we need to add a xref from the Perl sections section?

Yes, that makes sense.

I would NEVER have looked there, as:

1) It wasn't in the Perl or Configuration section
2) I wasn't trying to pass environment variables to CGI scripts. :-)

I'll have to learn to use the search functionality!

I'm not sure if I've said it before, but thanks for doing all that you 
do for the mod_perl community. I appreciate it.

--
-- Tom Mornini
-- InfoMania Printing and Prepress
--
-- ICQ: 113526784, AOL, Yahoo, MSN and Jabber: tmornini




Re: DBI make apache fail in perl58.dll

2002-08-15 Thread Randy Kobes

On Thu, 15 Aug 2002, pascal barbedor wrote:

 Hi 
 
 the following startup.pl
 makes apache segfault in perl58.dll on windows XP(or 2000)
 
 version are : 
 apache 2.0.40-dev
 perl 5.8.0
 modperl 1.99
 mysqld-nt 3.23.49
 
 DBI 1.30
 DBD::Mysql 2.1017
 
 from perl 5.8-win32-bin.tar.gz ready-to-use RK archive (date
 25/07/02) in theoryx5.uwinnipeg.ca/public/other
 
 here is the startup (only added lines after #added, everything works fine without):
 
 use Apache2 ();
 use ModPerl::Util ();
 use Apache::RequestRec ();
 use Apache::RequestIO ();
 use Apache::RequestUtil ();
 use Apache::Server ();
 use Apache::ServerUtil ();
 use Apache::Connection ();
 use Apache::Log ();
 use Apache::Const -compile = ':common';
 use APR::Const -compile = ':common';
 use APR::Table ();
 use Apache::compat ();
 use ModPerl::Registry ();
 use CGI ();
 
 #added
 
 use DBI();
 use DBD::Mysql();
 
 1;
 
 - apache fails the same if use DBI() line alone or use DBD::Mysql() line alone

I find that too ... Gerald, a little while ago, mentioned in a
message to the dev list that latter DBIs work only if they come
into play after the perl interpreter has been cloned - perhaps
this is related to problems with using DBI in a startup script?

 - same from a registry script

This I don't find - pulling in DBI and DBD::mysql in a registry
script seems to work OK in some simple mysql queries. For this
libmySQL.dll has to be in the PATH, which I often forget ...

It might be though that the versions you have have something
broken in this respect - I just put up a new perl-5.8/Apache-2
binary in perl-5.8-win32-bin.tar.gz at
   ftp://theoryx5.uwinnipeg.ca/pub/other/
which is compiled against apache-2.0.40 (with the recent security
fix) and the cvs modperl-2 sources. It may be worth trying this.

-- 
best regards,
randy




Re: apache2, DBD/Oracle problem

2002-08-15 Thread Stas Bekman

Mike P. Mikhailov wrote:
 Hello Fredo Sartori,
 
 Thursday, August 15, 2002, 1:44:34 PM, you wrote:
 
 I mabe wrong, but what about to move code to setup ENV out from BEGIN
 block ? I wrote simple test below:
 
 # Test.pm
 package Test;
 
 use Apache::Constants   qw ( :common );
 
 BEGIN {
 $ENV{FOO1} = 'BAR1';
 $ENV{FOO2} = 'BAR2';
 }
 
 sub handler {
 my $r = shift;
 $r-print(Content-Type: text/plain\n\n);
 print FOO1=$ENV{FOO1}, FOO2=$ENV{FOO2}\n;
 return OK;
 }
 
 1;
 
 __END__
 
 # httpd.conf
 
 SetEnv   FOO1  QQ1
 SetEnv   FOO2  QQ2
 
 Location /test
 SetHandler  perl-script
 PerlHandler Test
 PerlSendHeader  On
 /Location
 
 One the first request of the fresh apache, I got:
 
 FOO1=BAR1, FOO2=BAR2
 
 On all subsequent requests:
 
 FOO1=QQ1, FOO2=QQ2
 
 I thing this is because mod_perl reset ENV hash on each request, but
 I'm not sure. And I'm on Apache/1.3.23 (Unix) mod_perl/1.26. Not on
 apache2. Did you confirm such behaviour of MP2 ? 

The behaviour didn't change in 2.0.

 Does not find any
 mention which confirm this in the guide :(

It's because 2.0's documentation has its own guide: 
http://perl.apache.org/docs/2.0/

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: apache2, DBD/Oracle problem

2002-08-15 Thread Atsushi Fujita

Hi Stas,

 Can you please try to convert the script into a mod_perl handler and
 test again?

OK, I just checked it.
The result was everything fine using by mod_perl handler!
There was no problem in my new code.

...But I want to use ModPerl::Registry, because this is easy to migrate from
normal CGI script.
Please investigate the reason.

Thank you very much.

Atsushi

PS: I attach my conf and code using by mod_perl handler.

[/conf/httpd.conf]
IfModule mod_perl.c
PerlRequire /yopt/httpd-2.0.39_prefork_perl5.6.1normal/conf/startup.pl

# Perl module Auto-Reloading
PerlModule Apache::Reload
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
PerlSetVar ReloadModules MyApache::* ModPerl::* Apache::*

PerlModule MyApache::test3
Location /MyApache/test3
SetHandler modperl
PerlResponseHandler MyApache::test3
/Location
/IfModule



[/conf/startup.pl]
use Apache2 ();

use lib qw(/yopt/httpd-2.0.39_prefork_perl5.6.1normal/cgi-bin);

# enable if the mod_perl 1.0 compatibility is needed
# use Apache::compat ();

use ModPerl::Util (); #for CORE::GLOBAL::exit

use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();

use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();

use APR::Table ();

use ModPerl::Registry ();

use Apache::Const -compile = ':common';
use APR::Const -compile = ':common';

1;



[/cgi-bin/MyApache/test3.pm]
package MyApache::test3;

use strict;

use Apache::Const -compile = qw(OK);

use DBI;

sub handler {
 my $r = shift;

 my $dsn  = 'dbi:Oracle:';
 my $user = 'username/password';
 my $password = '';

 my $dbh;
 my $sth;

 my $sql = select SEQUENCE_OWNER, SEQUENCE_NAME, LAST_NUMBER from
ALL_SEQUENCES;

 my $rv;
 my @row;

 $r-content_type('text/html');

 $ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.0.1';
 $ENV{'ORACLE_SID'}  = 'ynt0';
 $ENV{'NLS_LANG'}= 'japanese_japan.ja16euc';

 $r-print(Now is:  . scalar(localtime) . br\n);

 $r-print(ORACLE_HOME=$ENV{'ORACLE_HOME'}br\n);
 $r-print(ORACLE_SID=$ENV{'ORACLE_SID'}br\n);
 $r-print(NLS_LANG=$ENV{'NLS_LANG'}br\n);
 $r-print(DSN=$dsn$ENV{'ORACLE_SID'}br\n);

 $dbh = DBI-connect($dsn$ENV{'ORACLE_SID'}, $user, $password)
  or die Cannot connect: .$DBI::errstr;

 $sth = $dbh-prepare($sql)
  or die Cannot prepare: .$dbh-errstr();

 $rv = $sth-execute
  or die Cannot execute: .$sth-errstr();

 $r-print(sth=[$sth],rv=[$rv]br\n);

 while(@row = $sth-fetchrow_array){
  $r-print(@rowbr\n);
 }

 $sth-finish();
 $dbh-disconnect();

 $r-print(brFinished!!br\n);

 return Apache::OK;
}
1;




- Original Message -
From: Stas Bekman [EMAIL PROTECTED]
To: Atsushi Fujita [EMAIL PROTECTED]
Cc: Lyle Brooks [EMAIL PROTECTED]; Fredo Sartori
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 16, 2002 11:42 AM
Subject: Re: apache2, DBD/Oracle problem


 Atsushi Fujita wrote:
  Hi Lyle,
 
 
 I does seem to be an ORACLE environment issue.

 Can you please try to convert the script into a mod_perl handler and
 test again? I doubt this is registry problem, but probably something
 that about setting up the env for mod_perl in general.

 What would help most is to write a test that exposes this problem. I
 don't have Oracle, so if you could help me reproduce the problem, I'd
 know what to fix.

 Thanks!

 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com