Upload file

2000-05-03 Thread Srinidhi Rao S




Hi all,
 I 
am new to perl programming. I am working in a project where I need to upload 
some files in a web interface. I used HTML file upload object with POST 
method. My question how do I receve the uploded file on the server side. 
Is there is any module o call in PERL to do this job. Please help me in this 
regard.
Any help is appriciated.
TIASrinidhi RaoRobosoft 
TechnologiesE-mail: [EMAIL PROTECTED]www.robosoftin.com


Re: [RFC] modproxy:modperl ratios...

2000-05-03 Thread Dave Hodgkinson

Vivek Khera wrote:
 
  "DH" == Dave Hodgkinson [EMAIL PROTECTED] writes:
 
 DH I'm currently arguing about this very thing with my BOFH - I think we
 DH should have, effectively, an SSI apache and a mod_perl apache, he's
 
 I tend to call mod_perl scripts from my SSI's, so it makes sense for
 me to keep them on the same server.

Sounds like a plan.

Did we ever resolve the buffering question on squid? How much can
squid suck from a fat apache thread before it fills its buffer?


-- 
Editor, "The Highway Star"   http://www.deep-purple.com
Dave endorses Yanagisawa saxes, Apache, Perl, Linux, MySQL, emacs, gnus



Re: Upload file

2000-05-03 Thread Ken Y. Clark

On Wed, 3 May 2000, Srinidhi Rao S wrote:

 Hi all,
  I am new to perl programming. I am working in a project where I
 need to upload some files in a web interface.  I used HTML file upload
 object with POST method. My question how do I receve the uploded file
 on the server side.  Is there is any module o call in PERL to do this
 job. Please help me in this regard. Any help is appriciated. TIA
 Srinidhi Rao Robosoft Technologies E-mail: [EMAIL PROTECTED]
 www.robosoftin.com

welcome to the wonderful world of perl.  you should know that your
question is not really a mod_perl question, but a straight-up perl/cgi
one.  that said, under cgi, you're best using CGI.pm, which is a standard
perl module.  for more information, do "perldoc CGI" to learn how to use
this module.  if you move to a mod_perl evironment, you should consider
using Apache::Request/Apache::Upload.  again, 'perldoc $_ for
qw(Apache::Request Apache::Upload)'.

ky





how do I use perl sections

2000-05-03 Thread Benedict Lofstedt

I would like to make a list of ScriptAliases like this

ScriptAlias "/cgi-xx" "/users/xx/cgi-bin/"
ScriptAlias "/cgi-yy" "/users/yy/cgi-bin/"

and did this:

Perl
my $cgi_users = qw(xx yy);
for ($cgi_users) {
  push @ScriptAlias, "/cgi-$_", "/users/$_/cgi-bin";
}
/Perl

but it did not work.

What is wrong with this Perl section?

Where can I find better info than given in
http://perl.apache.org/src/mod_perl.html#PERL_SECTIONS ?

I have PERL_SECTIONS=1 in my mod_perl build, and the configuration is read
without any errors.

--- benedict

-- 
Benedict Lofstedt [EMAIL PROTECTED]
University of Aarhus, Department of Computer Science  Fax:   + 45 8942 3255
Building 540, Ny Munkegade, DK-8000 Aarhus C, Denmark.Phone: + 45 8942 3222



RE: how do I use perl sections

2000-05-03 Thread Eric Cholet

 I would like to make a list of ScriptAliases like this
 
 ScriptAlias "/cgi-xx" "/users/xx/cgi-bin/"
 ScriptAlias "/cgi-yy" "/users/yy/cgi-bin/"
 
 and did this:
 
 Perl
 my $cgi_users = qw(xx yy);
 for ($cgi_users) {
   push @ScriptAlias, "/cgi-$_", "/users/$_/cgi-bin";
 }
 /Perl
 
 but it did not work.
 
 What is wrong with this Perl section?

push @ScriptAlias, [ "/cgi-$_", "/users/$_/cgi-bin" ];

 Where can I find better info than given in
 http://perl.apache.org/src/mod_perl.html#PERL_SECTIONS ?

http://www.modperl.com/book/chapters/ch8.html#Configuring_Apache_with_Perl

See the paragraph: "Directive is Repeated Multiple Times"

--
Eric




Re[2]: [RFC] modproxy:modperl ratios...

2000-05-03 Thread Ilya Obshadko

Hello Matt,

÷åòâåðã, 27 àïðåëÿ 2000 ã., you wrote:

 doing - and the TCP listen queue will hold a few more
 connections if you are slightly short of backends.

MS Is there any benefit of mod_proxy over a real proxy front end like "Oops"?

I don't think so, at least for "accelerator" application like mod_perl
frontend. Configurability of apache is great, and in conjunction with
mod_rewrite you can create very powerful configurations. Even more, if
you see the lack of some functionality, any time you can patch
mod_proxy to get it work is you want it to ;) I did some work about
it, and my "custom" mod_proxy can eliminate "pragma: no-cache" on
selected URIs and doesn't allow simultaneous requests to the same
resource on the mod_perl server, for obvious reasons. so, with that
we've got practically no limits on server bandwidth (currently we
serve 500 000 pages per day in peak, and all of them are dynamic).

I saw many people on this list that are working on some mod_proxy
issues. Really, the design is not very well for accelerator
application. Maybe we could join to rewrite it as a completely new
accelerator module...

Best regards,
 Ilyamailto:[EMAIL PROTECTED]





Two problems with Perl sections...

2000-05-03 Thread Robert S. Thau

Hi.  I'm having two problems with Perl sections --- one resulting in
a server coredump, and the other just odd.  My test configuration is
Apache/1.3.12 and mod_perl_1.23 built from distributed sources with:

  perl Makefile.PL DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 PERL_TRACE=1 
APACHE_PREFIX=/opt/software/mpsandbox APACHE_HEADER_INSTALL=0

conf/httpd.conf is identical to httpd.conf_default except for a
different Port, and the following at the end:

  Perl
  do 'conf/conf.pl';
  /Perl

If conf/conf.pl contains:

  @Listen=(5050,5051);
  #$ServerAdmin='[EMAIL PROTECTED]';
  1;

then everything works as expected.  My problems are:

1) If the ServerAdmin line is uncommented, then the server dumps
   core on startup.  Backtrace included below.

