mergemem anyone?

2000-02-04 Thread Stas Bekman

Hi,

Did any of you have tried to work with mergemem? 
http://www.ist.org/mergemem/

It's supposed to drastically reduce the size of unshared memory. Currently
is available only for linux and its status is stable.

Comments and experience stories are very welcome.

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



RE: Embperl: problem with module imports

2000-02-04 Thread Gerald Richter


 
 The test.html file contains only the [- use MODULE_HERE -] 
 line. 

Try

[- use MODULE_HERE ; -] 

for whatever reason, Perl likes to see a semikolon here.

Gerald




Re: DSO build questions

2000-02-04 Thread G.W. Haywood

Hi there,

On Thu, 3 Feb 2000, Wang, Pin-Chieh wrote:

 Ged,
 Thanks much for your help, Please tell me if I asked too many
 questions, If you don't I'll keep on ask you questions.  After I
 said that, here is another question.

You aren't asking too many questions, but please forgive me if I can't
get to them to answer them as quickly as you would like.

 I am building an Apache with Mod_perl under DSO. I thought I did
 right, I am using the following parameters for Makefile.PL under
 mod_perl-1.21 directory
 
 APACHE_SRC=../apache_1.3.11/src USE_APACI=1 DO_HTTPD=1 \ 
 ADD_MODULE=rewrite,so,status,info \
 APACHE_PREFIX=/usr/local/apache_dso \
 PERL_MARK_WHERE=1 EVERYTHING=1 
 
 I then
 Make
 Su
 Make install
 
 I then 
 cd ../apache_1.3.11
 ./configure -enable-module=so -enable-module=info
 -prefix=/usr/local/apache_dso
 make
 su
 make install

When you write USE_APACI=1, after you have done 'make install' in the
mod_perl directory you do not have to build in the Apache directory,
mod_perl does it for you.  Watch the output of the scripts and the
compiler as they run, and you will see what is happening if you are
quick.  Use control-s to stop the output if you are not quick, then
use control-q to restart it.

You need to read some more.  Have a look especially at `scenario.pod'
in the Guide.  It builds mod_perl in several different ways, which you
can probably manipulate to suit your own needs.  Unfortunately I have
been ill with 'flu' so my rewrite of this section of the Guide is only
just finished today.  I can't send it to you because Stas needs to
look at it now to make sure I haven't completely screwed it up.  All
the technical information you need is in the existing version (which I
am assuming you now have!), it's just slightly better English after my
rewrite.  I hope.  When we've attended to the English, there will be
some more reorganizing.  Sorry for the inconvenience...

To get mod_perl's Makefile.PL to add your modules you can add lines
like this to your Makefile.PL argument list:

  % /usr/local/bin/perl Makefile.PL \
  APACHE_SRC=../apache_1.3.11/src USE_APACI=1 DO_HTTPD=1 USE_DSO=1 \ 
  APACHE_PREFIX=/usr/local/apache_dso \
  PERL_MARK_WHERE=1 EVERYTHING=1 \
  APACI_ARGS= --enable-module=so, \
  --enable-module=info

The line in your command to perl Makefile.PL which reads:

 APACHE_SRC=../apache_1.3.11/src USE_APACI=1 DO_HTTPD=1 \ 

tells Makefile.PL to make Apache as well as mod_perl but it does not
tell mod_perl to make a DSO binary, that's why I put USE_DSO=1 in my
version above.  You won't save as much memory as you might think using
DSO, and I'd avoid it until there are fewer questions about it.  The
line in your command which reads:

 ./configure -enable-module=so -enable-module=info

should I think read:

./configure --enable-module=so --enable-module=info

which tells Apache that it is to be linked with the mod_info module
and it is to be built ready to load modules dynamically (at run-time,
instead of linking them at compile-time) but it does not mean build
mod_perl itself as a Dynamically Shared Object.

Remember to do 'make clean' in both the mod_perl and the Apache
directories before you start again.

Read the Guide!

Hope this helps.

73,
Ged.






Re: Performance advantages to one large, -or many small mod_perl program?

2000-02-04 Thread Keith Kwiatek

Thanks,

and pardon the newbie question, but by "modules" are you referring to
".pm" files placed in the perl lib directory? OR to some other mod_perl type
file/cofiguration?

Keith

 The best technique is to write all your code using
 modules and having only a few lines of code in the scripts.





RFC: rare species^H^H^H^H^H^H^Hmodules

2000-02-04 Thread Stas Bekman

Hi, All

Probably many of you don't know but there are many Apache::* modules out
there, that can save you a lot of development and debugging time. The
problem is that many modules were never discussed and therefore used. 

I suggest to open a series of posts whose goal to make the introduction of
new and old modules, which by some reason didn't catch in. The modules
that fall into this category are Apache::Registry{BB|NG},
Apache::SubProcess, Apache::VMonitor, Apache::Scoreboard and many more
modules at http://perl.apache.org/src/apache-modlist.html . I have counted
164 modules in this list! 

I suggest to use [RareModules] tag in the subject. So it'll be easy to
utilize the mail archives in the future.

I urge the authors of these rare modules and their users to present a
module per post, with a short description of the module and examples of
usage. The idea is to rise the interest. Once a user wants to learn more
about the module she can read the module's manpage.

What do you think?

P.S. On the same note I want to urge people to release their modules on
CPAN. While it's *preferable* to prepare a Makefile.PL, you can get away
without it. But it's an easy task, since you can "steal" it from many
packages available out there...

I'm sure that there are many modules kept in your stashes and aren't
getting shared with the rest of the mod_perl community. You might think
that the module isn't of a general interest, but you might be very wrong
about it, since someone else probably reinvents the wheel at this very
moment. 

Free the hands of others! Let them create new things, it's a win-win
scenario!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



[RareModules] Apache::SubProcess

2000-02-04 Thread Stas Bekman

So, here is a first rare module: Apache::SubProcess

Doug wrote this module a while ago, but it was never mentioned here on the
list. It's available from CPAN.

The output of Csystem(), Cexec(), and Copen(PIPE,"|program") calls
will not be sent to the browser unless your Perl was configured with
Csfio.

One workaround is to use backticks:

  print `command here`;

But a cleaner solution is provided by the CApache::SubProcess
module. It overrides the exec() and system() calls, with ones that
work correctly under mod_perl.

Let's see a few examples:

  use strict;
  use Apache::SubProcess qw(system exec);
  
  my $r = shift;
  $r-send_http_header('text/plain');
  
  # override built-in system() function
  system "/bin/echo hi there";
  
  # send an output of a program
  my $efh = $r-spawn_child(\env);
  $r-send_fd($efh);
  
  # pass arguments to a program and sends its output
  my $fh = $r-spawn_child(\banner);
  $r-send_fd($fh);
  
  # pipe data to a program and send its output
  use vars qw($String);
  $String = "hello world";
  my($out, $in, $err) = $r-spawn_child(\echo);
  print $out $String;
  $r-send_fd($in);
  
  # override built-in exec() function
  exec "/usr/bin/cal"; 
  
  print "NOT REACHED\n";
  
  sub env {
  my $r = shift;
  #$r-subprocess_env-clear;
  $r-subprocess_env(HELLO = 'world');
  $r-filename("/bin/env");
  $r-call_exec;
  }
  
  sub banner {
  my $r = shift;
  # /usr/games/banner on many Unices
  $r-filename("/usr/bin/banner"); 
  $r-args("-w40+Hello%20World");  
  $r-call_exec;
  }
  
  sub echo {
  my $r = shift;
  $r-subprocess_env(CONTENT_LENGTH = length $String);
  $r-filename("/tmp/pecho");
  $r-call_exec;
  }
  # where /tmp/pecho is:
  # 
  #!/usr/bin/perl 
  #read STDIN, $buf, $ENV{CONTENT_LENGTH}; 
  #print "STDIN: `$buf' ($ENV{CONTENT_LENGTH})\n";


Enjoy!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: Performance advantages to one large, -or many small mod_perl program?

2000-02-04 Thread Stas Bekman

 and pardon the newbie question, but by "modules" are you referring
 to ".pm" files placed in the perl lib directory? OR to some other
 mod_perl type file/cofiguration? 
 
 Keith
 
  The best technique is to write all your code using
  modules and having only a few lines of code in the scripts.

I meant the Perl module, not Apache's mod_foo.

  % perldoc -q module

[snipped]
=head1 Found in /usr/lib/perl5/5.00503/pod/perlfaq7.pod

=head2 How do I create a module?

A module is a package that lives in a file of the same name.  For
example, the Hello::There module would live in Hello/There.pm.  For
details, read Lperlmod.  You'll also find LExporter helpful.  If
you're writing a C or mixed-language module with both C and Perl, then
you should study Lperlxstut.
[snipped]



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Apache-DBILogin-1.5 [was Re: installing ApacheDBI..]

2000-02-04 Thread Brian S. Craigie

I'm had this same problem when I tried to install Apache-DBILogin-1.5 as it
does:
require Apache::DBI

in Makefile.PL to test if apache's DBI is installed.

I don't know how the author ever managed to get the Makefile.PL to succeed.

Removing the require statement from the makefile permits everything to go
ahead on the assumption that Apache::DBI is installed.  I suppose that
properly, it should check for the existance of Apache::DBI by other means.

Cheers!

Brian

Alex Krohn wrote:

 Hi,

 Sorry about the late followup, just recovered from New Years. =) My
 original problem was:

  I've looked in the archives and the docs, but can't seem to find an
  answer. I can't be the only one having this problem. I'm trying to
  install ApacheDBI and it goes on fine, but whenever I try and use it I
  get a compilation error:
 
  Can't locate object method "module" via package "Apache" at
  /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.
 
  Sure enough, as far as I can tell Apache.pm or any of it's base classe's
  don't implement sub module, so I'm not sure how this should work in
  Apache::DBI:
 
  202: ) if ($INC{'Apache.pm'} and Apache-module('Apache::Status'));
 
  (which looks like a nice feature, being able to see the status). Once I
  comment out this block everything works fine. I have mod_perl 1.21
  installed and running fine.
 
  Any ideas?

 Edmund suggested:

   are you trying to use it from the command-line ?
   this won't work, you can only use it running with
   apache/mod_perl.

 This was the problem. I had a syntax error in my startup.pl file, and
 when I ran perl -c startup.pl I got:

 hits:~/batch# perl -c startup.pl
 Can't locate object method "module" via package "Apache" at
 /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.
 BEGIN failed--compilation aborted at startup.pl line 9.
 hits:~/batch#

 So I thought the problem was with Apache::DBI. Of course, the problem
 was somewhere else, and once that was fixed, apache started up (even
 though perl -c gave the same error).

 Perhaps it would be worthwhile making Apache::DBI compile ok when not
 run under mod_perl?

 Cheers,

 Alex



RE: Embperl: loop control bug

2000-02-04 Thread Christian Gilmore

Should embperl then be altered to handle loop control itself or should we just
use [* *] embperl structures to allow us to use perl's control structures
instead of embperl's? In either event, it should probably be documented as a
shortcoming of using embperl's control structures.

