Re: Documentation for Apache::exit()?

2002-09-26 Thread Lupe Christoph

On Wednesday, 2002-09-25 at 10:41:19 -0400, valerian wrote:

 BTW, anyone know if Perl 6 will free unused memory?  From what I
 understand, right now it just allocates as needed, but never gives any
 back to the OS when it's done... (ie, when some function ends)

Even if Parrot (the perl 6 engine) free()'s unused memory, all malloc
implementations I know will not return memory to the OS. If the
implementation uses brk() or sbrk(), it can only grow or shrink the data
segment, not deallocate arbitrary parts of it. Only if it mmap()'s from
/dev/null it can do that.

Add to this mess that free()'d memory tends to be non-contiguous, you
have a nice SMOP. Lots of overhead for little gain.

Lupe Christoph
-- 
| [EMAIL PROTECTED]   |   http://www.lupe-christoph.de/ |
| Big Misunderstandings #6398: The Titanic was not supposed to be|
| unsinkable. The designer had a speech impediment. He said: I have |
| thith great unthinkable conthept ...  |



When does mod_ssl register input/output filter

2002-09-26 Thread Hideki Noma

While constructing process connection handler employing
bucket-brigade feature of Apache 2, I encountered some
problem.

I am trying to handle protocols other than HTTP and
most of them starts communication from sending server
hello message.
When SSL handshake takes too long, communication fails.

Process flow goes like this

Apache: TCP/IP connection
mod_ssl: SSL handshake starts
Handler: Process handler starts
Handler: Tries to send data to client
 - send bucket-brigade to output_filters
mod_ssl: SSL handshake done
 - register input/output_filter

If the handler can detect when the output_filter is ready,
it will be fine, however there seems to be no functions to detect
such events.

Do you know how to detect SSL handshake is complete,
or is there other solution?




Reverse Proxy Setup

2002-09-26 Thread Scott Alexander

Hi,

I have two experimental servers frontend and mod_perl.

mod_perl is apache with mod_perl
frontend is apache lightweight

My config only passes *.pl thru to mod_perl

When a user uploads a file they use a mod_perl script on mod_perl and the
file is saved on mod_perl.

But I want the file to be on frontend as it makes sense for when they
download the file ... they only need a lightweight apache server to do
that.

So far I can think of doing

1. Putting a cgi script on frontend to handle file uploads and save the
file on frontend.

2. Use network file share between mod_perl and frontend.

Any other ideas?

Scott







[mp2] Build problems on HPUX11.00 with HP ANSI C (aCC)

2002-09-26 Thread paul . barker


Hi All

I've spent the last two days reading various docs and posts trying to resolve
this problem. If this is a known issue or has been answered previously please
accept my apologies and by all means point me in the direction of the correct
documentation / newsgroup / mailing list archive.

I am attempting to build mod_perl from the 1.99_05 source with Apache 2.0.40 and
perl 5.8.0 both of which were built from source with the HP ANSI C compiler :

B3901BA   B.11.01.07 HP C/ANSI C Developer's Bundle for
HP-UX 11.00 (S800)

(I'm using the HP compiler because a) we have it available and it's recommended
in the Perl hpux.readme and  b) I had problems trying to build perl with gcc 3.x
as supplied via the HPUX Porting and Archive site)

Perl and Apache built without problems and Apache runs fine without mod-perl. (I
have served some test html and cgi queries fine)

During the mod-perl build I get the same warning from each component build :

cpp: /usr/local/lib/perl5/5.8.0/PA-RISC1.1-thread-multi/CORE/config.h, line
41: warning 2002: Redefinition of param names for macro __attribute__.

I tried to run a 'make test' anyhow since I've had cases in the past where
warnings similar to the above haven't caused any issues. When the test routine
tries to start it's httpd to test against it eventually falls over with the
following message :

*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST
/usr/local/apache2/bin/httpd  -d /oracle/db/GSE/04/techweb/mod_perl-1.99_05/t -f
/oracle/db/GSE/04/techweb/mod_perl-1.99_05/t/conf/httpd.conf -DAPACHE2
-DPERL_USEITHREADS
using Apache/2.0.40 (prefork MPM)