2) If I comment the ServerAdmin line back out, but change the 'do'
   in httpd.conf to a 'require', the server starts, but is not listening
   on ports 5050 and 5051 when it does.  What makes this case peculiar
   is that with MOD_PERL_TRACE=ds, the output produced by the PERL_TRACE
   facility is the same in both cases; it claims to find and execute the
   Limit commands either way.

   This may have something to do with the 'require' not reading the file
   a second time... but if @INC is preserved, I would have expected the
   vars in the Apache::ReadConfig symbol table to be preserved as well.

Any ideas what's up?

BTW, on another topic, what's up with support for Perl sections in
Apache/2.0?  Some of the discussion on new-httpd seems to indicate that
it's not quite there yet...

rst

PS:  Here's the backtrace from the coredump:

#0  0x40151fea in _IO_vfprintf (s=0xbfff8e98, 
format=0x811e1c9 "perl_section: /%s\n", ap=0xbfffb60c) at vfprintf.c:1248
#1  0x40154ed8 in buffered_vfprintf (s=0x401f4260, 
format=0x811e1c9 "perl_section: /%s\n", args=0xbfffb608)
at vfprintf.c:1747
#2  0x40150856 in _IO_vfprintf (s=0x401f4260, 
format=0x811e1c9 "perl_section: /%s\n", ap=0xbfffb608) at vfprintf.c:1018
#3  0x401586f7 in fprintf (stream=0x401f4260, 
format=0x811e1c9 "perl_section: /%s\n") at fprintf.c:32
#4  0x807f4ec in perl_filesection ()
#5  0x807f7db in perl_handle_command_hv ()
#6  0x8080149 in perl_section ()
#7  0x80956e9 in ap_clear_module_list ()
#8  0x8096163 in ap_handle_command ()
#9  0x80961f7 in ap_srm_command_loop ()
#10 0x8096600 in ap_process_resource_config ()
#11 0x8096ec2 in ap_read_config ()
#12 0x80a0ed9 in main ()
#13 0x40123cb3 in __libc_start_main (main=0x80a0c4c main, argc=1, 
argv=0xb894, init=0x8060068 _init, fini=0x8116ffc _fini, 
rtld_fini=0x4000a350 _dl_fini, stack_end=0xb88c)
at ../sysdeps/generic/libc-start.c:78



Hi ppl need some help

2000-05-03 Thread FEITO Nazareno

Hi ppl, my home webserver still eating all the memory, it swap very much,
the disk light is On all the time and the system almost freeze until I stop
the webserver... here are some parameters of my configuration

Timeout 150

keepalive on

MaxKeepAliveRequest 70

keepAliveTimeout 15

minspareservers 3
maxspareservers 6

StartServers 2

MaxClients 20

MaxRequestPerChild 30

and mod_perl

Alias /perl/ /home/www/perl/

Location /perl
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader on (sometime this is set to oFF)
/Location


And I have another problem too... i´m using a handler in my perl scripts is
like this:

handler($s,0)

sub handler ($$) 
{
if ($s = 0) 
{
print AskForAName();
} 
elsif
{
$name=$q-param (´name´);


 bla bla bla
}
}

well when I run this script from the webserver like this:

http://192.168.0.20/perl/script.pl?s=0

the error_log of apache say me something like...:

PROTOTYPE MISSMATCH: root:Apache::Registry::handler vs ($$) error...

something like that... i don´t know what  i´m doing wrong, please help!!

any help will be very very precied! thanks buddies.

Nazareno.

Perl Programmer www.obsequie.com
[EMAIL PROTECTED]




Apache::DBI

2000-05-03 Thread Jim Serio

I'm not sure if this is even a problem but it's always
been on my mind. I use Apache::DBI and I have a general
module that handles db connections for my scripts. Here's
the relevant portion:

my $DBH ||= DBI-connect("...")

It basically accepts a hash ref to the dbconfig and opens
a connection. My httpd.conf is set with 5 spare clients
MIN and 10 MAX.

I'm the only one using this module right now and starting
httpd fresh results in no conections. Running my test CGI
script once results in two (2) mysql connections. Running
it again, results in four (4) connections. This will 
eventually continue until the number of mysql connections
is always four (4) more than httpd processes.

The thing that I can't figure out is that my scripts
properly open and close the db connection, so why doesn't
Apache::DBI re-use the original connection? Why spawn
one more each time?

I've checked the FAQ and searched the archives and found
no info (other than someone else asking this same question
last year with no helpful answer) and the Apache:DBI man
page doesn't touch on this.

Jim



Re: Apache::DBI

2000-05-03 Thread Stas Bekman

On Wed, 3 May 2000, Jim Serio wrote:

 I'm not sure if this is even a problem but it's always
 been on my mind. I use Apache::DBI and I have a general
 module that handles db connections for my scripts. Here's
 the relevant portion:
 
 my $DBH ||= DBI-connect("...")
 
 It basically accepts a hash ref to the dbconfig and opens
 a connection. My httpd.conf is set with 5 spare clients
 MIN and 10 MAX.
 
 I'm the only one using this module right now and starting
 httpd fresh results in no conections. Running my test CGI
 script once results in two (2) mysql connections. Running
 it again, results in four (4) connections. This will 
 eventually continue until the number of mysql connections
 is always four (4) more than httpd processes.
 
 The thing that I can't figure out is that my scripts
 properly open and close the db connection, so why doesn't
 Apache::DBI re-use the original connection? Why spawn
 one more each time?
 
 I've checked the FAQ and searched the archives and found
 no info (other than someone else asking this same question
 last year with no helpful answer) and the Apache:DBI man
 page doesn't touch on this.

Are you sure it's not:
Opening connections with different parameters 
http://perl.apache.org/guide/databases.html#Opening_connections_with_differe

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: Apache::DBI

2000-05-03 Thread Jim Serio

 Are you sure it's not:
 Opening connections with different parameters 
 http://perl.apache.org/guide/databases.html#Opening_connections_with_differe

Oops. I forgot I had two seperate db accesses on this
particular page and running with $Apache::DBI::DEBUG = 1  
clued me in. So am I correct in saying that it will
continue to open connections until connections = httpd 
processes? It seems like that's what's eventually happening.

Jim



hey I have a question

2000-05-03 Thread FEITO Nazareno

What´s better?

Make httpd from mod_perl or make prep_httpd and then make httpd from apache?
I hope you understand my question.