Regards,
Christian

 -Original Message-
 From: Gerald Richter [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 03, 2000 11:27 PM
 To: Christian Gilmore; ModPerl Mailing List (E-mail)
 Subject: RE: Embperl: loop control bug


  Embperl (1.2.0) causes a core dump when I put in a loop control
  statement. For
  instance, in the following snippet of code, when the 'last' line
  is reached,
  the apache child dumps core.
 
  [- $i = 0 -]
  [$ while ($i  10) $]
 [+ $i +]br
 [$ if ($i == 5) $]
[- last -]
 [$ endif $]
 [- $i++ -]
  [$ endwhile $]
 
  The problem occurs regardless of what looping mechanism I use
  (foreach, while,
  etc). Can someone confirm that this problem also occurs on
 their system,
  please?
 

 "while/endwhile" are Embperl control statements and "last" is a Perl
 statement. This can't work at all, because Perl doesn't know
 anything about
 Embperl's while/endwhile. This is completly handled by Embperl itself.

 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 925151
 WWW:http://www.ecos.de  Fax:  +49 6133 925152
 -





RE: Embperl: problem with module imports

2000-02-04 Thread Christian Gilmore

Thanks, Gerald. That worked. The documentation should reflect the need for the
semi-colon. The use statement is an example in the section on [- -]. At least
at this spot, if not also in a special gotchas section, it should be
mentioned.

Regards,
Christian

 -Original Message-
 From: Gerald Richter [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 03, 2000 11:29 PM
 To: Christian Gilmore; ModPerl Mailing List (E-mail)
 Subject: RE: Embperl: problem with module imports



 
  The test.html file contains only the [- use MODULE_HERE -]
  line.

 Try

 [- use MODULE_HERE ; -]

 for whatever reason, Perl likes to see a semikolon here.

 Gerald






RE: Embperl: loop control bug

2000-02-04 Thread Christian Gilmore

Actually, the use of last/next still causes a core dump (bus error) with
perl's structures as well. Uncommenting either of the two loop control lines
will cause the dump.

[- $i = 0; -]
[* while ($i  10) { *]
   [+ $i +]br
   [* if ($i == 5) { *]
  [# last; #]
  [- $i++; -]
  [# next; #]
   [* } *]
   [- $i++; -]
[* } *]

Regards,
Christian

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Christian Gilmore
 Sent: Friday, February 04, 2000 10:33 AM
 To: 'Gerald Richter'; 'ModPerl Mailing List (E-mail)'
 Subject: RE: Embperl: loop control bug


 Should embperl then be altered to handle loop control itself
 or should we just
 use [* *] embperl structures to allow us to use perl's
 control structures
 instead of embperl's? In either event, it should probably be
 documented as a
 shortcoming of using embperl's control structures.

 Regards,
 Christian

  -Original Message-
  From: Gerald Richter [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 03, 2000 11:27 PM
  To: Christian Gilmore; ModPerl Mailing List (E-mail)
  Subject: RE: Embperl: loop control bug
 
 
   Embperl (1.2.0) causes a core dump when I put in a loop control
   statement. For
   instance, in the following snippet of code, when the 'last' line
   is reached,
   the apache child dumps core.
  
   [- $i = 0 -]
   [$ while ($i  10) $]
  [+ $i +]br
  [$ if ($i == 5) $]
 [- last -]
  [$ endif $]
  [- $i++ -]
   [$ endwhile $]
  
   The problem occurs regardless of what looping mechanism I use
   (foreach, while,
   etc). Can someone confirm that this problem also occurs on
  their system,
   please?
  
 
  "while/endwhile" are Embperl control statements and "last" is a Perl
  statement. This can't work at all, because Perl doesn't know
  anything about
  Embperl's while/endwhile. This is completly handled by
 Embperl itself.
 
  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 925151
  WWW:http://www.ecos.de  Fax:  +49 6133 925152
  -
 
 





ASP not working

2000-02-04 Thread Johnny Westerlund

Hi there i wonder if someone can help me with getting ASP to work if this is 
unapropriate please forgive my ignorence, and disregard from this message.
I'm running Debian Linux with Apache

Server version: Apache/1.3.9 (Unix) Debian/GNU
Server built:   Oct 30 1999 22:46:08

here is a snip from the error log ..


[Fri Feb  4 10:33:15 2000] [error] [client 194.218.183.240] File does not exist: 
/var/www/blnk.gif
[Fri Feb  4 10:36:08 2000] [error] [asp] [11557] [debug] STARTING ASP HANDLER (v0.17) 
for file /var/www/site/eg/index.html
[Fri Feb  4 10:36:08 2000] [error] [asp] [11557] [debug] GlobalASA package 
Apache::ASP::Demo
[Fri Feb  4 10:36:08 2000] [error] [asp] [11557] [debug] compiling global.asa 
Apache::ASP::Demo
[Fri Feb  4 10:36:08 2000] [error] [asp] [11557] [debug] global.asa routines - 
Application_OnEnd: 1; Application_OnStart: 1; Script_OnEnd: 1; Script_OnStart: 1; 
Session_OnEnd: 1; Session_OnStart: 1; 
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] ASP object created - 
GlobalASA: Apache::ASP::GlobalASA=HASH(0x82f1ebc); Request: 
Apache::ASP::Request=HASH(0x8320208); Response: Apache::ASP::Response=HASH(0x83201fc); 
Server: Apache::ASP::Server=HASH(0x8320088); app_state: 1; basename: index.html; 
buffering_on: 1; cgi_headers: 0; clean: 0; compile_includes: 0; dbg: 2; debugs_output: 
ARRAY(0x8174100); errs: 0; filename: /var/www/site/eg/index.html; global: 
/var/www/site/eg//.; global_package: Apache::ASP::Demo; id: NoCache; includes_dir: ; 
init_packages: ARRAY(0x8320058); mail_alert_to: ; mail_errors_to: ; mtime: 942726290; 
no_cache: 1; no_session: 0; no_state: 1; package: Apache::ASP::Demo; pod_comments: 1; 
r: Apache=SCALAR(0x82f7548); stat_inc: 1; stat_inc_match: zzz; unique_packages: 0; 
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] statinc init
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Digest/MD5.pm /usr/lib/perl5/5.005/i386-linux/Digest/MD5.pm Digest::MD5
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of Tie/Hash.pm 
/usr/lib/perl5/5.005/Tie/Hash.pm Tie::Hash
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Apache/ASP.pm /usr/lib/perl5/Apache/ASP.pm Apache::ASP
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of Config.pm 
/usr/lib/perl5/5.005/i386-linux/Config.pm Config
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Data/Dumper.pm /usr/lib/perl5/5.005/Data/Dumper.pm Data::Dumper
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of re.pm 
/usr/lib/perl5/5.005/i386-linux/re.pm re
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of lib.pm 
/usr/lib/perl5/5.005/lib.pm lib
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of Fcntl.pm 
/usr/lib/perl5/5.005/i386-linux/Fcntl.pm Fcntl
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of Exporter.pm 
/usr/lib/perl5/5.005/Exporter.pm Exporter
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of strict.pm 
/usr/lib/perl5/5.005/strict.pm strict
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of overload.pm 
/usr/lib/perl5/5.005/overload.pm overload
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of vars.pm 
/usr/lib/perl5/5.005/vars.pm vars
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Apache/Connection.pm /usr/lib/perl5/5.005/i386-linux/Apache/Connection.pm 
Apache::Connection
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] skipping StatINC register of 
Apache
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
DynaLoader.pm /usr/lib/perl5/5.005/i386-linux/DynaLoader.pm DynaLoader
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of SDBM_File.pm 
/usr/lib/perl5/5.005/i386-linux/SDBM_File.pm SDBM_File
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of MD5.pm 
/usr/lib/perl5/5.005/i386-linux/MD5.pm MD5
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of Carp.pm 
/usr/lib/perl5/5.005/Carp.pm Carp
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Apache/Symbol.pm /usr/lib/perl5/5.005/i386-linux/Apache/Symbol.pm Apache::Symbol
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Apache/Server.pm /usr/lib/perl5/5.005/i386-linux/Apache/Server.pm Apache::Server
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of DemoASP.pm 
/var/www/site/eg//./DemoASP.pm DemoASP
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
Time/Local.pm /usr/lib/perl5/5.005/Time/Local.pm Time::Local
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of 
File/Basename.pm /usr/lib/perl5/5.005/File/Basename.pm File::Basename
[Fri Feb  4 10:36:09 2000] [error] [asp] [11557] [debug] stat register of MLDBM.pm 
/usr/lib/perl5/MLDBM.pm MLDBM
[Fri 

Apache::ASP

2000-02-04 Thread David Vaught-Alexander

Okay, I'm new to asp. It's been a nightmare getting my redhat 6.0 httpsd
server to even process this stuff. Anyway, I finally got some action. So
after my demo stuff worked for the most part, I tried this guestbook I
generated in Drumbeat 2000...I'm lost.

1. loaded  http://admin.biojazz.com/dbeat/gbook/Index.asp
2. clicked on "add entry"

got what's below

The server error_log says (this is followed by the page
output...arrgggh!)

--

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] STARTING ASP
HANDLER (v0.09) for file
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] GlobalASA
package
Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook___global_asa

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] created
$Application -
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] SessionCookie -
b8724d9dacf210ccfec9940681e5a3bd
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] new session
state Apache::ASP::State=HASH(0x8219850)
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] session timed
out, clearing
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] Session_OnEnd -
session: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] tieing session -

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] forcing groups
cleanup
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] group check
GroupIdb8
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] skipping delete
self - id: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] cleanup groups -
deleted: 0;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
Application_OnEnd
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
Application_OnStart
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] Session_OnStart
- session: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] ASP object
created - Application: Apache::ASP::Application=HASH(0x832ff98);
GlobalASA: Apache::ASP::GlobalASA=HASH(0x8334184); Internal:
Apache::ASP::State=HASH(0x831e574); Request:
Apache::ASP::Request=HASH(0x8314164); Response:
Apache::ASP::Response=HASH(0x8314218); Server:
Apache::ASP::Server=HASH(0x831e4c0); Session:
Apache::ASP::Session=HASH(0x831e5f8); app_start: 0; basename:
ViewEntrySummaries.asp; buffering_on: 1; cgi_do_self: 0; command_line: ;
compile_error: ; compile_includes: ; cookie_path: /; debug: 2;
debugs_output: ARRAY(0x8314398); dirname:
/users/admin/public_html/dbeat/gbook; errors: 0; errors_output:
ARRAY(0x831e52c); filehandle: ; filename:
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp; filter: 0;
global: /users/admin/public_html/dbeat/gbook/.; group_refresh: 3;
groups_refresh: 3; id:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_aspINLINE;
mtime: 948361945; no_cache: ; no_headers: 0; no_session: 0; no_state: ;
pod_comments: 1; r: Apache=SCALAR(0x831408c); remote_ip: 208.32.76.146;
secure_session: ; session_serialize: ; session_timeout: 30;
soft_redirect: ; stat_inc: ; state_db: SDBM_File; state_dir: ./.state;
state_manager: 10;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] compiling -
package:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_aspINLINE;
[Fri Feb  4 02:21:37 2000] [error] [asp] [error] /* Connection Pooler
*/: ?+*{} follows nothing in regexp at (eval 41) line 1660. -- ,
/usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] building cgi
headers
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] sending cgi
headers
[Fri Feb  4 02:21:38 2000] [error] [asp] [debug] [3841] destroying -
asp: Apache::ASP=HASH(0x8334478);




...as the page displays this

Thanks for any hints (and if I ever get jre to work so netscape doesn't
crash each time I hit a j enabled page...well...that's WAY off this
topic isn't it ;-)

-

Errors Output

/* Connection Pooler */: ?+*{} follows nothing in regexp at (eval 204)
line 1660.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818

Debug Output

STARTING ASP HANDLER (v0.09) for file
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp
GlobalASA package
Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook___global_asa

compiling - package: _users_admin_public_html_dbeat_gbook___global_asa;
global.asa routines -
created $Application -
SessionCookie - b8724d9dacf210ccfec9940681e5a3bd
new session state Apache::ASP::State=HASH(0x8157c7c)
session timed out, clearing
Session_OnEnd - session: b8724d9dacf210ccfec9940681e5a3bd;
tieing session -
forcing groups cleanup
group check GroupIdb8
skipping delete self - id: 

Embperl 1.2b9: [error] Modification of a read-only value attempted

2000-02-04 Thread Dirk Lutzebaeck


Totally weird. Suddenly I get the following error message after
uploading a file:

[error] Modification of a read-only value attempted a
t /local/lib/perl5/site_perl/5.005/i386-linux/HTML/Embperl.pm

I think I haven't changed a thing but maybe I'm just stoned...

This is on Embperl 1.2b9 apache 1.3.9 which works flawlessly for
months...

The offending line in Embperl.pm is

if (ref($fdat{$_}) eq 'Fh') 
{
   ${${$fdat{$_}}} = $cgi - uploadInfo($fdat{$_}) ;
}
}