waiting for server to start:
.
waiting for server to start: giving up after 61 secs
!!! server failed to start! (t/logs/error_log wasn't created, start the server
in the debug mode)
*** Error exit code 1

In actual fact a server is started but the httpd process just spins consuming 
90% of one CPU and the only way to stop it is to issue a kill -9 (_SIGKILL) to
the process.

Has any one out there successful build on HPUX 11 ?

I have attached the output of t/REPORT.

Many thanks in advance.

Paul

-8-- Start Bug Report 8--
1. Problem Description:


2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS= /usr/local/apache2/bin/apxs
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1
  MP_USE_STATIC  = 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.40
Server built:   Sep 26 2002 08:50:18
Server's Module Magic Number: 20020628:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2
 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=hpux, osvers=11.00, archname=PA-RISC1.1-thread-multi
uname='hp-ux tutdarlb b.11.00 a 9000831 282814 two-user license '
config_args='-de'
hint=previous, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 +Z',
optimize='+O2 +Onolimit',
cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
-D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z'
ccversion='A.11.01.00', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lnm -lndbm -lmalloc -ldld -lm -lpthread -lc 

[OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Jim Morrison [Mailinglists]

Sorry.. 
This is completely off topic.. but I have a question you guys might help
me with..


I'm writing then next part of a big modperl project I'm doing.. This bit
could be loosely called a mailing-list-server..

The listserver is going to handle out-going (only'ish) opt-in mailing
lists.  The opting-in bit is all bound into the rest of the project, as
is the construction of the outgoing email, and the list management...

I'm wondering if there is any point in looking for a piece of third
party software/module etc, that will handle the sending of the mail or
should I work directly with sendmail? (Is sendmail the best mailserver
for this kind of thing?)

I'd be happy to write something along the line of formail.pl on my own,
so I kinda know what I'm doing, but I'm gonna have to take things like
Return to sender errors and such into account..



My question I guess is:
 - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
is there a better way of doing bulk mail?
 - Are there any mods to help with dealing with returned mail etc..?
 - Is there a good list of people doing this sort of thing? (Or do you
mind the thread being a little off-topic!)


I don't think I'm trying to reinvent the wheel.. Just that I think there
is so much of my own coding involved, I'm not sure if I'm going to be
able to get away with anything less than writing it from scratch..

Would be greatful for any advice,

Kindest,
Jimbo





Jim Morrison
_
Technology  Development Partner
Isotope LLP
9, 2 Laura Place
Bath, BA2 4BH
UK
+44  (0) 1225  446170
+44  (0) 7940 937822
www.mediaisotope.com




RE: [OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Joe Breeden

Look at MIME::Lite on CPAN

 -Original Message-
 From: Jim Morrison [Mailinglists] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 8:44 AM
 To: [EMAIL PROTECTED]
 Subject: [OT] - Mailing List Servers/mods .. etc
 
 
 Sorry.. 
 This is completely off topic.. but I have a question you guys 
 might help
 me with..
 
 
 I'm writing then next part of a big modperl project I'm 
 doing.. This bit
 could be loosely called a mailing-list-server..
 
 The listserver is going to handle out-going (only'ish) opt-in mailing
 lists.  The opting-in bit is all bound into the rest of the 
 project, as
 is the construction of the outgoing email, and the list management...
 
 I'm wondering if there is any point in looking for a piece of third
 party software/module etc, that will handle the sending of the mail or
 should I work directly with sendmail? (Is sendmail the best mailserver
 for this kind of thing?)
 
 I'd be happy to write something along the line of formail.pl 
 on my own,
 so I kinda know what I'm doing, but I'm gonna have to take things like
 Return to sender errors and such into account..
 
 
 
 My question I guess is:
  - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
 is there a better way of doing bulk mail?
  - Are there any mods to help with dealing with returned mail etc..?
  - Is there a good list of people doing this sort of thing? (Or do you
 mind the thread being a little off-topic!)
 
 
 I don't think I'm trying to reinvent the wheel.. Just that I 
 think there
 is so much of my own coding involved, I'm not sure if I'm going to be
 able to get away with anything less than writing it from scratch..
 
 Would be greatful for any advice,
 
 Kindest,
 Jimbo
 
 
 
 
 
 Jim Morrison
 _
 Technology  Development Partner
 Isotope LLP
 9, 2 Laura Place
 Bath, BA2 4BH
 UK
 +44  (0) 1225  446170
 +44  (0) 7940 937822
 www.mediaisotope.com
 
 



Re: [OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Robert Landrum

I did just this.  Unfortunatly, sendmail proved to be too slow, both in 
command line piping (i.e. open(PROG,| sendmail );), and via
socket connection to port 25 to be a viable solution for the volume of mail we
sent.

Last I checked, the code I wrote interfaced with Lyris, which was performing
ok.  When I left the project, they were looking into alternative approaches to
sending email.  Note that this was all legitimate (double opt-in) bulk email.

I have some code which is public.  Go grab SMTP-* from 
http://bigrob.ath.cx/dist/.  These are a little better than the currently
existing Net:: modules.  I do a bit more logging and error checking.

At some point, those should be on CPAN if I can get the namespace approved.

:)

Good luck,
Rob

On Thu, Sep 26, 2002 at 02:44:12PM +0100, Jim Morrison [Mailinglists] wrote:
 Sorry.. 
 This is completely off topic.. but I have a question you guys might help
 me with..
 
 
 I'm writing then next part of a big modperl project I'm doing.. This bit
 could be loosely called a mailing-list-server..
 
 The listserver is going to handle out-going (only'ish) opt-in mailing
 lists.  The opting-in bit is all bound into the rest of the project, as
 is the construction of the outgoing email, and the list management...
 
 I'm wondering if there is any point in looking for a piece of third
 party software/module etc, that will handle the sending of the mail or
 should I work directly with sendmail? (Is sendmail the best mailserver
 for this kind of thing?)
 
 I'd be happy to write something along the line of formail.pl on my own,
 so I kinda know what I'm doing, but I'm gonna have to take things like
 Return to sender errors and such into account..
 
 
 
 My question I guess is:
  - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
 is there a better way of doing bulk mail?
  - Are there any mods to help with dealing with returned mail etc..?
  - Is there a good list of people doing this sort of thing? (Or do you
 mind the thread being a little off-topic!)
 
 
 I don't think I'm trying to reinvent the wheel.. Just that I think there
 is so much of my own coding involved, I'm not sure if I'm going to be
 able to get away with anything less than writing it from scratch..
 
 Would be greatful for any advice,
 
 Kindest,
 Jimbo
 
 
 
 
 
 Jim Morrison
 _
 Technology  Development Partner
 Isotope LLP
 9, 2 Laura Place
 Bath, BA2 4BH
 UK
 +44  (0) 1225  446170
 +44  (0) 7940 937822
 www.mediaisotope.com



Re: Reverse Proxy Setup

2002-09-26 Thread Igor Sysoev

On Thu, 26 Sep 2002, Scott Alexander wrote:

 I have two experimental servers frontend and mod_perl.
 
 mod_perl is apache with mod_perl
 frontend is apache lightweight
 
 My config only passes *.pl thru to mod_perl
 
 When a user uploads a file they use a mod_perl script on mod_perl and the
 file is saved on mod_perl.

If you use mod_proxy thne mod_perl would be busy for all upload time.
Although there's patch for mod_proxy to buffer upload in temp file.
mod_accel always buffers client's upload.

 But I want the file to be on frontend as it makes sense for when they
 download the file ... they only need a lightweight apache server to do
 that.
 
 So far I can think of doing
 
 1. Putting a cgi script on frontend to handle file uploads and save the
 file on frontend.
 
 2. Use network file share between mod_perl and frontend.

You can send file from mod_perl and cache it on frontend.
If you use mod_accel then it buffers whole reponse from backend
in temp file and releases mod_perl as soon as possible.
You even do not need to cache it.


Igor Sysoev
http://sysoev.ru




Re: [OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Erich L. Markert

It's been a while since I last used it, but I used a perl app called 
bulkmail.  Worked like a champ on a UNIX/sendmail system.

Robert Landrum wrote:

I did just this.  Unfortunatly, sendmail proved to be too slow, both in 
command line piping (i.e. open(PROG,| sendmail );), and via
socket connection to port 25 to be a viable solution for the volume of mail we
sent.

Last I checked, the code I wrote interfaced with Lyris, which was performing
ok.  When I left the project, they were looking into alternative approaches to
sending email.  Note that this was all legitimate (double opt-in) bulk email.

I have some code which is public.  Go grab SMTP-* from 
http://bigrob.ath.cx/dist/.  These are a little better than the currently
existing Net:: modules.  I do a bit more logging and error checking.

At some point, those should be on CPAN if I can get the namespace approved.

:)

Good luck,
Rob

On Thu, Sep 26, 2002 at 02:44:12PM +0100, Jim Morrison [Mailinglists] wrote:
  

Sorry.. 
This is completely off topic.. but I have a question you guys might help
me with..


I'm writing then next part of a big modperl project I'm doing.. This bit
could be loosely called a mailing-list-server..

The listserver is going to handle out-going (only'ish) opt-in mailing
lists.  The opting-in bit is all bound into the rest of the project, as
is the construction of the outgoing email, and the list management...

I'm wondering if there is any point in looking for a piece of third
party software/module etc, that will handle the sending of the mail or
should I work directly with sendmail? (Is sendmail the best mailserver
for this kind of thing?)

I'd be happy to write something along the line of formail.pl on my own,
so I kinda know what I'm doing, but I'm gonna have to take things like
Return to sender errors and such into account..



My question I guess is:
 - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
is there a better way of doing bulk mail?
 - Are there any mods to help with dealing with returned mail etc..?
 - Is there a good list of people doing this sort of thing? (Or do you
mind the thread being a little off-topic!)


I don't think I'm trying to reinvent the wheel.. Just that I think there
is so much of my own coding involved, I'm not sure if I'm going to be
able to get away with anything less than writing it from scratch..

Would be greatful for any advice,

Kindest,
Jimbo





Jim Morrison
_
Technology  Development Partner
Isotope LLP
9, 2 Laura Place
Bath, BA2 4BH
UK
+44  (0) 1225  446170
+44  (0) 7940 937822
www.mediaisotope.com



-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/





Re: Reverse Proxy Setup

2002-09-26 Thread siberian

Make proxy and mod_perl have the same document root.

Use mod_rewrite on the lightweight proxy to serve certain 
directories from itself rather then passing them back to 
modperl (have it server images while you are at it)

Upload files to the directory specified above.

Result : File is uploaded using mod_perl but accessed 
using the static apache. Bonus, your images are served out 
of it as well meaning you get a really great performance 
boost.

John-
On Thu, 26 Sep 2002 18:30:45 +0400 (MSD)
  Igor Sysoev [EMAIL PROTECTED] wrote:
On Thu, 26 Sep 2002, Scott Alexander wrote:

 I have two experimental servers frontend and mod_perl.
 
 mod_perl is apache with mod_perl
 frontend is apache lightweight
 
 My config only passes *.pl thru to mod_perl
 
 When a user uploads a file they use a mod_perl script on 
mod_perl and the
 file is saved on mod_perl.

If you use mod_proxy thne mod_perl would be busy for all 
upload time.
Although there's patch for mod_proxy to buffer upload in 
temp file.
mod_accel always buffers client's upload.

 But I want the file to be on frontend as it makes sense 
for when they
 download the file ... they only need a lightweight 
apache server to do
 that.
 
 So far I can think of doing
 
 1. Putting a cgi script on frontend to handle file 
uploads and save the
 file on frontend.
 
 2. Use network file share between mod_perl and frontend.

You can send file from mod_perl and cache it on frontend.
If you use mod_accel then it buffers whole reponse from 
backend
in temp file and releases mod_perl as soon as possible.
You even do not need to cache it.


Igor Sysoev
http://sysoev.ru





Re: [OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Rob Nagler

Jim Morrison [Mailinglists] writes:
 I'm wondering if there is any point in looking for a piece of third
 party software/module etc, that will handle the sending of the mail or
 should I work directly with sendmail? (Is sendmail the best mailserver
 for this kind of thing?)

sendmail has its problems, but I can send about 10K msgs/hour on a
low-end server (500Mhz).  It's good enough for most low-end mailing
list problems.

 I'd be happy to write something along the line of formail.pl on my own,
 so I kinda know what I'm doing, but I'm gonna have to take things like
 Return to sender errors and such into account..

Tough problem in general, which companies like experian, doubleclick
and returnpath.net spend lots of money on.  You need to know how to
parse this information without false positives.

 My question I guess is:
  - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
 is there a better way of doing bulk mail?

I don't think you should worry about it right now.  sendmail can
handle the load.  You can always use an internal relay if you need to
distribute the load.  Hardware is cheap.

  - Are there any mods to help with dealing with returned mail etc..?

bOP has a C program called b-sendmail-http.[1]  It's a gateway from
sendmail to http.  We handle all mail through mod_perl.  You can use
b-sendmail-http with any HTTP implementation, because it simply wraps
the e-mail, client IP, and envelope to into multipart/form-data.[2]

  - Is there a good list of people doing this sort of thing? (Or do you
 mind the thread being a little off-topic!)

I like it, then my current project is in this space. :-)

 I don't think I'm trying to reinvent the wheel.. Just that I think there
 is so much of my own coding involved, I'm not sure if I'm going to be
 able to get away with anything less than writing it from scratch..

The code isn't complicated, but the detailed knowledge is.  There are
a number of mailinglist packages out there including ultimate bbs,
which is used by quite a number of sites.  We rolled our own, because
email is integrated with other apps (e.g. search, file sharing, and
group join).

Rob

[1] http://www.bivio.biz/f/bOP/bin/b-sendmail-http.c
[2] http://petshop.bivio.biz/src?s=Bivio::Biz::Model::MailReceiveBaseForm





Re: [OT] - Mailing List Servers/mods .. etc

2002-09-26 Thread Brian Reichert

On Thu, Sep 26, 2002 at 02:44:12PM +0100, Jim Morrison [Mailinglists] wrote:
 Sorry.. 
 This is completely off topic.. but I have a question you guys might help
 me with..
 
 
 I'm writing then next part of a big modperl project I'm doing.. This bit
 could be loosely called a mailing-list-server..
 
 The listserver is going to handle out-going (only'ish) opt-in mailing
 lists.  The opting-in bit is all bound into the rest of the project, as
 is the construction of the outgoing email, and the list management...

I endorse qmail + ezmlm for mailing list management.

There are many tales of qmail being faster than sendmail, with
respect to enqueuing and remotely delivering mail.  

And, ezmlm (a qmail-aware mailing list manager) readily handles
issues like bounce management, etc.

 I'm wondering if there is any point in looking for a piece of third
 party software/module etc, that will handle the sending of the mail or
 should I work directly with sendmail? (Is sendmail the best mailserver
 for this kind of thing?)

Qmail does provide an interface called 'sendmail', so it would drop
in, without a hitch.  Qmail, hoever, does have a lower-level mechanism
for injecting mail into the local queue, called 'qmail-inject';
even more efficient.

 I'd be happy to write something along the line of formail.pl on my own,
 so I kinda know what I'm doing, but I'm gonna have to take things like
 Return to sender errors and such into account..

Hit Google.  People have written plenty of webbish front-ends to
the qmail universe (as well as other MTAs).

 My question I guess is:
  - Is it ok to send 100's or 1000's of mails to sendmail in one go, or
 is there a better way of doing bulk mail?

If the email messages are identical (ie., not customized for each
recipient), then a bulk inject via qmail-inject is the way to go;
you can easily inject _many_ thousands of messages in one go.

Even better: just treat your list of subscibers as an ezmlm mailing
list; all your code has to do is 'send this message to list'.  You
don't have to do any work at all; ezmlm will even manage bounces
for you, and unsubscribe people.

  - Are there any mods to help with dealing with returned mail etc..?

For this reason, among many others, I use qmail instead of sendmail
for automated mail generation + handling, so that I can take advantage
of the VERP feature.  Essentially, it's a way of crafting the sender
part of the envelope to redundtanly contain the recipient part,
such that when your server receives a bounce, it 'knows' who it was
sent to.  Saves you the pain of parsing the myriad non-standard
bounce message formats out there.

See:

  http://cr.yp.to/proto/verp.txt

  - Is there a good list of people doing this sort of thing? (Or do you
 mind the thread being a little off-topic!)

This whole issue isn't about a web server; it's about how to generate
automated mail, and to manage returned messages programmtically.
It sounds like the conversation should happen on a mailing list for
your MTA of choice.  (sendmail, qmail, postfix, etc.)

So, start looking here:

  http://www.ezmlm.org/

This will explain tons of features of ezmlm.  If it wins you over,
go here for qmail itself:

  http://www.qmail.org/
  
 I don't think I'm trying to reinvent the wheel.. Just that I think there
 is so much of my own coding involved, I'm not sure if I'm going to be
 able to get away with anything less than writing it from scratch..

Offload all of your mail-handling onto a MLM/MUA combo you trust.
Don't reinvent _that_ wheel.

 Would be greatful for any advice,

Good luck.

 Kindest,
 Jimbo

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path



Re: Documentation for Apache::exit()?

2002-09-26 Thread Francisco Corella

Hi Kyle,

 There are a few performance penalties when using Apache::Registry:

 * Scripts are compiled at first request instead of server start unless you
 use something like Apache::RegistryLoader.  So, the first request per
child
 will be a little bit slower and you don't get to share memory between
httpd
 children.  (Memory sharing can be a big problem.)

 * Every request runs through Apache::Registry::handler before your script
 gets called which has overhead including some setup code, an extra stat(),
 and a chdir().  (PerlRun and RegistryNG uses $r-finfo but Registry does
an
 extra stat() -- not sure if there's a reason for that.)

Thanks a lot.  I hadn't thought of the memory problem.  It seems that I'll
have to bite the proverbial bullet and not use Apache::Registry.

Francisco




Re: Documentation for Apache::exit()?

2002-09-26 Thread Francisco Corella

Hi Ged,

  Thanks for replying.  I hope you had a good time in my old country :-)

 You probably saw the reports on the news about roads being washed away
 by the rain in Sevilla.  I went on a motor-cycle.  Camping.

Mmm... Doesn't sound like the perfect vacation.  I'm glad you made it back
:-)

   If you're writing new code then I would recommend writing handlers and
   avoiding Apache::Registry altogether.
 
  Why do you recommend avoiding Apache::Registry?

 Apache::Registry is essentially just to get you going with mod_perl
 and your old CGI scripts.  See for example mod_perl_traps.pod which deals
 with some of the 'gotchas' that you can run into.  You can make better
 use of the Perl API using handlers.  (Of course you might not need to.:)

  Is there a performance penalty for using it?

 Handlers can be faster, yes, but since you get such a big performance
 boost from mod_perl to begin with it's not usually serious.  Read the
 the Eagle Book, the mod_perl Guide and the mod_perl CookBook.  (That
 will take you most of the rest of the year...:)  The details are on
 the mod_perl home page.

Thanks for the pointers.  I've read the Eagle Book already, and I check the
Guide as needed, but I wasn't aware of the mod_perl CookBook.  I've checked
the table of contents on Amazon and ordered it.

Francisco

---
Francisco Corella
[EMAIL PROTECTED]




Re: BUG:Apache::Cookie v1.0

2002-09-26 Thread Michael Robinton

 * Michael McLagan [EMAIL PROTECTED] [2002-09-21 11:45]:
  There is a bug in Apache::Cookie.  It doesn't handle a cookie with
  zero bytes in it!

 This is because Apache::Cookie is implemented in C, and C uses NULL as
 the end of string terminator.

No quite accurate. C has no concept of a string. There are a number of
library functions for string handling that use '\0' as the string
terminator.

If somebody rewrites Apache::Cookie to replace those functions, it will
be able to handle such cookies.

 This is probably something that needs to be done in Perl, since I doubt
 there's a way to check for embedded NULLs in a string in C...

/* We assume there will always a '\0' to be found. */
char *
find_nul(char *str)
{
  while (*str) {
str++;
  }

  return str;
}

What interests me much more is *why* a cookie should be able to contain
*any* control character. If you want binary data in a cookie, you should
encode it somehow.

If the '\0' was a '\n', things would be much more interesting ...

Lupe Christoph

hmmm... that's not really to point. Apache::Cookie is supposed to be
modeled on and replace CGI::Cookie. If you examine the code in CGI::Cookie
you see that when the values are extracted from the input hash, they are
escaped and then placed into the string format used for a cookie. There is
no limitation at all on what characters may be place in the values that
are submitted for XXX::Cookie-new($r,%hash). The present situation really
is a bug in implementation due to the nature of the C lib used to process
the value portion of the cookie string. I suspect the same is true about
the cookie name since it is processed in a similar way in CGI::Cookie.

We're not discussing what is allowable in the cookie itself, only the
compatibility of the Apache::Cookie vs CGI::Cookie implementation on which
it is patterned.

Michael




Re: modules and pragmas - part II

2002-09-26 Thread Rick Myers

On Sep 24, 2002 at 23:14:02 +0200, [EMAIL PROTECTED] wrote:
 
 At the first request each instance prints out the no_xhtml-header, but
 at the second call the no_xhtml-pragma is forgotten and the
 xhtml-header is printed out.
 
 Is this a problem in the CGI-module or is there a deeper reason for
 this in mod_perl ?

The problem lies in CGI.pm itself. It installs a cleanup
handler which resets $CGI::XHTML to 1 after each request...

sub new {

Apache-request-register_cleanup(\CGI::_reset_globals);

}

sub _reset_globals { initialize_globals() };

sub initialize_globals {

$XHTML = 1;

}

So you'll need to set $CGI::XHTML=0 every time you call
CGI-new to get it to work right.

--rick



error compiling mod_perl-1.99_05 with Apache 2.0.42

2002-09-26 Thread Yue Luo

  Hi, I have installed Apache 2.0.42.  When I run the configuration
script:
perl Makefile.PL MP_AP_PREFIX=$HOME/httpd/prefork  MP_INST_APACHE2=1
  I got error:
Unable to determine server version.

I believe the bug is in /mod_perl-1.99_05/lib/Apache/Build.pm Line 746:
next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\(.*)\/;

It expect a line of integers in double quote.  While in this version of
Apache include/ap_release.h, the #define line is:
#define AP_SERVER_BASEREVISION  AP_SERVER_MINORREVISION . 
AP_SERVER_PATCHLEVEL

Therefore, it won't be able to find the correct version of the server.

Yue
   

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com



Help with Install

2002-09-26 Thread Jim Kipp

Hi 
I am totally new to modperl, in fact i have not even installed it yet.
i want to install Mod perl 2.0 with Apache 2.0.42. I am not sure i
understand
the perl preReqs in the install docs. I have perl 5.6.1 without thread
support. Am I good to go or do I need to build perl again. Also is what is
mpm and is 'mpm=prefork' necessary in the apache build config? Any other
tips from anyone with a similar setup is appreciated.

Thank You

attachment: winmail.dat

Re: Help with Install

2002-09-26 Thread Lester Vecsey


- Original Message -
From: Jim Kipp [EMAIL PROTECTED]


 . Also is what is
 mpm and is 'mpm=prefork' necessary in the apache build config? Any other
 tips from anyone with a similar setup is appreciated.


prefork is the way it comes stock, what you probably want is mpm=worker for
the threaded version. I notice there is also an option in ./configure called
'threadpool' for the mpm, but its not defined either there or in the website
documentation..

i'm in the same boat as you though, trying to find the appropriate setup to
use for apache 2.0. in my case i think i can get it working if /usr/bin/perl
is my upgraded perl installation, but i'm so far testing with
/usr/bin/perl-5.8.0 and /usr/bin/perl-5.8.0-threaded installed, with
/usr/bin/perl still pointing to 5.6.0. I was able to get the perl modules
DBD, sybase/freettds, etc, running on each of these three independent
installations so now I'm trying to get modperl 1.99/2.0 built correctly with
the latter two so I can compare mod_perl.so from the 5.8.0 threaded and
non-threaded versions in different apache installations.