Nazarenowww.obsequie.com



RE: Apache::DBI

2000-05-03 Thread Geoffrey Young



 -Original Message-
 From: Jim Serio [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 03, 2000 10:02 AM
 To: [EMAIL PROTECTED]
 Subject: Apache::DBI
 
 
 I'm not sure if this is even a problem but it's always
 been on my mind. I use Apache::DBI and I have a general
 module that handles db connections for my scripts. Here's
 the relevant portion:
 
 my $DBH ||= DBI-connect("...")
 
 It basically accepts a hash ref to the dbconfig and opens
 a connection. My httpd.conf is set with 5 spare clients
 MIN and 10 MAX.
 
 I'm the only one using this module right now and starting
 httpd fresh results in no conections. Running my test CGI
 script once results in two (2) mysql connections. Running
 it again, results in four (4) connections. This will 
 eventually continue until the number of mysql connections
 is always four (4) more than httpd processes.
 
 The thing that I can't figure out is that my scripts
 properly open and close the db connection, so why doesn't
 Apache::DBI re-use the original connection? Why spawn
 one more each time?

try setting $Apache::DBI::DEBUG=2 to debug your connections.  

any call to $dbh-disconnect is intercepted by Apache::DBI, thus no
disconnect ever really happens (which is the whole point to Apache::DBI)

Keep in mind that Apache::DBI will hold one connection per httpd child
process _per connect string_.  That is, if you connect once with,say,
RAISE_ERROR=1 and once with RAISE_ERROR=0, Apache::DBI will create two
processes for that child.

HTH

--Geoff

 
 I've checked the FAQ and searched the archives and found
 no info (other than someone else asking this same question
 last year with no helpful answer) and the Apache:DBI man
 page doesn't touch on this.
 
 Jim
 



Re: Hi ppl need some help

2000-05-03 Thread Joe Pearson

I've noticed that my httpd's will start thrashing whenever I get an syntax
error in a mod_perl program.I'm very careful to do a perl -c program
before I try running it from the web or else I will need to stop/start the
web server.


Joe Pearson
Database Management Services, Inc.
208-384-1311 ext. 11
http://www.webdms.com

-Original Message-
From: FEITO Nazareno [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Date: Wednesday, May 03, 2000 8:46 AM
Subject: Hi ppl need some help


Hi ppl, my home webserver still eating all the memory, it swap very much,
the disk light is On all the time and the system almost freeze until I stop
the webserver... here are some parameters of my configuration

Timeout 150

keepalive on

MaxKeepAliveRequest 70

keepAliveTimeout 15

minspareservers 3
maxspareservers 6

StartServers 2

MaxClients 20

MaxRequestPerChild 30

and mod_perl

Alias /perl/ /home/www/perl/

Location /perl
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader on (sometime this is set to oFF)
/Location


And I have another problem too... i´m using a handler in my perl scripts is
like this:

handler($s,0)

sub handler ($$)
{
if ($s = 0)
{
print AskForAName();
}
elsif
{
$name=$q-param (´name´);


 bla bla bla
}
}

well when I run this script from the webserver like this:

http://192.168.0.20/perl/script.pl?s=0

the error_log of apache say me something like...:

PROTOTYPE MISSMATCH: root:Apache::Registry::handler vs ($$) error...

something like that... i don´t know what  i´m doing wrong, please help!!

any help will be very very precied! thanks buddies.

Nazareno.

Perl Programmer www.obsequie.com
[EMAIL PROTECTED]





Why does $r-print() dereference its arguments?

2000-05-03 Thread Jeffrey W. Baker

Apache::print() dereferences its arguments.  For example, this code:

my $foo = "bar";
$r-print(\$foo);

prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
explain the purpose of this behavior, or is it a misfeature?  In my case,
this is not the desired behavior.

-jwb




RE: hey I have a question

2000-05-03 Thread FEITO Nazareno


I do the same thing, but my memory is out in a little while...
the error_log begin to send me out of memory!!!

any idea?

Nazarenowww.obsequie.com



Re: Why does $r-print() dereference its arguments?

2000-05-03 Thread Stas Bekman

On Wed, 3 May 2000, Jeffrey W. Baker wrote:

 Apache::print() dereferences its arguments.  For example, this code:
 
 my $foo = "bar";
 $r-print(\$foo);
 
 prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
 explain the purpose of this behavior, or is it a misfeature?  In my case,
 this is not the desired behavior.

That's a performance improvement, see:
http://perl.apache.org/guide/porting.html#Apache_print_and_CORE_print_


__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: Why does $r-print() dereference its arguments?

2000-05-03 Thread Chip Turner

"Jeffrey W. Baker" [EMAIL PROTECTED] writes:

 Apache::print() dereferences its arguments.  For example, this code:
 
 my $foo = "bar";
 $r-print(\$foo);
 
 prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
 explain the purpose of this behavior, or is it a misfeature?  In my case,
 this is not the desired behavior.

If I recall correctly, this is a performance issue.  If you have a
large string you want to print, sending a reference will result in
less data copying etc.  I don't know how much it pays off, but it is
an intended effect.

You could try something like:

$r-print("@{[\$foo]}");

Chip

-- 
Chip Turner   [EMAIL PROTECTED]
  ZFx, Inc.  www.zfx.com
  PGP key available at wwwkeys.us.pgp.net



Re: Why does $r-print() dereference its arguments?

2000-05-03 Thread Randal L. Schwartz

 "Jeffrey" == Jeffrey W Baker [EMAIL PROTECTED] writes:

Jeffrey Apache::print() dereferences its arguments.  For example, this code:
Jeffrey my $foo = "bar";
Jeffrey $r-print(\$foo);

Jeffrey prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
Jeffrey explain the purpose of this behavior, or is it a misfeature?  In my case,
Jeffrey this is not the desired behavior.

You can always call $r-print(\\$foo); :)

As in, $r-print(map { \$_ } @list) will work as your print, always.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



RE: Why does $r-print() dereference its arguments?

2000-05-03 Thread Geoffrey Young

interesing behavior - print behaves the same way...

however, when you concat the reference to another scalar things work
right...

$r-print($foo.\$foo);
yields:
fooSCALAR(0xXWHOOPSX)

--Geoff


 -Original Message-
 From: Jeffrey W. Baker [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 03, 2000 1:37 PM
 To: [EMAIL PROTECTED]
 Subject: Why does $r-print() dereference its arguments?
 
 
 Apache::print() dereferences its arguments.  For example, this code:
 
 my $foo = "bar";
 $r-print(\$foo);
 
 prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
 explain the purpose of this behavior, or is it a misfeature?  
 In my case,
 this is not the desired behavior.
 
 -jwb
 



am I the only one having this problem!

2000-05-03 Thread James Xie


I recently posted a question regarding installing mod_perl-1.23 on
Apache_1.3.12, I have not received any answer yet. I'm wondering if I'm the
only one who had this problem.  I searched through the web but cannot find
any answers.  I thought the  test was failed because the system was not
connected directly to the Internet so I added a second NIC which connected
the machine to the Internet directly.  But I still cannot run the make test
successfully.  I don't think I have anything unusual installed.  Your help
will be really appreciated.


James

---

Helllo,

I recently downloaded Apache_1.3.12 and installed it on Redhat 6.1,
everything was working fine. I run into problems when I tried to install
mod_perl-1.23. Everything was compiled ok, but I got error messages (see
below) when I try to run the make test. I'm new to both Apache and mod_perl,
thank you for your help in advance. 

Thanks:

how I make it:
perl Makefile.PL EVERYTHING=1 APACHE_PREFIX=/usr/local/apache
(I aslo tried perl Makefile.PL APACHE_SRC=../apache_1.3.12/src DO_HTTPD=1
USE_APACHE=1 EVERYTHING =1)
make
make test

*
My Environment:
RedHat 6.1
apache_1.3.12
Perl5.004 (comes with Redhat)
mod_perl-1.23 
CGI-modules-2.76
Bundle-libnet-1.00
Digest-MD5-2.09
HTML-Parser-3.07
MIME-Base64-2.11
URI-1.06
lcwa-1.0.0
libwww-perl-5.48


Output from make test

cd ../apache_1.3.12  make)
make[1]: Entering directory `/home/jxie/apache_1.3.12'
=== src
make[2]: Entering directory `/home/jxie/apache_1.3.12'
make[3]: Entering directory `/home/jxie/apache_1.3.12/src'
=== src/regex
make[4]: Nothing to be done for `all'.
=== src/regex
=== src/os/unix
make[4]: Nothing to be done for `all'.
=== src/os/unix
=== src/ap
make[4]: Nothing to be done for `all'.
=== src/ap
=== src/main
make[4]: Nothing to be done for `all'.
=== src/main
=== src/lib
=== src/lib
=== src/modules
=== src/modules/standard
make[5]: Nothing to be done for `all'.
=== src/modules/standard
=== src/modules/perl
make[5]: Nothing to be done for `all'.
=== src/modules/perl
=== src/modules
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include
-DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci` modules.c
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include
-DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci` buildmark.c
cc  -DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci`\
  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/perl/libperl.a main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a   -lm -lcrypt -rdynamic  -L/usr/local/lib
/usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix
-lcrypt 
make[3]: Leaving directory `/home/jxie/apache_1.3.12/src'
make[2]: Leaving directory `/home/jxie/apache_1.3.12'
make[2]: Entering directory `/home/jxie/apache_1.3.12'
=== src/support
make[3]: Entering directory `/home/jxie/apache_1.3.12/src/support'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/jxie/apache_1.3.12/src/support'
=== src/support
make[2]: Leaving directory `/home/jxie/apache_1.3.12'
=== src
make[1]: Leaving directory `/home/jxie/apache_1.3.12'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Apache'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Apache'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Connection'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Connection'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Constants'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Constants'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/File'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/File'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Leak'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Leak'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Log'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Log'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/ModuleConfig'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/ModuleConfig'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/PerlRunXS'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/PerlRunXS'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Server'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Server'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Symbol'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Symbol'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Table'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Table'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/URI'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/URI'

RE: Why does $r-print() dereference its arguments?

2000-05-03 Thread Stas Bekman

On Wed, 3 May 2000, Geoffrey Young wrote:

 interesing behavior - print behaves the same way...

http://perl.apache.org/guide/porting.html#Apache_print_and_CORE_print_

Under mod_perl CORE::print() will redirect its data to Apache::print() 
since the STDOUT filehandle is tied to the Apache module.

 however, when you concat the reference to another scalar things work
 right...
 
 $r-print($foo.\$foo);
 yields:
 fooSCALAR(0xXWHOOPSX)
 
 --Geoff
 
 
  -Original Message-
  From: Jeffrey W. Baker [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 03, 2000 1:37 PM
  To: [EMAIL PROTECTED]
  Subject: Why does $r-print() dereference its arguments?
  
  
  Apache::print() dereferences its arguments.  For example, this code:
  
  my $foo = "bar";
  $r-print(\$foo);
  
  prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
  explain the purpose of this behavior, or is it a misfeature?  
  In my case,
  this is not the desired behavior.
  
  -jwb
  
 



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




RE: Why does $r-print() dereference its arguments?

2000-05-03 Thread Geoffrey Young



 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 03, 2000 2:07 PM
 To: Geoffrey Young
 Cc: mod_perl list
 Subject: RE: Why does $r-print() dereference its arguments?
 
 
 On Wed, 3 May 2000, Geoffrey Young wrote:
 
  interesing behavior - print behaves the same way...
 
 http://perl.apache.org/guide/porting.html#Apache_print_and_CORE_print_

the guide is getting so big these days, it's hard to keep up with all the
new developments.  Or maybe that entered a few versions ago :)  It's along
way from the mini-guide that got me started...

 
 Under mod_perl CORE::print() will redirect its data to 
 Apache::print() 
 since the STDOUT filehandle is tied to the Apache module.

yeah, I thought something like that was happening, but I wasn't sure about
the mechanism - I recently saw that Apache::Filter will intercept print()
but not $r-print(), so I wasn't sure what was going on internally...

thanks

--Geoff

 
  however, when you concat the reference to another scalar things work
  right...
  
  $r-print($foo.\$foo);
  yields:
  fooSCALAR(0xXWHOOPSX)
  
  --Geoff
  
  
   -Original Message-
   From: Jeffrey W. Baker [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, May 03, 2000 1:37 PM
   To: [EMAIL PROTECTED]
   Subject: Why does $r-print() dereference its arguments?
   
   
   Apache::print() dereferences its arguments.  For example, 
 this code:
   
   my $foo = "bar";
   $r-print(\$foo);
   
   prints "bar" instead of the expected SCALAR(0xDEADBEEF).  
 Can anyone
   explain the purpose of this behavior, or is it a misfeature?  
   In my case,
   this is not the desired behavior.
   
   -jwb
   
  
 
 
 
 __
 Stas Bekman | JAm_pH--Just Another mod_perl Hacker
 http://stason.org/  | mod_perl Guide  
 http://perl.apache.org/guide 
 mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
 http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
 --
 



RE: am I the only one having this problem!

2000-05-03 Thread James Xie


Don't I have to run the make test first?

Here is the procedure I used to build the stuff:
1. perl Makefile.PL APACHE_SRC=../apache_1.3.12/src DO_HTTPD=1 USE_APACHE=1
EVERYTHING=1
2. make
3. make test (failed here)

I didn't try to start it manually. I will give it a try!.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 03, 2000 11:11 AM
To: [EMAIL PROTECTED]
Subject: Re: am I the only one having this problem!


You wouldn't need a second NIC for connecting to the net
to start your httpd. Sorry about that.

I think you need to look into your install procedure.

Did you 'make install' in the Apache directory or the
modperl directory?

Can you start httpd all by itself?



RE: I did have the same trouble...

2000-05-03 Thread James Xie


Just tried, didn't work.

James


-Original Message-
From: FEITO Nazareno [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 03, 2000 11:10 AM
To: 'James Xie'
Cc: '[EMAIL PROTECTED]'
Subject: I did have the same trouble...


first... before run make test you have to be sure that httpd isn´t
running...
write this at console:
killall httpd
make test
and make test have to result succesfully, try it... i think that is the
solution...

Nazarenowww.obsequie.com

Perl Programmer.
[EMAIL PROTECTED]



RE: Why does $r-print() dereference its arguments?

2000-05-03 Thread Geoffrey Young



 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 03, 2000 2:23 PM
 To: Geoffrey Young
 Cc: mod_perl list
 Subject: RE: Why does $r-print() dereference its arguments?
 
 
   -Original Message-
   From: Stas Bekman [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, May 03, 2000 2:07 PM
   To: Geoffrey Young
   Cc: mod_perl list
   Subject: RE: Why does $r-print() dereference its arguments?
   
   
   On Wed, 3 May 2000, Geoffrey Young wrote:
   
interesing behavior - print behaves the same way...
   
   
 http://perl.apache.org/guide/porting.html#Apache_print_and_CORE_print_
  
  the guide is getting so big these days, it's hard to keep 
 up with all the
  new developments.  Or maybe that entered a few versions ago 
 :)  It's along
  way from the mini-guide that got me started...
 
 That's correct. It was added in the last release
 
 CHANGES:
 04.09.2000 ver 1.22
 * porting: added: "Apache::print() and CORE::print()" (Doug)
 
 Well, it's been mini-guide, then it became just guide, now 
 I'm going to
 call it giant-guide :) Sorry about the size. I hear woes when 
 there is no
 documentation, and as well when there is too much of it... go 
 figure out
 :)

no apologies necessary - more docs, and sharing of knowledge, are always
good things...


 
   Under mod_perl CORE::print() will redirect its data to 
   Apache::print() 
   since the STDOUT filehandle is tied to the Apache module.
  
  yeah, I thought something like that was happening, but I 
 wasn't sure about
  the mechanism - I recently saw that Apache::Filter will 
 intercept print()
  but not $r-print(), so I wasn't sure what was going on 
 internally...
 
 Of course, it's because the two are basically the same under 
 mod_perl, so
 it doesn't matter which one you pick to intercept. Well, only 
 one way...
 $r-print() won't call CORE::print().

oh, I see it now (duh!)... thanks

--Geoff

 
 __
 Stas Bekman | JAm_pH--Just Another mod_perl Hacker
 http://stason.org/  | mod_perl Guide  
http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--



Re: Why does $r-print() dereference its arguments?

2000-05-03 Thread Jeffrey W. Baker

On 3 May 2000, Chip Turner wrote:

 "Jeffrey W. Baker" [EMAIL PROTECTED] writes:
 
  Apache::print() dereferences its arguments.  For example, this code:
  
  my $foo = "bar";
  $r-print(\$foo);
  
  prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
  explain the purpose of this behavior, or is it a misfeature?  In my case,
  this is not the desired behavior.
 
 If I recall correctly, this is a performance issue.  If you have a
 large string you want to print, sending a reference will result in
 less data copying etc.  I don't know how much it pays off, but it is
 an intended effect.
 
 You could try something like:
 
 $r-print("@{[\$foo]}");

Or I could just do $r-print(scalar(\$foo));, but that's not my point.  My
point is Ewww.  I just don't like the overloaded
interface.  Does $r-print() take scalars, or references?  If it takes
scalars, it shouldn't be dereferencing them.  If there is a performance
need for passing references around instead of copying strings, that should
be a different method, perhaps print_ref().  It just seems more clean to
me.  Is my mindset too C?

-jwb




PPM for DBD::mysql

2000-05-03 Thread Erich L. Markert

I recall someone posting a note about a PPM for DBD::mysql.

Can someone please post that location again?

Muchos gracias.
--
__
Mr. Erich L. Markert [EMAIL PROTECTED]
Computer Learning Center TEL (914)422-4328
Pace University
1 Martine Ave
White Plains, New York 10606-1932

Those who do not understand Unix are condemned to reinvent it, poorly.
-- Henry Spencer



search engine for the Guide (was Re: Why does $r-print()...)

2000-05-03 Thread Stas Bekman

   Stas Bekman wrote:

   the guide is getting so big these days, it's hard to keep up with all the
   new developments.  Or maybe that entered a few versions ago :)  It's along
   way from the mini-guide that got me started...

 ___cliff rayman___ wrote:

 any thoughts on creating a search engine for the
 guide only?
 
 i am using htdig here and it seems to work real well.