I turned on embperl debugging but I don't know what went wrong.

The HTML code is trivial:

p file is [+ $fdat{'fn'} +]

form
   input type=file name="file_name" size=40
   input type=submit
/form

Embperl debug says:

[5488]REQ:  Embperl 1.2b9 starting... Fri Feb  4 16:38:04 2000

[5488]REQ:  No Safe Eval  All Opcode allowed   mode = mod_perl (3)
[5488]REQ:  Package = HTML::Embperl::DOC::_4
[5488]FORM: file_name=2001_3000_5.csv

And then stops...


Gerald, do you have any opinion on this?

Dirk



Re: Performance advantages to one large, -or many small mod_perl program?

2000-02-04 Thread Stas Bekman

  A module is a package that lives in a file of the same name.  For
  example, the Hello::There module would live in Hello/There.pm.  For
  details, read Lperlmod.  You'll also find LExporter helpful.  If
  you're writing a C or mixed-language module with both C and Perl, then
  you should study Lperlxstut.
  [snipped]
 
 Is there any way to make mod_perl reload modified modules in some
 directories but not check at all in others?  I'd like to avoid
 the overhead of stat'ing the stable modules every time but still
 automatically pick up changes in things under development.

We have discussed this many times before. The conclusion was to modify the
StatINC module to make its behavior configuration more flexible, rather
than just On|Off options. You are very welcome to modify this module and
add it the missing features so you can tell for example:

  PerlSetEnv StatINCDomain /foo /bar

and only these directories will be watched after.

Before you start implementing this feature, please grab the latest copy
from the CVS or CVS snapshot http://perl.apache.org/from-cvs/modperl .

Thanks a lot for this invaluable contribution!

P.S. also take a look at somewhat different solution provided by Randal,
see his Stonehenge::Reload at
http://www.mail-archive.com/modperl@apache.org/msg03068.html

P.S.S - Ha, while looking for Randal's modules at CPAN (they aren't there!
Randal?) I've found Module::Reload module written by Doug and Joshua
Pritikin back in 1998, you might find it useful too!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: Performance advantages to one large, -or many small mod_perl program?

2000-02-04 Thread Leslie Mikesell

According to Ask Bjoern Hansen:
 
  Is there any way to make mod_perl reload modified modules in some
  directories but not check at all in others?  I'd like to avoid
  the overhead of stat'ing the stable modules every time but still
  automatically pick up changes in things under development.
 
 I made that an option for Apache::StatINC. I've made it and lost it a few
 times, but some day I will get it done, tested and commited. :)
 
 I was going to make the trigger on the module name though. Hmn. Maybe look
 at the directory too would make sense.

We have a lot of local modules, some used both by mod_perl and normal
scripts.  To make it easier to keep them updated across machines and
avoid having to 'use lib' everywhere, I put a symlink under the
normal site_perl to a directory that is physically with other web
related work.  So in this case it really is a component of the
module name (mapped by perl to the symlinked directory...) that
I would want as the trigger, but it would be equally likely that
someone would 'use lib' to pick up their local development.

I'd put a lot more programming into the modules and out of the web
scripts if modifications were always picked up automatically without
having to stat the modules that rarely change.

  Les Mikesell
   [EMAIL PROTECTED]



RE: .makepl_args.mod_perl

2000-02-04 Thread Eric Cholet

A newbie question. Though I have successfully built mod_perl from command
line parameters I decided to try the .makepl_args.mod_perl file method from
the Eagle book. I had EVERYTHING=1 as the first line in this file but when I
run I get...

It's makepl_args.mod_perl, not .makepl_args.mod_perl (no leading dot)

--
Eric



Re: mergemem anyone?

2000-02-04 Thread Jeffrey W. Baker

Stas Bekman wrote:
 
 Hi,
 
 Did any of you have tried to work with mergemem?
 http://www.ist.org/mergemem/
 
 It's supposed to drastically reduce the size of unshared memory. Currently
 is available only for linux and its status is stable.
 
 Comments and experience stories are very welcome.

I couldn't contact the website, did you mirror it anywhere?

-jwb



Re: .makepl_args.mod_perl

2000-02-04 Thread Stas Bekman

 A newbie question. Though I have successfully built mod_perl from command
 line parameters I decided to try the .makepl_args.mod_perl file method from
 the Eagle book. I had EVERYTHING=1 as the first line in this file but when I
 run I get...
 
 PerlDispatchHandler.disabled (enable with PERL_DISPATCH=1)
 PerlChildInitHandlerenabled
 PerlChildExitHandlerenabled
 PerlPostReadRequestHandler..disabled (enable with PERL_POST_READ_REQUEST=1)
 PerlTransHandlerdisabled (enable with PERL_TRANS=1)
 PerlHeaderParserHandler.disabled (enable with PERL_HEADER_PARSER=1)
 PerlAccessHandler...disabled (enable with PERL_ACCESS=1)
 PerlAuthenHandler...disabled (enable with PERL_AUTHEN=1)
 PerlAuthzHandlerdisabled (enable with PERL_AUTHZ=1)
 PerlTypeHandler.disabled (enable with PERL_TYPE=1)
 PerlFixupHandlerdisabled (enable with PERL_FIXUP=1)
 PerlHandler.enabled
 PerlLogHandler..disabled (enable with PERL_LOG=1)
 PerlInitHandler.disabled (enable with PERL_INIT=1)
 PerlCleanupHandler..disabled (enable with PERL_CLEANUP=1)
 PerlStackedHandlers.disabled (enable with PERL_STACKED_HANDLERS=1)
 PerlMethodHandlers..disabled (enable with PERL_METHOD_HANDLERS=1)
 PerlDirectiveHandlers...disabled (enable with PERL_DIRECTIVE_HANDLERS=1)
 PerlTableApidisabled (enable with PERL_TABLE_API=1)
 PerlLogApi..disabled (enable with PERL_LOG_API=1)
 PerlUriApi..disabled (enable with PERL_URI_API=1)
 PerlUtilApi.disabled (enable with PERL_UTIL_API=1)
 PerlFileApi.disabled (enable with PERL_FILE_API=1)
 PerlConnectionApi...enabled
 PerlServerApi...enabled
 PerlSectionsdisabled (enable with PERL_SECTIONS=1)
 
 PerlSSI.disabled (enable with PERL_SSI=1)
 
 Can some one tell me how to turn on all callback hooks from this file? (not
 that I really need all the hooks) I read the guide and there is no mention
 of this. 

You probably read the wrong guide. It's 'makepl_args.mod_perl' not
'.makepl_args.mod_perl' (notice the redundant dot)
http://perl.apache.org/guide/install.html#Reusing_Configuration_Parameters

 Also I noted that in the guide most paramters are listed in the
 blue boxes as PERL-* instead of PERL_*. This could be confusing to
 newcomers.

Excuse me? There is no a single PERL- in there. 

 Finally is there a way to find out which hooks are actually turned on in a
 compiled HTTPD?

http://perl.apache.org/guide/install.html#Discovering_whether_some_option_

Hope this helps!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: .makepl_args.mod_perl

2000-02-04 Thread Bakki Kudva

Thank you, Eric. Looks like the Eagle book has an error then. Is there an
errata for it some where? I don't see it on their home page.

bakki

 A newbie question. Though I have successfully built mod_perl from command
 line parameters I decided to try the .makepl_args.mod_perl file method
from
 the Eagle book. I had EVERYTHING=1 as the first line in this file but
when I
 run I get...

 It's makepl_args.mod_perl, not .makepl_args.mod_perl (no leading dot)

 --
 Eric




Re: mergemem anyone?

2000-02-04 Thread Stas Bekman

  Did any of you have tried to work with mergemem?
  http://www.ist.org/mergemem/
  
  It's supposed to drastically reduce the size of unshared memory. Currently
  is available only for linux and its status is stable.
  
  Comments and experience stories are very welcome.
 
 I couldn't contact the website, did you mirror it anywhere?

Nope, I don't. It seems that you experience some net glitches, since I
access it without any problems. (right now!). Here is an excerpt from the
first pafe so you can read about it: 



  Description 
  What is mergemem?

  Since am not able to point it out in such a clear manner, I just put
here a message from the kernel
  mailing list. 

The logic of mergemem is
that if you start several instance of a given program, there is a
good bet
that some memory will be initialised exactly the same. So mergement
is
comparing different instance of a program and find all the identical
pages. Then it puts those page read-only and merge all process to
share
the same physical page. It also puts the page with the copy-on-write
flag so a process can still continue to modify the page, if needed
later.
   
   Just curious, but couldn't one load a process with the data section
shared
   and copy-on-write the instant a program is loaded? Isn't it true that
the
   data section can be paged out of the executable file until it is
written to?
   (Zero-filled pages are initially shared anyhow.)
   
   I'm a little surprised that Linux doesn't do this, or does it? And if
not,
   would doing it get some of the benefits of mergemem without the
runtime
   overhead?

  Linux does all this. The mergemem gadget goes much further. The idea is
  that most program starts and then initialise various stuff. At this
point,
  the share pages are not shared anymore since the program have written in
  them. So the data have been loaded of the executable and modified.

  The end result is that if you start two instance of the same
  program, it will perform basically the same initialisation,
  creating a set of duplicate "modified" pages. The OS can't know
  that easily. Here is an example.

  int main ()
  {
  // Create a special table based on the hostname
  char table[1];
  for (i=0; i1; i++){
  ...
  }
  // Then from now on, use that table unmodified
  // as a lookup for example
  }

  In this example, each instance of the program is initialising a 10k
table
  with the exact same data, which is not fixed.

  The mergemem patch walks the page allocated to all instance of a program
  and find the one which are identical. It then remove the duplicates and
  point all process to the same "write-protect with copy-on-write" page.

  For example, I assume that if you have a text editor and load a 10 meg
  document, then start another copy of the text editor and load the same
  document, the mergemem patch will merge most of this 10 meg. now, the
  minute you start editing the document in one editor, the page will start
  to differentiate again.

  The end result is about the same as if the original text editor had done
a
  fork().

  But the idea of mergemem is that most program start and perform some
  initialisation and all instance of the program share some amount of this
  initialisation. This is "this amount" that mergemem can find.

  The question is "is it worth it". From the date I have seen, it sounds
  like it might be very useful on a multi-users server. Time will tell.

  Also the paper for the 6th International Linux-Kongress has a lot of
interesting information. 
  Status 
  We think it is perfectly stable (in terms of machine craches). 


Enjoy

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



RE: Apache::ASP

2000-02-04 Thread Alex Schmelkin

David,

You've written your ASP in JavaScript (or Drumbeast 2000 did it for you).
Apache::ASP is for scripts written in PERL that want to take advantage of
the ASP object API.  If you want to run your JavaScript ASP on a non-IIS
platform you will have to go with another solution (like from ChiliSoft).