Yeah, I've been thinking about it. There was one site that has offered me
to provide a good search engine and they did, but the problem is that they
didn't keep up with new releases, so people were searching the outdated
version, which is quite bad -- I've removed the reference to it, after
asking them to update their copy for a few months, with no results.

So if any of you can host the search index of the guide and *keep it
updated* with the latest version, go ahead and help you and others to get
the most out of the guide with least effort. Personally I use grep when
I'm lost in the Guide :)

I think we must get a search engine that highlights the words that were
looked for. Otherwise it'd be useless, as you will get a page of 200k with
no particular help. Another acceptible solution would be an engine that
will return the links to the lines the match was on, like the search
engine used in the Cross-Referencing Linux: http://lxr.linux.no/
Try for example:
http://lxr.linux.no/source/arch/i386/kernel/hexify.c?v=2.0.35

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--





Configuring Apache with PERL sections - how to do custom access log?

2000-05-03 Thread James Olsen

Hello everyone,

I have quite a few virtual hosts on my Apache server. I'm trying to 
implement their configuration in PERL sections instead of  the current 
method bunch of VirtualHost directives.

I use the "combined" transfer log, previously defined like this:
TransferLog /path/to/logcombined

The new method I attempted is like this:
   $VirtualHost{servername} = {
 TransferLog  = "logs/$servername-access_log combined",
 
 }

However, when I attempt to check the config or start the server, I get the 
following error:

Perl: TransferLog takes one argument, the filename of the access log

There isn't a list of variables/structures that I found describing all the 
nuances of PERL sections.  Does anyone have any suggestions how I can 
achieve this?

--James




Re: Upload file

2000-05-03 Thread Andreas Grupp

Am 3 May 2000, um 15:14, hat Srinidhi Rao S folgendes geschrieben:

 Hi all,
  I am new to perl programming. I am working in a project where I need to
  upload some files in a web interface.  I used HTML file upload object with
  POST method. My question how do I receve the uploded file on the server
  side.  Is there is any module o call in PERL to do this job. Please help me
  in this regard.
 Any help is appriciated.

Have you had a look onto CGI.pm (from Lincoln Stein). Their you have very 
simple to use mechanisms to do this. The package is available via CPAN.

--
Andreas


Elektronikschule Tettnang   http://www.elektronikschule.de/~grupp
Oberhofer Str. 25   mailto:[EMAIL PROTECTED]
88069 Tettnang  PGP-Key available via mail. Use subject
Tel.: +49 7542 9372-33  Use subject: send pgp-public-key
Fax.: +49 7542 9372-40  Open Minds. Open Sources. Open Future

Privat: Quellenhalde 1, 88069 Tettnang, +49 7542 6462