Hope this help,
Alex

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of David Vaught-Alexander
 Sent: Friday, February 04, 2000 5:29 AM
 To: [EMAIL PROTECTED]
 Subject: Apache::ASP


 Okay, I'm new to asp. It's been a nightmare getting my redhat 6.0 httpsd
 server to even process this stuff. Anyway, I finally got some action. So
 after my demo stuff worked for the most part, I tried this guestbook I
 generated in Drumbeat 2000...I'm lost.

 1. loaded  http://admin.biojazz.com/dbeat/gbook/Index.asp
 2. clicked on "add entry"

 got what's below

 The server error_log says (this is followed by the page
 output...arrgggh!)

 --

 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] STARTING ASP
 HANDLER (v0.09) for file
 /users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] GlobalASA
 package
 Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook___global_asa

 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] created
 $Application -
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] SessionCookie -
 b8724d9dacf210ccfec9940681e5a3bd
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] new session
 state Apache::ASP::State=HASH(0x8219850)
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] session timed
 out, clearing
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] Session_OnEnd -
 session: b8724d9dacf210ccfec9940681e5a3bd;
 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] tieing session -

 [Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] forcing groups
 cleanup
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] group check
 GroupIdb8
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] skipping delete
 self - id: b8724d9dacf210ccfec9940681e5a3bd;
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] cleanup groups -
 deleted: 0;
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
 Application_OnEnd
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
 Application_OnStart
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] Session_OnStart
 - session: b8724d9dacf210ccfec9940681e5a3bd;
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] ASP object
 created - Application: Apache::ASP::Application=HASH(0x832ff98);
 GlobalASA: Apache::ASP::GlobalASA=HASH(0x8334184); Internal:
 Apache::ASP::State=HASH(0x831e574); Request:
 Apache::ASP::Request=HASH(0x8314164); Response:
 Apache::ASP::Response=HASH(0x8314218); Server:
 Apache::ASP::Server=HASH(0x831e4c0); Session:
 Apache::ASP::Session=HASH(0x831e5f8); app_start: 0; basename:
 ViewEntrySummaries.asp; buffering_on: 1; cgi_do_self: 0; command_line: ;
 compile_error: ; compile_includes: ; cookie_path: /; debug: 2;
 debugs_output: ARRAY(0x8314398); dirname:
 /users/admin/public_html/dbeat/gbook; errors: 0; errors_output:
 ARRAY(0x831e52c); filehandle: ; filename:
 /users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp; filter: 0;
 global: /users/admin/public_html/dbeat/gbook/.; group_refresh: 3;
 groups_refresh: 3; id:
 _users_admin_public_html_dbeat_gbook_ViewEntrySummaries_aspINLINE;
 mtime: 948361945; no_cache: ; no_headers: 0; no_session: 0; no_state: ;
 pod_comments: 1; r: Apache=SCALAR(0x831408c); remote_ip: 208.32.76.146;
 secure_session: ; session_serialize: ; session_timeout: 30;
 soft_redirect: ; stat_inc: ; state_db: SDBM_File; state_dir: ./.state;
 state_manager: 10;
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] compiling -
 package:
 _users_admin_public_html_dbeat_gbook_ViewEntrySummaries_aspINLINE;
 [Fri Feb  4 02:21:37 2000] [error] [asp] [error] /* Connection Pooler
 */: ?+*{} follows nothing in regexp at (eval 41) line 1660. -- ,
 /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] building cgi
 headers
 [Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] sending cgi
 headers
 [Fri Feb  4 02:21:38 2000] [error] [asp] [debug] [3841] destroying -
 asp: Apache::ASP=HASH(0x8334478);


 --
 --

 ...as the page displays this

 Thanks for any hints (and if I ever get jre to work so netscape doesn't
 crash each time I hit a j enabled page...well...that's WAY off this
 topic isn't it ;-)

 --
 ---

 Errors Output

 /* Connection Pooler */: ?+*{} follows nothing in regexp at (eval 204)
 line 1660.
 , 

RE: Embperl 1.2b9: [error] Modification of a read-only value attempted

2000-02-04 Thread Gerald Richter

 Totally weird. Suddenly I get the following error message after
 uploading a file:

 [error] Modification of a read-only value attempted a
 t /local/lib/perl5/site_perl/5.005/i386-linux/HTML/Embperl.pm


 Gerald, do you have any opinion on this?


Upgrade to 1.2.1. If you get this error depends on your CGI.pm version and
the filename at the client side. This problem is solved in newer version of
Embperl

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 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-



RE: Embperl: loop control bug

2000-02-04 Thread Gerald Richter


 Should embperl then be altered to handle loop control itself or
 should we just
 use [* *] embperl structures to allow us to use perl's control structures
 instead of embperl's? In either event, it should probably be
 documented as a
 shortcoming of using embperl's control structures.


Use the Embperl controlstructures ([$ while $]) they work for sure, the [*
*] blocks should be marked as expermimental in the docs, but I have remove
this warning for whatever reason. That my fault.

As I see from the mails in the last time [* *] blocks sometimes really
behaves weired. It's on the TODO list...

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 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-



Re: .makepl_args.mod_perl

2000-02-04 Thread Stas Bekman

 Thank you, Eric. Looks like the Eagle book has an error then. Is there an
 errata for it some where? I don't see it on their home page.

It's a typo indeed, several occurences at the page 649.

The Errata is available from the place it's supposed to be -- the
publisher's site:  http://www.ora.com/catalog/wrapmod/errata/

Doug, will you please link to this page from www.modperl.com ? 

Bakki, you have spotted the one which is not on the list.

I've just submitted this errata to O'Reilly thru:
http://www.oreilly.com/cgi-bin/errata.form/wrapmod


  A newbie question. Though I have successfully built mod_perl from command
  line parameters I decided to try the .makepl_args.mod_perl file method
 from
  the Eagle book. I had EVERYTHING=1 as the first line in this file but
 when I
  run I get...
 
  It's makepl_args.mod_perl, not .makepl_args.mod_perl (no leading dot)
 
  --
  Eric
 
 
 



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: .makepl_args.mod_perl

2000-02-04 Thread David McCabe

 From: Bakki Kudva [EMAIL PROTECTED]
 Date: Fri, 04 Feb 2000 11:52:43 -0500
 Subject: Re: .makepl_args.mod_perl
 To: modperl-list [EMAIL PROTECTED]
 
 Thank you, Eric. Looks like the Eagle book has an error then. Is there an
 errata for it some where? I don't see it on their home page.
 
  It's makepl_args.mod_perl, not .makepl_args.mod_perl (no leading dot)

From the eg/makepl_args.mod_perl file, included in the mod_perl 1.21 distribution:

#example makepl_args.mod_perl files
#copy this file to $ENV{HOME}/.makepl_args.mod_perl and edit to taste

#mod_perl's Makefile.PL will also look for this file in ./ ../ relative
#to the mod_perl-x.xx source tree

So both work, depending on where the file is. I use the .makepl... form, in my $HOME
dir, so that I don't have to edit a new one for every new version. :)



David McCabe  Unix SysAdmin/Peon
Le Groupe Videotron [EMAIL PROTECTED]   (514) 380 4433

Hard work pays off in the future. Laziness pays off now.
  Steven Wright



[RareModules] Apache::VMonitor

2000-02-04 Thread Stas Bekman

Apache::VMonitor - Visual System and Apache Server Monitor

   This module emulates the reporting functionalities of
   top(), mount(), df() and ifconfig() utilities. There
   is a special mode for mod_perl processes. It has a
   visual alert capabilities and configurable automatic
   refresh mode. All the sections can be shown/hidden
   dynamically through the web interface.

   The are two main modes:

   o Multi processes mode
All system processes and information are shown.
   o Single process mode
An indepth information about a single process is
shown.

The main advantage of this module is that it reduces the need to telnet to
machine in order to monitor it. And provides an indepth information about
mod_perl processes that cannot be acquired from telneting to machine.

More info in the extensive module's manpage.

It requires Apache::Scoreboard and GTop to work. GTop in turn requires
libgtop library. It's not available for all platfrorms. Visit
http://www.home-of-linux.org/gnome/libgtop/ to check whether your
platform/flavor is supported.

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: RareModules

2000-02-04 Thread Stas Bekman

 On Fri, 4 Feb 2000, Stas Bekman wrote:
 
  I suggest to open a series of posts whose goal to make the
  introduction of new and old modules [snip] What do you think?
 
 Good idea!
 
 Let's do Apache::VMonitor - I read in the docs that it needs GTop
 so I read the GTop docs and that needs...

Just sent...

 Don't you just hate it when that happens?
 
 Can I run Apache::VMonitor on my libc5 systems?

I think yes. it's linux RH5.2 am I right?  See
http://www.userfriendly.net/linux/RPM/libgtop_common.so.0.html You need at
least glibtop-1.0.1... 

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: .makepl_args.mod_perl

2000-02-04 Thread Bakki Kudva

  Also I noted that in the guide most paramters are listed in the
  blue boxes as PERL-* instead of PERL_*. This could be confusing to
  newcomers.

 Excuse me? There is no a single PERL- in there.

I am not sure what is going on here. You are right! In Netscape it appears
correctly as underscores. But in IE5 on my machine it does use hyphens
everywhere! (IE5 bug? Could someone please verify this?) But when I cut 
paste from it I do get the correct form  "PERL_HEADER_PARSER" as an example.
Just an interesting aside here is that meaning of the word hyphen (according
to Webster) from Greek hyph'hen meaning "under one" would seem to mean the
underscore while the punctuation mark for hyphen is '-'.

  Finally is there a way to find out which hooks are actually turned on in
a
  compiled HTTPD?

 http://perl.apache.org/guide/install.html#Discovering_whether_some_option_

 Hope this helps!

Thank you Stas...sorry I missed that.

bakki




Re: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread Simon Rosenthal

At 06:17 PM 2/4/00 +0200, Stas Bekman wrote:
The next module is Apache::RegistryNG.

CApache::RegistryNG is the same as CApache::Registry, aside from
using filename instead of URI for the namespace. It also uses OO
interface.

   snip

There is no compelling reason to use CApache::RegistryNG over
CApache::Registry, unless you want to do add or change the
functionality of the existing IRegistry.pm.  For example,
CApache::RegistryBB (Bare-Bones) is another subclass that skips the
stat() call performed by CApache::Registry on each request.


One situation where Apache::RegistryNG  may definitely be required  is if 
you are rewriting URLS  (using either mod_rewrite or your own handler)  in 
certain ways.

For instance  if you  have a rewrite rule  of the form XYZ123456.html  == 
/perl/foo.pl?p1=XYZp2=123456
Apache::Registry loses big, as it recompiles foo.pl  for each unique 
URL.  We ran into this and were totally baffled  as to why we had no 
mod_perl performance boost  until Doug pointed us to RegistryNG, which is 
definitely your friend in these circumstances.

- Simon

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



Re: .makepl_args.mod_perl

2000-02-04 Thread Bakki Kudva

A big THANK YOU to all for clarifying the usage of this file.

bakki

 So both work, depending on where the file is. I use the .makepl... form,
in my $HOME
 dir, so that I don't have to edit a new one for every new version. :)

 David McCabe  Unix SysAdmin/Peon




Can't upgrade that kind of scalar (and more)

2000-02-04 Thread Ed Loehr

I've scoured deja.com, FAQs, modperl list archives at 
forum.swarthmore.edu, 'perldoc mod_perl_traps', experimented ad
nauseum 
for 4 days now... this modperl newbie is missing something
important...

Lasting gratitude and a check in the mail for dinner on me to any of
you
who can offer any tips/help which unlock this riddle for me...

Cheers,
Ed Loehr

SYMPTOMS...
---
Spurious errors in my error_log with increasingly nasty consequences:

Can't upgrade that kind of scalar at XXX line NN...
Not a CODE reference at XXX line NN...
Modification of a read-only value attempted at XXX line NN...
Attempt to free unreferenced scalar.
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar at XXX line NN...

Once upon a time, the server was fully functional even with these
occasional error messages (which is why I ignored them originally).
Now, they are frequent showstoppers, causing requests to fail
altogether with 500 errors and occasional segfaults...

I'm lumping these together because I suspect they are all related.
In any case, the severest of these at present seems to be the

Can't upgrade that kind of scalar at XXX line NN...

message, which causes the request to fail and seems to foul up that
child for the rest of its life.


FAILED REMEDIES...
--
- Turned off PerlFreshRestart
- Got rid of '$| = 1;'
- Got rid of #!/usr/bin/perl -w (!!)
- Check 'use diagnostics' output
- Got rid of string regex optimization flags ( $key =~
m/^xyz/o )
- Replaced use of 'apachectl restart' with
stop-sleep3-startssl;
- use Carp ();  local $SIG{__WARN__} = \Carp::cluck;
- Changed global all instances of global 'my $var = 0' to
'use vars qw($var);  $var = 0;'
- Commented out Apache::Registry
(Most of these are just suggestions I found during my hunt...)

CONFIGURATION...

(detailed config dumps below)
mod_perl 1.21 (*NOT* Apache::StatINC)
mod_ssl 2.4.9
openssl 0.9.4
perl 5.005_03
DBI 1.13 (*NOT* using Apache::DBI)
DBD::Pg 0.92
Apache 1.3.9 (*VERY* lightly loaded)
Linux 2.2.12-20smp (RH 6.1), 1Gb RAM, RAID 5 (*lots* of free
mem)
Dual PII 450 cpus
Using modified TicketMaster scheme from Eagle book

OBSERVATIONS...
---
I'm convinced the code referenced by the error msgs (XXX line NN) is
almost at random; typically code that's worked flawlessly before
(sometimes my code, often not).  I suspect the line numbers in the
error msg may be screwed up.  #line did not clarify things.

If I rearrange my code, I have been able to make the error "move" to
another module (eg., from Exporter.pm to CGI.pm).  Smell like a stack
corruption problem?  Currently, the first unsuccessful statement is:

# ($r is the usual apache request object)
return ($retval,$msg)
unless $ticket{'ip'} eq
$r-connection-remote_ip;


In -X mode, once the server process hits one of these, it can no
longer
serve any modperl-generated page without a 500 error, occasionally
segfaulting in the process.

This also happens on both production and development server in
slightly
different manifestations (with slightly different httpd.conf files).

Other change factors that may or may not be related:  new firewall
rules,
increased number of open file handles (echo 8192 
/proc/sys/file-max),
increased load, RAM upgrade, numerous modperl app src code changes,
added
more use of Time::HiRes to other modules, new SSL certificate, and
more...

Finally, totally commenting out my incarnation of the TicketMaster
scheme
from the Eagle book (cookie-based passworded sessions) *seems* to
remove
the problem, but it's a moving target so I'm not sure of that yet. 
Have
been unable to determine what it might be within TicketMaster that is
causing the problem.

NEXT STEPS...
-
Try removing Logger.pm from Apache::Ticket*
Whittle down until minimal set produces error?
Autoload troubles?
Find/try MacEachern's Apache::Leak?  Hunting XS errors?
Apache::Vmonitor?
Relying on $_ in foreach loops?
SSL Certificate differences?
Dreaded Last Step: setup debugger and chase ...

# /usr/local/apache_ssl/bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_ssl.c
  mod_perl.c

# /usr/local/apache_ssl/bin/httpd -V
Server version: Apache/1.3.9 (Unix)
Server built:   Dec  9 1999 11:40:44
Server's Module Magic Number: 19990320:6
Server compiled with
 -D EAPI
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES

Re: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread Stas Bekman

 At 06:17 PM 2/4/00 +0200, Stas Bekman wrote:
 The next module is Apache::RegistryNG.
 
 CApache::RegistryNG is the same as CApache::Registry, aside from
 using filename instead of URI for the namespace. It also uses OO
 interface.
 
snip
 
 There is no compelling reason to use CApache::RegistryNG over
 CApache::Registry, unless you want to do add or change the
 functionality of the existing IRegistry.pm.  For example,
 CApache::RegistryBB (Bare-Bones) is another subclass that skips the
 stat() call performed by CApache::Registry on each request.
 
 
 One situation where Apache::RegistryNG  may definitely be required  is if 
 you are rewriting URLS  (using either mod_rewrite or your own handler)  in 
 certain ways.
 
 For instance  if you  have a rewrite rule  of the form XYZ123456.html  == 
 /perl/foo.pl?p1=XYZp2=123456
 Apache::Registry loses big, as it recompiles foo.pl  for each unique 
 URL.  We ran into this and were totally baffled  as to why we had no 
 mod_perl performance boost  until Doug pointed us to RegistryNG, which is 
 definitely your friend in these circumstances.

Huh? Why would Apache::Registry recompile /perl/foo.pl ? 

p1=XYZp2=123456 is a query string and it doesn't affect the created
script's package name.  Do I miss something? 


___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread G.W. Haywood

Hi there,

On Fri, 4 Feb 2000, Stas Bekman wrote:

 CApache::RegistryNG inherits from CApache::PerlRun, but the
 handler() is overriden.

Does this have any implications for users of `dirty' scripts?

Obviously such scripts will be `legacy' code, of course...

73,
Ged.



Re: .makepl_args.mod_perl

2000-02-04 Thread G.W. Haywood

Hi there,

It looks like you have all your questions answered now, but I have one
or two.

On Fri, 4 Feb 2000, Bakki Kudva wrote:

 I read the guide and there is no mention of this. Also I noted that
 in the guide most paramters are listed in the blue boxes as PERL-*
 instead of PERL_*.

Stas is right, there is no instance of PERL- in his Guide.  And what's
this about blue boxes?  Don't forget that some of us worry so much
about x-rays and our eyes (or are so old-fashioned) that we still use
monochrome screens for the serious stuff...

So where did you get this `guide' and what referred you to it?  We
should find it and try to prevent other people being led astray by it.

73,
Ged.



Re: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread Stas Bekman

  CApache::RegistryNG inherits from CApache::PerlRun, but the
  handler() is overriden.
 
 Does this have any implications for users of `dirty' scripts?

Apache::PerlRun is for the `dirty' scripts, Apache::RegistryNG is not.

 Obviously such scripts will be `legacy' code, of course...
 
 73,
 Ged.
 
 



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread Stas Bekman

On Fri, 4 Feb 2000, Simon Rosenthal wrote:

 At 07:55 PM 2/4/00 +0200, Stas Bekman wrote:
   At 06:17 PM 2/4/00 +0200, Stas Bekman wrote:
   The next module is Apache::RegistryNG.
   
   CApache::RegistryNG is the same as CApache::Registry, aside from
   using filename instead of URI for the namespace. It also uses OO
   interface.
   
  snip
  
   There is no compelling reason to use CApache::RegistryNG over
   CApache::Registry, unless you want to do add or change the
   functionality of the existing IRegistry.pm.  For example,
   CApache::RegistryBB (Bare-Bones) is another subclass that skips the
   stat() call performed by CApache::Registry on each request.
  
  
   One situation where Apache::RegistryNG  may definitely be required  is if
   you are rewriting URLS  (using either mod_rewrite or your own 
  handler)  in
   certain ways.
  
   For instance  if you  have a rewrite rule  of the form XYZ123456.html  ==
   /perl/foo.pl?p1=XYZp2=123456
   Apache::Registry loses big, as it recompiles foo.pl  for each unique
   URL.  We ran into this and were totally baffled  as to why we had no
   mod_perl performance boost  until Doug pointed us to RegistryNG, which is
   definitely your friend in these circumstances.
 
 Huh? Why would Apache::Registry recompile /perl/foo.pl ?
 
 p1=XYZp2=123456 is a query string and it doesn't affect the created
 script's package name.  Do I miss something?
 
 Yup, or I wasn't clear enough . The point was that we had a whole class of 
 URLS that would yield different package names for Registry, even though 
 they were all being processed by the same file.
 
 Add to my example above  another rewrite:  ABC99.html = 
 /perl/foo.pl?p1=ABCp2=99...
 (and another, and another...)
   They all yield different package names  based on the original URL (at 
 least if you use mod_rewrite), so Registry has no way of knowing that they 
 are all processed by the same script. RegistryNG doesn't have this problem, 
 since  the package name is based on $r-filename, which is the same for all 
 of them.

Ok, just so I could show a complete example for the guide, the rule:

  XYZ123456.html = /perl/foo.pl?p1=XYZp2=123456

generates the package Apache::root::...::XYZ123456_2ehtml ? This explains
my confusion.

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: Apache-DBILogin-1.5 [was Re: installing ApacheDBI..]

2000-02-04 Thread John D Groenveld

Thank you for CC'ng me. I've been away from modperl for a while and my
modperl mail folder has 3500 thousand messages waiting for me to sort 
through. :(

 I don't know how the author ever managed to get the Makefile.PL to succeed.
Guilty as charged. Its pretty poor code and you're right that it should
be removed until Edmund gets Apache::DBI to compile outside the box.

Short of a clean solution, I'll just print a reminder in Makefile.PL that
Apache::DBI needs to be installed.

Thanks and happy hacking.
John
[EMAIL PROTECTED]



RE: [Rare Modules] Apache::RegistryNG

2000-02-04 Thread Geoffrey Young

Simon - 

I'm not seeing the behavior you document after running a few tests...

can you provide a specific RewriteRule and other relevant info?

while mod_rewrite kinda has it own rules of play, the documentation says
that the latest phase it touches is the Fixup phase, which, it explains, is
before content manipulation therefore, as I understand it, before a
PerlHandler has a chance to do anything...

so, in theory, your problems sounds kinda weird (yet interesting) to me...

hmmm

--Geoff

 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 04, 2000 1:25 PM
 To: mod_perl list
 Subject: Re: [Rare Modules] Apache::RegistryNG
 
 
 On Fri, 4 Feb 2000, Simon Rosenthal wrote:
 
  At 07:55 PM 2/4/00 +0200, Stas Bekman wrote:
At 06:17 PM 2/4/00 +0200, Stas Bekman wrote:
The next module is Apache::RegistryNG.

CApache::RegistryNG is the same as 
 CApache::Registry, aside from
using filename instead of URI for the namespace. It 
 also uses OO
interface.

   snip
   
There is no compelling reason to use CApache::RegistryNG over
CApache::Registry, unless you want to do add or change the
functionality of the existing IRegistry.pm.  For example,
CApache::RegistryBB (Bare-Bones) is another subclass 
 that skips the
stat() call performed by CApache::Registry on each request.
   
   
One situation where Apache::RegistryNG  may definitely 
 be required  is if
you are rewriting URLS  (using either mod_rewrite or your own 
   handler)  in
certain ways.
   
For instance  if you  have a rewrite rule  of the form 
 XYZ123456.html  ==
/perl/foo.pl?p1=XYZp2=123456
Apache::Registry loses big, as it recompiles foo.pl  
 for each unique
URL.  We ran into this and were totally baffled  as to 
 why we had no
mod_perl performance boost  until Doug pointed us to 
 RegistryNG, which is
definitely your friend in these circumstances.
  
  Huh? Why would Apache::Registry recompile /perl/foo.pl ?
  
  p1=XYZp2=123456 is a query string and it doesn't affect 
 the created
  script's package name.  Do I miss something?
  
  Yup, or I wasn't clear enough . The point was that we had a 
 whole class of 
  URLS that would yield different package names for Registry, 
 even though 
  they were all being processed by the same file.
  
  Add to my example above  another rewrite:  ABC99.html = 
  /perl/foo.pl?p1=ABCp2=99...
  (and another, and another...)
They all yield different package names  based on the 
 original URL (at 
  least if you use mod_rewrite), so Registry has no way of 
 knowing that they 
  are all processed by the same script. RegistryNG doesn't 
 have this problem, 
  since  the package name is based on $r-filename, which is 
 the same for all 
  of them.
 
 Ok, just so I could show a complete example for the guide, the rule:
 
   XYZ123456.html = /perl/foo.pl?p1=XYZp2=123456
 
 generates the package Apache::root::...::XYZ123456_2ehtml ? 
 This explains
 my confusion.
 
 __
 _
 Stas Bekmanmailto:[EMAIL PROTECTED]  
http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



[JOBS] Global Knowledge Group Inc.

2000-02-04 Thread Michael schout

Hi!

Here is a job posting from the company I work for.  If anyone here has any
general questions, you can just email me, otherwise, you can apply by 
sending your information in to Global Knowledge Group as described at the end
of the posting.

Mike

-

We are looking for several mod_perl application developers immediately.

Who we're looking for:
 
 We're in the market for an Application developer with detailed knowledge of
 web server / web development on Unix systems.  You should have 2+ years
 experience in software development using C/C++, perl/CGI, with a very high
 level of understanding of Apache web server and mod_perl.  mod_perl experience
 on a unix system is the primary requirement. Applicants should be also be
 familiar with SQL and DBI. Should be able to develop high traffic web
 applications and be able to tune the server/apps for system performance. Needs
 to integrate into existing team.  Communication skills a must!
   
Who we are:
 
 Since the monopoly of Network Solutions, Inc has been broken up, Global
 Knowledge Group has been accredited to be a TLD registrar for the .com,
 .net, and .org domains.   We are pre IPO and growing fast.  We are committed
 to our employees and to our customers and our actions always take these 2 
 into consideration.  Our office environment is very relaxed and we like to
 have fun while we get our work done.   We are growing very fast and we project
 about 160 new employees will be needed before the end of this year.  We have
 a virtual officing concept that allows our employees to have home based 
 offices and work remotely.  Our management team has 75+ years experience in
 the hi tech industry and extensive years in the commercial banking industry 
 as well.
   
Please send your resume by email, fax or ground mail to:
 Global Knowledge Group
 7607 Eastmark Dr, Suite 202
 College Station, TX 77840
 Fax: (409) 694-7060
 Email: [EMAIL PROTECTED]
 
If possible, please include a list of mod_perl projects you have worked on as
references.

Feel free to call me at (800) 617 0412 or email me if you have any questions.
Taylor Marvin



X-Forwarded-For problem

2000-02-04 Thread Ewan Edwards

Hi all,

I'm in the process of implementing the Guide's recipe for creating a
light front-end server / mod_perl enabled back-end server in order to
solve a problem with too many database connections being open, but
that's not the problem I'm writing about.

My app doesn't use IPs for state or anything, but just for debugging
purposes, I'm interested in seeing the remote IP in the back-end
server's logs, at least until I know things are running smoothly.

I've successfully compiled Ask's proxy_add_forward module into the
front-end server (Apacke 1.3.9, static build), and the
My::ProxyRemoteAddr handler is running successfully on the mod_perl
back-end server (1.21 btw).

Proxy requests are being handled correctly (I have pages generated with
HTML::Mason on the back-end displaying images only available from the
front end), however, no X-Forwarded-For headers are sent to the back-end
server, and consequently, all I see in the back-end server's logs are
the front-end server's IP.

In order to verify the lack of this key header, I modified the
My::ProxyRemoteAddr handler so that it dumps all of the request headers
to the error_log, as follows (which appears just after the IP check but
before the X-Forwarded-For code from the original handler):

foreach my $key (keys %{$r-headers_in}) {
print STDERR "PRA Handler: request header $key = "
. $r-headers_in-{$key}."\n";
}

In the error_log, I see the following, which is normal for
Netscape-generated requests:

PRA Handler: request header Accept = image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, image/png, */*
PRA Handler: request header Accept-Charset = iso-8859-1,*,utf-8
PRA Handler: request header Accept-Encoding = gzip
PRA Handler: request header Accept-Language = en
PRA Handler: request header Host = my.backend.server:8080
PRA Handler: request header Pragma = no-cache
PRA Handler: request header User-Agent = Mozilla/4.7 [en] (X11; U; Linux
2.2.10 i586)

Looking at the front-end server's /server-info, included in the list of
built in modules, I see:

Module Name: mod_proxy_add_forward.c 
Content handlers: none
Configuration Phase Participation: none
Request Phase Participation: Fixups
Module Directives: none

Looks good to me. My guess is that I'm missing something obvious, but I
can't imagine what. I've checked the list archive for similar problems,
but I can't find examples of anyone complaining about the header not
appearing once the proxy_add_forward module was successfully compiled
into the front-end server.

Any assistance would be greatly appreciated.

Thanks,

-- 
 // 2  Ewan Edwards {e^2}  -=-=-  Web Developer for CSP Internet
// 
\\/ /  mailto:[EMAIL PROTECTED]4252 Commerce Circle, Victoria, B.C.,
 \\/   http://www.csp.net/Canada (250) 953-2680, Fax 953-2659

Oh well, no point in steering now.



CGI::Cookie parse

2000-02-04 Thread Aaron Ross

Hi!
  I'm trying to write an AccessHandler. I'm using CGI::Cookie to, you got it,
create and parse Cookies.  However, I'm getting an error that I don't totally
understand. ( This is mod_perl related... just hold on. )

  If i call 
CGI::Cookie-parse($r-headers_in-get('Cookie'));
  I will get this error:
Can't call method "register_cleanup" on an undefined value at 
/usr/lib/perl5/5.00503/CGI.pm line 262.

  Now that is on this line in the CGI.pm constructor:

   if ($MOD_PERL) {
---Apache-request-register_cleanup(\CGI::_reset_globals);
undef $NPH;
}

  Why does that fail? I'm running under mod_perl.. I mean this is failing when
it is called from a PerlAccessHandler!

  My second question is why does CGI::Cookie create CGI object just to get a
url! The call to CGI::new is becuase of this call in CGI::Cookie-new():

# IE requires the path and domain to be present for some reason.
$path   = CGI::url(-absolute=1) unless defined $path;
# $path = "/" unless defined $path;

  removing the call to CGI::url fixes the error. 

 So.. any advice or explanation?

Aaron




Re: X-Forwarded-For problem

2000-02-04 Thread Ewan Edwards

On Fri, Feb 04, 2000 at 02:33:30PM -0500, Vivek Khera wrote:
 
 EE Looking at the front-end server's /server-info, included in the list of
 EE built in modules, I see:
 
 EE Module Name: mod_proxy_add_forward.c 
 EE Content handlers: none
 EE Configuration Phase Participation: none
 EE Request Phase Participation: Fixups
 EE Module Directives: none
 
 Is this listed above or below the mod_proxy module itself?  On mine it
 is listed above and it works just fine.

It is listed before the mod_proxy entry. I had considered that building
Apache with different module orders could affect the desired operation.
I've tried various module orders, with no difference in behaviour.  The
latest build uses (from config.status):

./configure \
"--with-layout=Apache" \
"--prefix=/web/httpd_docs" \
"--activate-module=src/modules/extra/mod_proxy_add_forward.c" \
"--enable-module=proxy_add_forward" \
"--enable-module=include" \
"--enable-module=info" \
"--enable-module=rewrite" \
"--enable-module=proxy" \
"$@"

In my original post, I neglected to mention the proxy method; I'm using
mod_rewrite for the proxy action, and the ruleset I'm using is as
follows:

RewriteEngine on
RewriteRule ^/images/   - [L]
RewriteRule (.*)\.html$ http://my.backend.server:8080/$1.html [P]

Since mod_rewrite also participates in the Fixups phase, I'm concerned
this might be the cause of the effect. This seems unlikely to me though.

Note that the overall order of modules in the front-end server, as
reported by /server-info is as follows:

mod_proxy_add_forward.c, mod_setenvif.c,
mod_proxy.c, mod_auth.c, mod_access.c, mod_rewrite.c, mod_alias.c,
mod_userdir.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_cgi.c,
mod_dir.c, mod_autoindex.c, mod_include.c, mod_info.c,
mod_status.c, mod_negotiation.c, mod_mime.c, mod_log_config.c,
mod_env.c, http_core.c

Cheers,

-- 
 // 2  Ewan Edwards {e^2}  -=-=-  Web Developer for CSP Internet
// 
\\/ /  mailto:[EMAIL PROTECTED]4252 Commerce Circle, Victoria, B.C.,
 \\/   http://www.csp.net/Canada (250) 953-2680, Fax 953-2659

Who were the beta testers for Preparations A through G?



Re: Problems during Apache mod_perl and ASP installation

2000-02-04 Thread G.W. Haywood

Hi there,

On Fri, 4 Feb 2000, Diego Gomez wrote:

  sh: ./Configure: File or directory not exist

Look in the Guide, in the files `install.pod' and `scenario.pod'.

I think you will find everything you need is there on the first page
or so of each.

73,
Ged.




Re: .makepl_args.mod_perl

2000-02-04 Thread G.W. Haywood

Hi there,

More topical:

Well I think we've done that one.  It seems that if not actually an
error the documents conspire to confuse.  Certainly one for the errata
even if it's not really wrong.  I have a couple of dozen other notes
about the Eagle Book, is there a CVS snapshot of the errata somewhere?
Or something like that?  I'd be glad to contribute/modify/whatever.

Less topical:

On Fri, 4 Feb 2000, Bakki Kudva wrote:

 the word hyphen (according to Webster) from Greek hyph'hen meaning
 "under one" would seem to mean the underscore while the punctuation
 mark for hyphen is '-'.

Would this be an electronic Webster?  It's a little short on content.

The word `hyphen' is late latin.  Its first recorded use in English
seems to be about 1620 [OED].  It means in Latin exactly what we mean
by it today.  The simliar Greek word of the four (er, Greek) letters
upsilon-phi-epsilon-nu means a symbol like the one which is used with
the phonetic alphabet (at least in England) to denote a short vowel
such as both `a's in `amoeba'.  It looks like an upside-down curved
cicumflex or an opening parthenthesis rotated anti-clockwise through
90 degrees.  It is always placed over the vowel.

Sorry, nohow do we get anything you could call an underscore.

73,
Ged.

PS: Stas, erratum = one of them.  Er, it.
  errata = more than one of them:)



Too many arguments for .. problem

2000-02-04 Thread Rafael Caceres

Dear friends:

I've started with mod_perl just a month ago, and have been building a
mod_perl/DBI/Oracle applicacion which went fine, until the following
sequence ocurred:

1) I added the exit() routine from the guide, along with it's corresponding
BEGIN block
2) I started getting the following error on the logs:
[Fri Feb  4 14:57:02 2000] [error] Too many arguments for
Apache::ROOTintranet_2eaasa_2ecom_2epe::cgi_2dbtrack::bugtrack_2epl::do_old_
user at /usr/local/apache/share/cgi-btrack/bugtrack.pl line 142, near "$Pwd1)"

after every file edit and save cycle. And it always refers to the same
subroutine:

sub do_login_work {
   #examine parameters passed and see if user can be passed on, or
should be
#held back at the login.
my $Name = $query-param('Name') || '';
my $Pwd1 = $query-param('Pwd1') || '';

if(length($Name)  length($Pwd1)) 
{
do_old_user($Name,$Pwd1);
} else {
do_more_data();
};
}
sub do_old_user() {
#verify that user is on file to let him proceed
my ($Name,$Pwd1)=@_;
my (@usrpwd);

 The only way to fix it up until now has been to kill and re-start Apache.
It has not helped to try the following:
-comment out the BEGIN block dealing with exit() redefining, and the new
exit() from the Guide
-pre-declare : 
sub do_old_user($$);

What am I doing wrong?

Regards,
Rafael Caceres



Re: CGI::Cookie parse

2000-02-04 Thread Nick Tonkin


use Apache;
use Apache::Cookie;

sub handler {
  my $r = shift;
  my $cookies = Apache::Cookie-new($r)-parse;
  my %bar = $cookies-{foo}-value;
}


much simpler, no?

On Fri, 4 Feb 2000, Aaron Ross wrote:

 Hi!
   I'm trying to write an AccessHandler. I'm using CGI::Cookie to, you got it,
 create and parse Cookies.  However, I'm getting an error that I don't totally
 understand. ( This is mod_perl related... just hold on. )
 
   If i call 
   CGI::Cookie-parse($r-headers_in-get('Cookie'));
   I will get this error:
   Can't call method "register_cleanup" on an undefined value at 
/usr/lib/perl5/5.00503/CGI.pm line 262.
 
   Now that is on this line in the CGI.pm constructor:
 
if ($MOD_PERL) {
 ---Apache-request-register_cleanup(\CGI::_reset_globals);
 undef $NPH;
 }
 
   Why does that fail? I'm running under mod_perl.. I mean this is failing when
 it is called from a PerlAccessHandler!
 
   My second question is why does CGI::Cookie create CGI object just to get a
 url! The call to CGI::new is becuase of this call in CGI::Cookie-new():
 
 # IE requires the path and domain to be present for some reason.
 $path   = CGI::url(-absolute=1) unless defined $path;
 # $path = "/" unless defined $path;
 
   removing the call to CGI::url fixes the error. 
 
  So.. any advice or explanation?
 
 Aaron
 
 
 


- nick




Re: Performance advantages to one large, -or many small mod_perlprogram?

2000-02-04 Thread Joshua Chamas

Ask Bjoern Hansen wrote:
 
 On Fri, 4 Feb 2000, Leslie Mikesell wrote:
 
 [...]
  Is there any way to make mod_perl reload modified modules in some
  directories but not check at all in others?  I'd like to avoid
  the overhead of stat'ing the stable modules every time but still
  automatically pick up changes in things under development.
 
 I made that an option for Apache::StatINC. I've made it and lost it a few
 times, but some day I will get it done, tested and commited. :)
 
 I was going to make the trigger on the module name though. Hmn. Maybe look
 at the directory too would make sense.
 
  - ask
 

When I implemented this for the Apache::ASP StatINCMatch option
it matches on the full path of the file so that someone could
match on directory or name or whatever.

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: CGI::Cookie parse

2000-02-04 Thread Stas Bekman

On Fri, 4 Feb 2000, Aaron Ross wrote:

 Hi!
   I'm trying to write an AccessHandler. I'm using CGI::Cookie to, you got it,
 create and parse Cookies.  However, I'm getting an error that I don't totally
 understand. ( This is mod_perl related... just hold on. )
 
   If i call 
   CGI::Cookie-parse($r-headers_in-get('Cookie'));
   I will get this error:
   Can't call method "register_cleanup" on an undefined value at 
/usr/lib/perl5/5.00503/CGI.pm line 262.
 
   Now that is on this line in the CGI.pm constructor:
 
if ($MOD_PERL) {
 ---Apache-request-register_cleanup(\CGI::_reset_globals);
 undef $NPH;
 }
 
   Why does that fail? I'm running under mod_perl.. I mean this is failing when
 it is called from a PerlAccessHandler!

The solution is to add to Ihttpd.conf:

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



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: .makepl_args.mod_perl

2000-02-04 Thread Stas Bekman

On Fri, 4 Feb 2000, G.W. Haywood wrote:

 Hi there,
 
 More topical:
 
 Well I think we've done that one.  It seems that if not actually an
 error the documents conspire to confuse.  Certainly one for the errata
 even if it's not really wrong.  I have a couple of dozen other notes
 about the Eagle Book, is there a CVS snapshot of the errata somewhere?
 Or something like that?  I'd be glad to contribute/modify/whatever.

Ged, please send the reports directly to Doug or submit them thru the
errata page at oreilly.com. See my previous replies with this very subject
for the exact URL.

 PS: Stas, erratum = one of them.  Er, it.
   errata = more than one of them:)

Mea culpa :)


___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



(Job) Mid-level or Senior Apache/Squid Extranet Developers, Seattle, WA

2000-02-04 Thread andi

Are you open to new opportunties in the Seattle area, or possibly know
someone
with apache or squid web server development experience who might be?

I'm working on 3 jobs, 2 w/ a Unix focus and one with an NT focus on the
same
product.  Ideally they would like the candidate to relo to Seattle, and
provide
full relo, but they are negotiable on this and for the right candidates,
telecommuting instead is possible.

Thanks!

Andi
[EMAIL PROTECTED]



We are looking for a Software Engineer to help create the best ExtraNet
Solutions and Products.
You will be responsible for the Unix components of the ExtraWeb product
that is 90% open source.  Working as part of the product team, this
individual
will develop and enhance existing coss platform components that will be
shared between the Windows NT and Unix/Linux products.  Coordination with
the development lead and program manager will be required for creating
schedules and deliverables to QA.  Network programming at the Berkeley
sockets layer within a threading architecture is required.
Required Skills:
· Previous experience developing and/or debugging Apache modules.
· Minimum of 4 years commercial development experience on one or more Unix
operating system platform.
· Minimum of 1 year of TCP/IP Berkeley sockets programming on Unix.
· Commercial development experience building cross-platform (Unix and
Windows) products.
· Hands on development experience with Unix Daemons, threading, IPC's and
Unix security.
· In depth knowledge of the HTTP protocol, SSL, XML.
· Understanding of basic network security techniques and firewalls is
required.
· In depth knowledge of Internet proxies and caching algorithms.
· Hands on development experience with GNU tools, toolkits, autoconf and
libtool is a pl.
· Use of RCS, SCCS or CVS for source ccode configuration  is a plus.
To apply, send your resume to Andi Levin, [EMAIL PROTECTED]

The company develops Extranet Management and Security (EMS) solutions
that allow organizations to extend their enterprise computing
environments to strategic partners, suppliers, customers, consultants,
and other key individuals outside the physical walls of the corporation.
Their software solutions enable organizations
to increase their competitive advantage, raise profits, and leverage
their investments in existing and future enterprise systems. The software
solutions are designed to simplify the process of creating and enforcing
security policies for internetworking, and adhere to open security
standards simplifies extranet deployment, enables interoperability,
and leverages existing network investments.





Re: CGI::Cookie parse

2000-02-04 Thread Aaron Ross

 Thanks for your help!

 I'll look at Apache::Cookie, too. Although I don't really see the big
difference in simplicity.

Aaron

 On Fri, 4 Feb 2000, Aaron Ross wrote:
 
  Hi!
I'm trying to write an AccessHandler. I'm using CGI::Cookie to, you got it,
  create and parse Cookies.  However, I'm getting an error that I don't totally
  understand. ( This is mod_perl related... just hold on. )
  
If i call 
  CGI::Cookie-parse($r-headers_in-get('Cookie'));
I will get this error:
  Can't call method "register_cleanup" on an undefined value at 
/usr/lib/perl5/5.00503/CGI.pm line 262.
  
Now that is on this line in the CGI.pm constructor:
  
 if ($MOD_PERL) {
  ---Apache-request-register_cleanup(\CGI::_reset_globals);
  undef $NPH;
  }
  
Why does that fail? I'm running under mod_perl.. I mean this is failing when
  it is called from a PerlAccessHandler!
 
 The solution is to add to Ihttpd.conf:
 
   PerlPostReadRequestHandler 'sub { Apache-request(shift) }'
 
 
 
 ___
 Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
 Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
 perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
 single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



module/sandwich kills otherwise nice make test

2000-02-04 Thread JoshNarins

Hello, I searched the mod_perl archive and couldn't
find any instances where module/sandwich (which I don't
need or want) was the one test which failed in the
installation of mod_perl.

I have tried with EVERYTHING=1, all of the major stuff
except SSI, and with no directives to perl Makefile.PL

Hence, I include the traditional information and
the traditional THANK YOU IN ADVANCE.

Please don't let the AOL address lead you to believe
I am a moron from Hoboken. I just work here :)

OS  : RedHat6.1 (2.2.12-20 Linux)
mod_perl version: mod_perl-1.21
Apache version  : Apache/1.3.9
Perl -V :
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.2.5-22smp, archname=i386-linux
uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 
i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 
release)
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under linux
  Compiled at Aug 30 1999 23:09:51
  @INC:
/usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005
.

#
And the output of my sad little make test:

(cd /usr/src/redhat/SOURCES/apache_1.3.9/src   make CC="cc";)
make[1]: Entering directory `/usr/src/redhat/SOURCES/apache_1.3.9/src'
=== regex
make[2]: Nothing to be done for `all'.
=== regex
=== os/unix
make[2]: Nothing to be done for `all'.
=== os/unix
=== ap
make[2]: Nothing to be done for `all'.
=== ap
=== main
make[2]: Nothing to be done for `all'.
=== main
=== lib
=== lib/expat-lite
make[3]: Nothing to be done for `all'.
=== lib/expat-lite
=== lib
=== modules
=== modules/standard
make[3]: Nothing to be done for `all'.
=== modules/standard
=== modules/perl
make[3]: Nothing to be done for `all'.
=== modules/perl
=== modules
cc -c  -I./os/unix -I./include   -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT 
-I./lib/expat-lite -Dbool=char -DHAS_BOOL -I/usr/local/include  
-I/usr/lib/perl5/5.00503/i386-linux/CORE  -I. -I../.. -DUSE_PERL_SSI -DMOD_PERL 
modules.c
cc -c  -I./os/unix -I./include   -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT 
-I./lib/expat-lite -Dbool=char -DHAS_BOOL -I/usr/local/include  
-I/usr/lib/perl5/5.00503/i386-linux/CORE  -I. -I../.. -DUSE_PERL_SSI -DMOD_PERL 
buildmark.c
cc  -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -Dbool=char -DHAS_BOOL 
-I/usr/local/include  -I/usr/lib/perl5/5.00503/i386-linux/CORE  -I. -I../.. 
-DUSE_PERL_SSI -DMOD_PERL\
  -o httpd buildmark.o modules.o modules/perl/libperl.a 
modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a 
regex/libregex.a lib/expat-lite/libexpat.a `perl 
/.cpan/build/mod_perl-1.21/src/modules/perl/ldopts  ` -lm -lcrypt
make[1]: Leaving directory `/usr/src/redhat/SOURCES/apache_1.3.9/src'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Apache'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Apache'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Connection'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Connection'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Constants'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Constants'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/File'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/File'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Leak'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Leak'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Log'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Log'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/ModuleConfig'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/ModuleConfig'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/PerlRunXS'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/PerlRunXS'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Server'
make[1]: Leaving directory `/.cpan/build/mod_perl-1.21/Server'
make[1]: Entering directory `/.cpan/build/mod_perl-1.21/Symbol'
make[1]: Leaving directory 

Re: module/sandwich kills otherwise nice make test

2000-02-04 Thread Vivek Khera

Do you have a recent Apache::Sandwich installed?

I'm still running mod_perl 1.19 because nothing has "forced" me to
upgrade the production servers yet ;-)  Everything worked fine up
through that version, at least.

Can you dig up the error log entries, and what happens if you run the
Sandwich test manually?  The output from that would be helpful.

Please reply only to the list to avoid duplicate copies in my inbox,
thanks.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-301-545-6996
PGP  MIME spoken herehttp://www.kciLink.com/home/khera/



Mod_Perl learning track

2000-02-04 Thread Scott Chapman

Hi all you "been there" guru's.

I'm climbing the learning curve and seeking direction.

A little background then where I'm trying to go:

Pascal, dBase, bash, Visual Basic 3.0 programming experince. This 
included little projects without full "life-cycle" development, etc.  I don't have a 
degree in programming and have never studied beyond the languages (i.e.I 
know 0 about "requirements documents", "CASE", etc.)  I have taught myself 
all I know about programming with very few exceptions.  I've been tinkering 
around for over 10 years.  I've never made a living at programming except 
briefly on my first Turbo Pascal programming project and it wasn't much of a 
living!  My code is far from pro-quality.

I recently decided to learn CGI scripting and chose Perl (after a brief look at 
PHP).  I liked the way PHP allowed me to embed the code in the HTML and 
shortly found EmbPerl and DBI (Thanks Gerald, Doug,Tim and friends!)  In 
November of last year, I got a RedHat box together and recompiled Perl, 
Apache w/ModPerl and Postgres to learn with.  I'm brand new to SQL also.  

My experience has not included any object oriented programming and I 
know very little about it as well.

Progress so far:

My first project is coming to a close.  I have learned a bunch but know it is 
just scratching the surface. I haven't figured out what $r- is about at all as 
I've done everything in EmbPerl and DBI.  

I was a unix email host admin for a couple years, about 6 years ago.  It's 
coming back to me slowly.

Where I'd like to go:

Perl CGI Guru status.  That's where I'd like to go.  Specifically on the 
Linux/Unix side of things.  I don't even know what ASP looks like.

Questions for the group and my first take at answers (_please_ feel free to 
throw out my first take at answers if your experience says otherwise.  I'm not 
trying to answer my own questions here but need solid feedback  :-)

I'm aiming at keeping busy and getting good at this over the next year to two 
years.  By then I expect to be marketable.

What technologies do I need to master (in what order)?

Perl
Apache
Apache API (mod-perl)
SSL?
HTTP?
?
CGI/host security
more UNIX host admin 
HTML?  Do I need this or can I focus on the back end processing?
XML?  I know 0.1 about this.
XHTML?  same.

For the above technologies, I don't see much in the way of books, especially 
Perl-specific books. Good web sites would be greatly appreciated.

What books do I need to read?
  I'm thinking of:

Something to get me further along with Perl:

I've read "Perl and Cgi for the World Wide Web : Visual Quickstart Guide" 
by  Elizabeth Castro and some of the perldocs.

Object oriented programming and OOP in Perl:

Is Damian Conway's book a good enough intro to OOP for a beginner or do 
I need something on OOP before tackling this book.

A good book on SQL.

Good books on system/CGI security 

Other good books on other technologies needed.

I have a lot of learning to do.  (If anyone knows of any technology where I 
can just absorb this stuff in my sleep let me know!:-)

Way on down the road, I'd like to do client/server programming in Perl (that's 
why I didn't stay with PHP and other reasons regarding what happens if I 
decide to change my database backend and have to rewrite all the database 
calls, etc.).  Any thoughts on this?

A fairly tall order.  If I knew of a college that taught all this, I'd probably 
relocate and sign up (and put out my hat for handouts)!  :-)  Please feel free 
to rearrange priorities at any level.  Should I go ahead and ignore CGI on 
NT?  ...any level.

Thanks very much in advance.  I have been very impressed with the 
helpfulness of this mailing list.  I hope this proves to be a good thread for 
those watching and those down the road.

Happy Trails!

--
Scott Chapman
Technical Support Specialist
Lund Performance Solutions
[EMAIL PROTECTED] or [EMAIL PROTECTED]
Phone: 541-926-3800 www.lund.com



Re: Mod_Perl learning track

2000-02-04 Thread Autarch


Well, you have a very large goal.  Obviously, the first thing you need to
do to learn the language.  In your case you've chosen Perl (good choice).
I'd recommend the following books:

You may want to start with Elements of Programming with Perl.  It teaches
you programming from the ground up (assumes no previous knowledge) using
Perl.  I haven't read it but its been well reviewed in multiple places.  
This may be just the thing to get you started.

Programming Perl - don't worry if the chapter on references makes no
sense.  Either of the next two books explains this quite well
(particularly EPP)

Advanced Perl Programming (you can skip some of the chapters though.  The
Tk stuff is not what you're interested in, I don't think) and/or Effective
Perl Programming

Perl Cookbook - lots of examples of good code

Damian Conway's book - this does contain an OO intro but I skipped it.
The book itself is fabulous and invaluable.

Read each of these at least twice (no, I'm not kidding).  You will
definitely miss things the first time through and the best way to fix that
is to keep reading them.  In my case, I've read Prog. Perl  APP 3+ times
each.

For mod_perl, there are two excellent resources that I know of:

1. Doug  Lincoln's book is great and really steps you through the Apache
API via Perl.
2. _Do not_ miss Stas's online guide (soon(?) to be a book).  There's a
reason half (or more) of the newbie questions to the list are answered
with a reference to a piece of the guide.


Once you've done all that you should have a decent idea of what Perl can
do as well as what mod_perl can do (and what it's pitfalls are).

Of course, I highly recommend looking at existing code on CPAN.  Not to be
snobbish, but stick with the 'known' others.  There's some really scary
stuff out there.  For mod_perl, look at the Apache::* modules.


You also mentioned an interest in SQL.  SQL is real easy so pretty much
any book should cut it.  You may want to check out the forthcoming Perl
DBI book regarding database programming in Perl.

 SSL?

You probably will never need to know the inner workings of SSL.  Knowing a
bit about it (what port it uses, what a certificate is, how to install
mod_ssl) is probably something you can pick up as needed.

 HTTP?

You should end up learning at least something about this from Doug's book
and the guide. Again, this is something you can pick up as necessary.
Don't run out and start reading RFCs just yet.

 HTML?  Do I need this or can I focus on the back end processing?

Depends.  Do you want to do UI work?  Better learn HTML.  If you just want
to do back end work and have someone else create the UI then you don't
need to know it too much.

 XML?  I know 0.1 about this.

XML is very cool and has a lot of potential.  OTOH, there's not a heck of
a lot of stuff using it right now so it seems to me that right now it's
largely conceptual (you _could_ do a lot of neat stuff with it but a lot
of it hasn't been done yet).  Save this for later.

 XHTML?  same.

XHTML is almost identical to HTML 4.0.  Learn HTML 4.0 and then read about
XHTML differs from it (which is basically 2 pages of text).

 I've read "Perl and Cgi for the World Wide Web : Visual Quickstart Guide" 
 by  Elizabeth Castro and some of the perldocs.

The Amazon reviews suggest this book is more focused on CGI than Perl.
I'd say skip it.

 Is Damian Conway's book a good enough intro to OOP for a beginner or do 

Until you're more advanced in Perl this book will probably be extremely
arcane.  It's great but you have to have good solid Perl knowledge to
understand a fair chunk of it.

 I need something on OOP before tackling this book.

I dunno.  I picked up OOP by reading other people's code and talking to
fellow programmers, but I'm a weird case.

 A good book on SQL.

Don't spend much time on SQL.  It's just too simple to worry about.

 Good books on system/CGI security 

System security is somewhat different (and much bigger) than CGI security.
I'd suggest you check out securityfocus.com, which should have links to
lots of info (more than you'll ever want).

 Other good books on other technologies needed.

The O'Reilly HTML book is quite good.  Their Regular Expressions book is
also quite good, though it can be pretty difficult (but rewarding).  The
ORA MySQL book is good if you want to use MySQL.  I don't know of any
PostgreSQL books.  To learn about software design in general, read
Frederick Brooks' The Mythical Man-Month, which is quite illuminating.
Other books that may be useful:

Kernigham  Ritchie's C book - I don't like C and I never use it but to be
a 'literate' programmer (as in you have a clue about programming in
general) you should be familiar with C.

W. Richard Stevens' Advanced Programming in the Unix Environment - It's
all C but you learn a _lot_ about Unix that is good general knowledge for
any programmer.  You'd probably need to read the KR book first though.


Everybody tells me LISP and Smalltalk are super cool but I 

Re: RFD: comp.infosystems.www.modperl

2000-02-04 Thread Bill Jones

 From: John Siracusa [EMAIL PROTECTED]

 beneficial to have a newsgroup.  I know Usenet is the first
 place I looked for mod_perl help before finding this list
 (and after finding, buying, and reading the Eagle book ;)


I agree - it's just that I find
people on a mailing list a little
less likely to 'jump bad' onto
complete strangers  :)
__
http://www.fccj.org/cgi/mail?sneex



Re: RFD: comp.infosystems.www.modperl

2000-02-04 Thread Bill Jones

 From: brian moseley [EMAIL PROTECTED]
 Date: Thu, 3 Feb 2000 13:02:01 -0800 (PST)

 what about a mail - news gateway?
 
 

Um, no, it might allow:
'Anonymous spamming' ?
__
http://www.fccj.org/cgi/mail?sneex



Re: RFD: comp.infosystems.www.modperl

2000-02-04 Thread Bill Jones

 From: Ask Bjoern Hansen [EMAIL PROTECTED]

 On Thu, 3 Feb 2000, Bill Jones wrote:
 
 [...]
 I have to whole heartily agree. I couldn't, at first glance, find
 the mod_perl mailing list; but once I did, the posters here proved
 very helpful.  I believe that once more people see the mailing ...
 
 if you fail to read the file called SUPPORT when you need .. uh, ...
 support I would say all bets are off anyway. Actually, people should in
 general not post before reading the few hints in that file.


Yowie!  (Of course, you are correct!)
_
http://www.fccj.org/cgi/mail?sneex




Re: ASP not working

2000-02-04 Thread Joshua Chamas

Johnny Westerlund wrote:
 
 Hi there i wonder if someone can help me with getting ASP to work if this is 
unapropriate please forgive my ignorence, and disregard from this message.
 I'm running Debian Linux with Apache
 

Johnny,

Congrats!  Its working, just that there is a bug in the examples
lastest release, where you should set DynamicIncludes to 1
in the ./site/eg/.htaccess file for them to render with a 
white background instead of black.

I have a new Apache::ASP v.18 being published into CPAN, 
which should have this problem fixed. 

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



newbie question: extra Content-Type headers?

2000-02-04 Thread John Darrow

I apologize if this is a dumb question, but I just installed Apache and
mod_perl and all seems to have gone well.  The trouble comes in when I try
to run a script using Apache::Registry and CGI.pm.  I get an extra
Content-Type in the resulting page, and I can't figure out where it's coming
from.

First example:

#!/usr/bin/perl

print "Content-Type: text/html\n\n";
print "htmlheadtitleboo/title/head";
print "bodyh1I was here./h1/body/html";


This work fine.

Second example:

#!/usr/bin/perl
use CGI qw(:standard);

print header(),
  start_html(-title='boo'),
  h1("this doesn't work!!!"),
  end_html();

This second example ends up printing "Content-type: text/html" at the top of
the page.  Is there something in httpd.conf that tells the server to print
the content type automatically?  Why does the first example work if the
second doesn't, if ultimately they should both end up printing more or less
the same thing.

If I run the second example as a regular CGI script (not under mod_perl) it
comes out fine.

so, I'm stumped.  But I know it's something painfully obvious.

thanks,

-john.





Re: newbie question: extra Content-Type headers?

2000-02-04 Thread Bill Moseley

At 06:21 PM 02/04/00 -0800, John Darrow wrote:
I apologize if this is a dumb question, but I just installed Apache and
mod_perl and all seems to have gone well.  The trouble comes in when I try
to run a script using Apache::Registry and CGI.pm.  I get an extra
Content-Type in the resulting page, and I can't figure out where it's coming
from.

What version of CGI.pm are you running?  Might try upgrading.

Or try turning PerlSendHeader Off.



Bill Moseley
mailto:[EMAIL PROTECTED]



Re: module/sandwich kills otherwise nice make test

2000-02-04 Thread David McCabe

 From: [EMAIL PROTECTED]
 Date: Fri, 04 Feb 2000 16:30:13 -0500 (EST)
 Subject: module/sandwich kills otherwise nice make test
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 
 Hello, I searched the mod_perl archive and couldn't
 find any instances where module/sandwich (which I don't
 need or want) was the one test which failed in the
 installation of mod_perl.

Then remove the Apache::Sandwich module from your system, and 
reconfigure/rebuild/retest mod_perl.
Try a "make uninstall" in the source dir of Apache::Sandwich, after you run a perl 
Makefile.pl
there.

Without the module, mod_perl will skip that test too, like some of the others.



David McCabe  Unix SysAdmin/Peon
Le Groupe Videotron [EMAIL PROTECTED]   (514) 380 4433

Who were the beta testers for Preparations A through G?