Can't use Apache::exit() in command-line scripts

2000-05-03 Thread Franco Finstad

I have a large modperl site with modperl (CGI) scripts and command-line perl
scripts.

My command line scripts load modules (.pm files) that use Apache::exit().
This is giving me the following errors:

**
Bareword "Apache::exit" not allowed while "strict subs" in use at
as/mod/Util.pm
 line 546
**

So, how can I get the command-line scripts to run under Apache::Registry?
Adding 'use Apache;' to my command-line scripts obviously doesn't help.

Any help is greatly appreciated.

Here's my set up.
modperl 1.21
Apache 1.36
Solaris 2.7




Apache.pm failed to LOAD!

2000-05-03 Thread Wang, Pin-Chieh

Hi,
I build the apache1.3.12 using mod_perl 1.23 on Solaris 2.6 machine,
everything looks fine and installed successfully (at least the installation
program told me so...)
But when I start httpd using apachectl start, httpd did not start within
error_log there is a message "Apache.pm failed to LOAD!"
Any one have any ideal? Thanks in advance
P C Wang



Re: Can't use Apache::exit() in command-line scripts

2000-05-03 Thread Jeff Beard

You should post the code in question. Your message isn't very clear but if 
I was to guess, you're trying to run a regular ol' command line Perl script 
under Apache::Registry which has more than a few caveats.

--Jeff

At 04:00 PM 5/3/00, Franco Finstad wrote:
I have a large modperl site with modperl (CGI) scripts and command-line perl
scripts.

My command line scripts load modules (.pm files) that use Apache::exit().
This is giving me the following errors:

**
Bareword "Apache::exit" not allowed while "strict subs" in use at
as/mod/Util.pm
  line 546
**

So, how can I get the command-line scripts to run under Apache::Registry?
Adding 'use Apache;' to my command-line scripts obviously doesn't help.

Any help is greatly appreciated.

Here's my set up.
modperl 1.21
Apache 1.36
Solaris 2.7



Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape.com
Location:   Boulder, CO, USA






Re: Apache.pm failed to LOAD!

2000-05-03 Thread Jeff Beard

Did it pass 'make test'? And, not meaning to insult, did you run 'make 
install' in the mod_perl directory?

--Jeff

At 07:01 PM 5/3/00, Wang, Pin-Chieh wrote:
Hi,
I build the apache1.3.12 using mod_perl 1.23 on Solaris 2.6 machine,
everything looks fine and installed successfully (at least the installation
program told me so...)
But when I start httpd using apachectl start, httpd did not start within
error_log there is a message "Apache.pm failed to LOAD!"
Any one have any ideal? Thanks in advance
P C Wang



Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape.com
Location:   Boulder, CO, USA






Re: Why does $r-print() dereference its arguments?

2000-05-03 Thread Gunther Birznieks

At 11:56 AM 5/3/00 -0700, Jeffrey W. Baker wrote:
On 3 May 2000, Chip Turner wrote:

  "Jeffrey W. Baker" [EMAIL PROTECTED] writes:
 
   Apache::print() dereferences its arguments.  For example, this code:
  
   my $foo = "bar";
   $r-print(\$foo);
  
   prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
   explain the purpose of this behavior, or is it a misfeature?  In my case,
   this is not the desired behavior.
 
  If I recall correctly, this is a performance issue.  If you have a
  large string you want to print, sending a reference will result in
  less data copying etc.  I don't know how much it pays off, but it is
  an intended effect.
 
  You could try something like:
 
  $r-print("@{[\$foo]}");

Or I could just do $r-print(scalar(\$foo));, but that's not my point.  My
point is Ewww.  I just don't like the overloaded
interface.  Does $r-print() take scalars, or references?  If it takes
scalars, it shouldn't be dereferencing them.  If there is a performance
need for passing references around instead of copying strings, that should
be a different method, perhaps print_ref().  It just seems more clean to
me.  Is my mindset too C?
I prefer overloading that is documented. It makes things a lot easier to 
remember one method name.

Otherwise, you have to be an expert who remembers common idioms like _ref 
for references... otherwise, people would argue should it be called 
ref_print, reference_print, print_ref, print_as_ref... Programmers have all 
sorts of weird ways to name functions (if you've delved into other people's 
source code) which I hate.

HOWEVER, I think a good argument for NOT overloading print() in this 
particular case is that it is taking over CORE::print. This is contrary to 
documented Perl behavior and is not backwards compatible then right? If 
this is the case, then that seems suboptimal.

Also, I guess I could see the point that since print() is so well defined 
in the core Perl, that people might expect Apache's print to operate 
identically even if it is called directly. And therefore, the behavior 
should not change from CORE::print anyway.

So in summary, I think I am saying that I vote to support your desire 
reluctantly because I am generally a fan of overloading (but not in this 
case if I am interpreting the facts correctly).

Of course, it may be too late because there may be a load of code that is 
dependent on this "Performance improvment". So it may be a moot point anyway.

Later,
Gunther

__
Gunther Birznieks ([EMAIL PROTECTED])
Extropia - The Web Technology Company
http://www.extropia.com/




Re: Modperl/Apache deficiencies... Memory usage.

2000-05-03 Thread Doug MacEachern

On Tue, 25 Apr 2000 [EMAIL PROTECTED] wrote:
 
 Let me know when you want the garbage collector.  I'll re-write it in
 apache style, and add some debugging stuff.  I figure there should be
 two pieces.  One that analyzes the packages that are running, the
 other that actually kills off variables.  This could be very usefull
 for admins that want to analyze what those huge processes really are.

what i'd really like to see is a generic symbol table walker (written in
c), where you can register callbacks foreach symbol type (SVt_*).  then
once you hit an SVt_PVCV, there can be any number of registered callbacks
that fiddle with the padlist (cleaner, reporter, etc.)

 (Maybe like Apache::Memory::Cleaner, and Apache::Memory::Reporter?...
 how does that sound?  We'd need some mutexes on the Registry so that
 the cleaner doesn't end up cleaning a running Registry Script well,
 duh!... should this extend to Handlers?)

each interpreter clone has it's own copy of the symbol table and padlists
(the syntax tree is shared).
so, in a threaded apache, the cleaner could could pop a mip-avail
interpreter and put it in the mip-busy list, in which case, nobody will
try to use it, no locking needed (other than mip-mip_lock for the avail
- busy shift and back again).
mip == 'm'od_perl 'i'nterpreter 'p'ool, which is in the modperl-2.0 cvs
tree, not quite nailed down, but getting close.

in a 1.3-ish multi-process model, i suppose the cleaner could run as a
cleanup.

 However, if it were possible to override the "read" and "write"
 functions that would sort of "freeze" execution, and put a lock on
 this Apache registry entry (and make a unlocked copy BTW), and
 transfer it to another thread whos only job was read/write through a
 sigqueue interface... that would be REALLY cool for performance/memory
 consumption.  Much less context switching overhead, and drastically
 reduced memory overhead.  The problem is that who in their right mind
 has time for this sort of thing? (:-)  I was thinking of implementing
 the writing of mod_proxy like this..., after considering it fully
 though, I think it would be even better to write a generalized module
 that could stream bits to clients, and use it as a plug in for any
 module that doesn't want to waste time streaming out to a 28.8k
 connection.

sounds like a piece of cake ;)




Templates.

2000-05-03 Thread Jason C. Leach

hi,

I'm looking for some good ideas on developing web sites w/ mod_perl.  One
think we were looking at was to write template HTML pages, and run them
through a perl prg to replace home made tags w/ data.

Another was to write an apache mod that will contain/load the HTML on the
first hit and cach all the pages and gfx (not too much).

Can anyone comment on some good techniques to develope mod_perl sites?  We
will need mod_perl to be fast, interact w/ a DB, and run of FreeBSD or
Linux.

Thanks,
J.

--
Method Digital Logic Company
http://www.methodlogic.net
Solutions for:
 -Web Design-Database Programming
 -Office Networking -Custom Applications





Re: 2.0 wishlist: consistent API and docs

2000-05-03 Thread Doug MacEachern

On Wed, 26 Apr 2000, raptor wrote:

 What about a Apache2::XXX namespace for the new modules ...??!
 just asking.

not quite, but there's a MP_INST_APACHE2=1 Makefile.PL attribute which
will install everything relative to an Apache2/ subdirectory.  this way
1.xx mod_perl and 2.xx can co-exist in the same site_perl tree
then to enable 2.xx, just add 'PerlModule Apache2' in your httpd.conf,
which adds the Apache2/ subdirs to your @INC path.




Re: Apache::VMonitor not loading..

2000-05-03 Thread Doug MacEachern

On Wed, 26 Apr 2000, Alex Krohn wrote:

 Hi!
 
 I'm trying to get Apache::VMonitor to load on a new mod_perl 1.23/Apache
 1.3.12/perl 5.005_03 installation. mod_perl is up and running fine,
 however I can't get Apache::VMonitor working. If I add 

 [Wed Apr 26 16:13:45 2000] [error] Can't locate loadable object for
 module Apache::Util in @INC (@INC contains:

you need to build mod_perl with PERL_UTIL_API=1 or EVERYTHING=1 or
DYNAMIC=1 to enable Apache::Util





Re: mod_perl-1.99_01-dev

2000-05-03 Thread Doug MacEachern

On Thu, 27 Apr 2000, Stas Bekman wrote:

 On Tue, 25 Apr 2000, Doug MacEachern wrote:
 
  On Fri, 21 Apr 2000, Greg Cope wrote:
   
   Does this  mean that we {will|may} be able to use the interpreter pool to
   set up X Perl interpreters (say 20 to service dynamic handlers) with Z
   apache (say 60 to handle static + dynamic content - assuming the dynamic
   content is passed to the Perl interpreters) children, and hence have
   significant memory savings as we can avoid (in some cases) the light / heavy
   httpd model ?
  
  yes, exactly.
 
 But you will be not able to tune the two types of the threads to have
 different Apache parameters (MaxRequests and others) so I'm not sure you
 will get rid of the dual setup, unless these will be taken care of by
 mod_perl.

well, there is a PerlInterpMaxRequests parameter in 1.99_01-dev, which
knocks off the Perl clone after x number of requests.  in addition, the
pool of interpreters are pulled and putback from the head of the list, so
you are getting re-used allocations (e.g. padlists aka lexicals).  that
is, say you configured PerlInterpStart to 10, but average no more than 5
concurrent requests.  you have 5 clones with allocated padlists, and 5
which are much smaller (but ready for conncurrent requests  5).  this is
unlike 1.3 where you have 10 children, chances are high each of them will
endup will allocated padlists, as there's no control over which child
handles a request.

i'm not saying 2.0 will rid the need for a dual setup, but the Perl side
is looking a whole lot smaller (er, less fat) at this point.




Re: Trouble compiling mod_perl

2000-05-03 Thread Doug MacEachern

On Thu, 27 Apr 2000, Jean-Sebastien Morisset wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 I first tried to compile mod_perl-1.22 using APXS, but whenever I would
 load the module, the Apache child would die.
 
 Here's the command line I used:
 
 perl Makefile.PL NO_HTTPD=1 EVERYTHING=1
 WITH_APXS=/opt/apache-1.3.12/bin/apxs USE_APXS=1

your perl -V might help spot the problem.  as would a stacktrace (see
SUPPORT for hints)
 
 I then tried to compile mod_perl with Apache (not shared). When I do, the
 make fails. Here's the mod_perl config I used:

try using the steps in INSTALL.simple.mod_ssl instead.




Re: php And Apache::ASP

2000-05-03 Thread Doug MacEachern

On Thu, 27 Apr 2000, Jerrad Pierce wrote:

 [Thu Apr 27 06:14:07 2000] [error] [asp] [2726] cannot load Apache::Symbol
 for UndefRoutine: Can't locate Devel/Symdump.pm in @INC (@INC contains:

why does Apache::ASP use Apache::Symbol::undef?  that hack should be
obsolete, as it was only need to avoid the mandatory 'constant subroutine
redefined' warning, which went away in Perl 5.005




Re: Install probs.

2000-05-03 Thread Doug MacEachern

On Fri, 28 Apr 2000, Dominic Blythe wrote:

 please reply to [EMAIL PROTECTED] as i'm not on the list...
 
 on Corel Linux (which is Debian slink)...
 
 I'm compiling mod_perl into apache 1.3.xx (19 i think) and all the mod_perl
 make, make install goes ok. APACI ./configure is fine too, but when i make
 apache, I get about a page of complaints about mod_perl, mostly of the
 format "Undefined reference to mod_perl_some_function_name in mod_perl.c"
 and it won't make.
 
 make and make test on mod_perl both complained about libwww missing, but all
 the install notes said this isn't absolutely required.
 
 without the activate-module=src/modules/perl/mod_perl.c apache completed
 make install with no probs (well it runs anyway)

you're missing a step, but it's impossible to say which without details.
try using the steps in INSTALL.simple




Re: Help - Install mod_perl-1.23

2000-05-03 Thread Doug MacEachern

On Fri, 28 Apr 2000, James Xie wrote:

 Helllo,
 
 I recently downloaded Apache_1.3.12 and installed it on Redhat 6.1,
 everything was working fine. I run into problems when I tried to install
 mod_perl-1.23. Everything was compiled ok, but I got error messages (see
 below) when I try to run the make test. I'm new to both Apache and mod_perl,
 thank you for your help in advance. 

 still waiting for server to warm up...not ok

hmm, what happens if you run:

% make start_httpd
% GET http://localhost:8529/perl/perl-status
% make kill_httpd

?

you can also get more details on why apache isn't reponding like so:

% make start_httpd
% strace -f -s1024 -o strace.out -p `cat t/logs/httpd.pid`
% make run_tests
% make kill_httpd

have a look at strace.out




Re: PerlAddVar ?

2000-05-03 Thread Doug MacEachern

On Mon, 1 May 2000, Matt Sergeant wrote:

 It would be nice, in my opinion, to have some way of doing:
 
 PerlAddVar Fred "Value 1"
 PerlAddVar Fred "Value 2"
 
 And then in your script:
 
 my @values = $r-dir_config('Fred');
 
 which gets ("Value 1","Value 2") in @values.
 
 Any thoughts on this? (I'm not set on the name PerlAddVar, if that's
 anyone's concern - but what about the idea of it?)

you could implement that with a directive handler, that uses
$r-dir_config-add at request time.

though, it would be simple to add to mod_perl.  patch below compiles, but
i haven't tested.

then your script can have:

my @values = $r-dir_config-get('Fred');

Index: src/modules/perl/mod_perl.c
===
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.116
diff -u -r1.116 mod_perl.c
--- src/modules/perl/mod_perl.c 2000/04/13 06:07:33 1.116
+++ src/modules/perl/mod_perl.c 2000/05/04 05:56:48
@@ -126,6 +126,9 @@
 { "PerlSetVar", (crft) perl_cmd_var,
   NULL,
   OR_ALL, TAKE2, "Perl config var and value" },
+{ "PerlAddVar", (crft) perl_cmd_var,
+  (void*)1,
+  OR_ALL, TAKE2, "Perl config var and value" },
 { "PerlSetEnv", (crft) perl_cmd_setenv,
   NULL,
   OR_ALL, TAKE2, "Perl %ENV key and value" },
Index: src/modules/perl/perl_config.c
===
RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.95
diff -u -r1.95 perl_config.c
--- src/modules/perl/perl_config.c  2000/05/04 04:52:34 1.95
+++ src/modules/perl/perl_config.c  2000/05/04 05:56:51
@@ -729,11 +729,21 @@
 MP_TRACE_d(fprintf(stderr, "perl_cmd_var: '%s' = '%s'\n", key, val));
 if (cmd-path) {
 perl_dir_config *rec = (perl_dir_config *) config;
-table_set(rec-vars, key, val);
+if (cmd-info) {
+table_add(rec-vars, key, val);
+}
+else {
+table_set(rec-vars, key, val);
+}
 }
 else {
 dPSRV(cmd-server);
-table_set(cls-vars, key, val);
+if (cmd-info) {
+table_add(cls-vars, key, val);
+}
+else {
+table_set(cls-vars, key, val);
+}
 }
 return NULL;
 }




Re: PerlAddVar ?

2000-05-03 Thread Doug MacEachern

On Mon, 1 May 2000, Stas Bekman wrote:

 That [the name] would be confusing. How about:

not if you think of it in terms of an apache table:

PerlSetVar = ap_table_set
PerlAddVar = ap_table_add