compiling mod_perl for solaris

2000-08-31 Thread Joseph Sirucka - Netics

Hi People

I've been trying to compile mod_perl for solaris 8 recently and I
recompiled perl 5.6.0 with _ubincompat5005 and -Uuselargefiles.

But no matter what I do with with mod_perl to compile it at
perl Makefile.PL blah i get this error

ld.so.1: perl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/HTML/Parser/Parser.so:

symbol perl_get_hv: referenced symbol not found
Killed

what am I doing wrong. What I'm trying to do is compile mod_perl as a
seperate module.

Hope to hear from someone soon.

--
   Joseph Sirucka

[EMAIL PROTECTED]







Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread Barrie Slaymaker

Matt Sergeant wrote:
> 
> Yes, I believe the entry is simply *.domain.com!
> 
> Then use mod_rewrite to map the right folder.

Yup.  Beware though, there are certain issues you may need to think of if
you're going to be sending/receiving mail from these domain names.  One
problem is the reverse name lookup that mail transfer agents (sendmail,
qmail, etc).  But if all you're doing is web serving, should be Ok.

- Barrie



Re: mod_perl for Apache to work with ActivePerl (APR#816)

2000-08-31 Thread Doug MacEachern

On Fri, 25 Aug 2000, Gurusamy Sarathy wrote:
 
> mod_perl apparently doesn't know anything about ithreads.  This
> patch makes it build and "work" for me, but I haven't tested it
> for more than 20 seconds.  It is possible that similar treatment
> is needed for other callbacks that my 20-seconds worth of testing
> did not trigger.  :-)

strange, my Perl is an ithreads Perl, has been for several months.  i had
to make several changes initially, but it's been running for me with
linux+ithreads since.  anyhow, still runs fine with your patch
(committed to cvs for 1.25) and Randy Kobes has confirmed the win32 side.
thanks Sarathy!!




Re: Apache.xs patch for get_client_block

2000-08-31 Thread joe

Doug,

Thanks for clearing this up for me - great explanation!  
I'll let you know how your patch works out.

Btw: I've been playing with the keep-alive stuff you left lying around
in Connection.xs.  The naive implementation I made seems to work fine,
once the headers are sent to the client.  Are you planning to add them 
in the next mod_perl release? 

-- 
Joe Schaefer
[EMAIL PROTECTED]

SunStar Systems, Inc.



Re: question on code snippet in mod_perl guide

2000-08-31 Thread Aaron Johnson

I don't work on Oracle so I will speak from my experience with MySQL.  MySQL
servers time out after the 8 hour standard disconnect for inactivity (this
can be adjusted in your my.conf file).  To compensate for this we now run our
own connect checks for a valid dbh handle before it goes it all the trouble
to make one along with Apache::DBI

We have not had any more issues with the database connects since we moved to
this method.  We do a ping and validate the dbh handle rather then blindly
accessing the dbh handle since Apache::DBI will only validate the dbh handle
on a connect.

Aaron Johnson

Perrin Harkins wrote:

> On Thu, 31 Aug 2000 [EMAIL PROTECTED] wrote:
> > What I think is going on is that the script gets killed by Oracle for
> > being idle and tries to ping the connection, but the ping fails.
>
> It is supposed to reconnect when the ping fails.  I've had problems
> getting reconnects to Oracle 8 working.  The "solution" we ended up with
> was to make processes that can't reconnect send an error page and
> exit.  New processes are able to connect.  I'm not sure what causes this
> problem.
>
> Since your problem is caused by your processes being idle for too long,
> this may go away when you move out of testing mode into a public release.
> You might want to tweak your MinSpareServers settings so that you won't
> have lots of idle processes hanging around.
>
> > >Rebild your mod_perl with the EVERYTHING=1 flag.  That will get rid
> > of the >above error message.
> >
> > So I have to re-install it?  Is there anything I need to do when I
> > rebuild it?  Or do I just need to reinstall mod_perl as it's done in
> > the documentation?
>
> Just rebuild it and re-install as it shows in the docs.
>
> - Perrin




Re: Apache.xs patch for get_client_block

2000-08-31 Thread Doug MacEachern

On 31 Aug 2000 [EMAIL PROTECTED] wrote:

> Doug,
> 
> Sorry to belabor a dull issue, but I'm not sure I'm getting my point across.

no problem, this is important stuff to understand.
 
> Most of the troubles I've run across in the mod_perl and libapreq code
> have to do with attempts to allocate memory resources for buffers 
> at runtime.  That's exactly what the BUFF API does, right?

not really, BUFF uses some stack allocation, it's generally up to the
caller to manage i/o buffers.
 
> What I'm seeing is that you are also resizing/reallocating these buffers
> each time the code is called. For instance, the original 
> get_client_block had this line in it:
> 
> > -buffer = (char*)palloc(r->pool, bufsiz);
> 
> The one you just sent me has this line instead:
> 
> > +SvGROW(buffer, bufsiz+1);
> 
> I'm not sure what SvGROW does, but if it involves a malloc
> without freeing the old buffer, you've got the same problem as before.  
> Each time the perl version of get_client_block is called, 
> SvGROW will work it's majic on RAM, and perl won't give that RAM
> back to the OS. 

but that "problem" still existed with your patch in this line:
sv_setpvn((SV*)ST(1), buffer, nrd);

same thing happens underneath (see sv.c).  we can't just point Perl
variables at buffers allocated on the stack.  SvGROW() will only malloc()
(or realloc) if the buffer isn't already large enough to the given length.
Perl hangs onto that allocation as an optimization, so it only has to
malloc() once for a given variable, and maybe realloc() if a later string
assignment is larger.  consider this example:

sub foo {
   ...
my $buff;
while (my $len = $r->get_client_block($buff, 1024)) {
print "$buff\n";
}
   ...
}

the SvGROW() underneath will only trigger malloc() for $buff _once_, for
the entire lifetime of the process.
Perl will only release the string buffer allocation if you explicity
undef() the variable.  this is true for all variables, including those
scoped with my().  clearly, you would not want to undef($buff) inside the
while loop, otherwise malloc() will be called each time through the loop.
outside the loop would not be so bad, then malloc() will only happen for
$buff each time sub foo is called.  if it's called often, like for every
request, it might be better to let Perl hang onto the allocation, that's
up to you.

now, what happens when that buffer is released depends on your Perl and
perhaps os.  if your Perl is built with Perl's malloc, the free()
triggered by undef() will give the memory back to Perl's pool of memory.
otherwise, free() will probably resolve to libc's free().  on some
platforms that means it is "given back to the os", on others it just means
that chunk of memory is available for reuse in that process the next time
somebody malloc's.




suexec: disabled?

2000-08-31 Thread Bakki Kudva

I recently upgraded to perl5.6 and added php4 to my apache server. I
don't know what I did wrong but I am getting the following errors.
If I do a httpd -l I get...

suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec

Also I cannot browse anything in htdocs becuase I get a "You don't have
permission to access / on this server." and the error log contains..

192.168.0.252 - - [31/Aug/2000:17:13:35 -0400] "GET / HTTP/1.0" 403 279

Where do I start to look for this permissions problem? The htdocs looks
is owned by 'nobody'.

An unrelated msg I get when I start the httpd ..
 DBI.pm: defined(@array) is deprecated at
/usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 135.
[Thu Aug 31 17:12:53 2000] DBI.pm:  (Maybe you should just omit the
defined()?)
  

I have installed ApacheDBI version 0.87.

I would appreciate any pointers.

bakki
-- 
  _ _
 .-. |M|S|  Bakki Kudva
 |D|_|a|y|  Navaco
 |o|m|n|s|<\420 Pasadena Drive
 |c|e|a|t| \\   Erie, PA 16505-1037
 |u|n|g|e|  \\  http://www.navaco.com/
 | |T|e|m|   \> ph: 814-833-2592
""  fax:603-947-5747
e-Docs



where "WhatEverLoginScript" points?

2000-08-31 Thread Pires Claudio

Hi,
I installed Apache::AuthCookie succesfully. I tried the example
given and it worked fine. Now, I want to use AuthCookie , but I have a
problem. I am using an alias directory like this ...

Alias /demo/html/ "/home/claudio/demo/"

Options Indexes Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
 

... to preserve the original document tree (that point to /home/httpd/html),
and I want to use authorization only with my own document tree. But when
AuthCookie looks for login.pl, AuthCookie fails because he is looking in the
original document tree (defined in DocumentRoot key).
My question is: is there any way to indicate absolute paths to
WhatEverLoginScript var? or any way to indicate it must look in an aliased
directory?
Thanks a lot.

Claudio



Re: question on code snippet in mod_perl guide

2000-08-31 Thread Perrin Harkins

On Thu, 31 Aug 2000 [EMAIL PROTECTED] wrote:
> What I think is going on is that the script gets killed by Oracle for
> being idle and tries to ping the connection, but the ping fails.

It is supposed to reconnect when the ping fails.  I've had problems
getting reconnects to Oracle 8 working.  The "solution" we ended up with
was to make processes that can't reconnect send an error page and
exit.  New processes are able to connect.  I'm not sure what causes this
problem.

Since your problem is caused by your processes being idle for too long,
this may go away when you move out of testing mode into a public release.  
You might want to tweak your MinSpareServers settings so that you won't
have lots of idle processes hanging around.

> >Rebild your mod_perl with the EVERYTHING=1 flag.  That will get rid
> of the >above error message.
> 
> So I have to re-install it?  Is there anything I need to do when I
> rebuild it?  Or do I just need to reinstall mod_perl as it's done in
> the documentation?

Just rebuild it and re-install as it shows in the docs.

- Perrin




PassEnv (passing everything)

2000-08-31 Thread erich oliphant

Hi,
I am porting a shell script CGI to mod_perl.  It uses a great many 
environment variables.  I'm new to the project so figuring out which 
variables to pass is rather tedious.  Does PassEnv support wildcards 
(PassEnv *) or some option to pass the entire parent environment?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




Re: Web based message board system

2000-08-31 Thread Michael Todd Glazier

For a client I installed mwforum, which uses my two fave 
technologies, mysql and mod_perl.

http://www.mawic.de/mwforum/

I like it. It's very customizable and clearly written enough to 
reverse engineer. However, if you need different boards with separate 
identities you'll need to install it multiple times.

- mt


>Hello.
>
>Do anyone know about a good solution (either Free or commercial) for web
>based discussion forum that integrate well with mod_perl? This need to
>be able to sustain a relatively high load..
>
>Any comments on things like Bazar, Slash, Acity (ex Agora), WWWthreads?
>
>
>Thanks for any suggestion...
>
>
>--
>Benoit Caron
>Analyste-Programmeur
>Netgraphe - Webfin.com - Le Web Financier
>[EMAIL PROTECTED]
>(514)847-9155 poste 3233
>- - - - - - - - - - - - - - - - - - - - - - - -
>Those who do not understand Unix are condemned to reinvent it, poorly.
>-- Henry Spencer




Re: Apache.xs patch for get_client_block

2000-08-31 Thread Billy Donahue

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 31 Aug 2000 [EMAIL PROTECTED] wrote:

> I'm not sure what SvGROW does, but if it involves a malloc
> without freeing the old buffer, you've got the same problem as before.  
> Each time the perl version of get_client_block is called, 
> SvGROW will work it's majic on RAM, and perl won't give that RAM
> back to the OS. 

I'm ignorant enough on the rest of what you're talking about to keep
my mouth shut, but I should point out that perl can't give RAM back to
the OS.  It can only give RAM back to the rest of the perl process.
If you allocate 64M in the first 100msec to initialize your process,
and then you stay alive for 2 weeks, that 64M is missing from the system
for 2 weeks.

- --
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: pgpenvelope 2.9.0 - http://pgpenvelope.sourceforge.net/

iD8DBQE5rs4R+2VvpwIZdF0RArPCAJ4ov5QnK7f6Hbecwy9l7+0LehgKLQCeJtNm
j5/H+FuY8WzgNXUH8qnjXEI=
=rNah
-END PGP SIGNATURE-




Re: Apache.xs patch for get_client_block

2000-08-31 Thread joe

Doug,

Sorry to belabor a dull issue, but I'm not sure I'm getting my point across.

Most of the troubles I've run across in the mod_perl and libapreq code
have to do with attempts to allocate memory resources for buffers 
at runtime.  That's exactly what the BUFF API does, right?

What I'm seeing is that you are also resizing/reallocating these buffers
each time the code is called. For instance, the original 
get_client_block had this line in it:

> -buffer = (char*)palloc(r->pool, bufsiz);

The one you just sent me has this line instead:

> +SvGROW(buffer, bufsiz+1);

I'm not sure what SvGROW does, but if it involves a malloc
without freeing the old buffer, you've got the same problem as before.  
Each time the perl version of get_client_block is called, 
SvGROW will work it's majic on RAM, and perl won't give that RAM
back to the OS. 

Best.
-- 
Joe Schaefer
[EMAIL PROTECTED]

SunStar Systems, Inc.



Installation problem...

2000-08-31 Thread Derrick

Dear all,
This is my second time sending this email with the same content.  If anybody
know how to fix my problem, please let me know.  Thanks.
I am trying to install mod-perl on my freebsd 4.0 server with stronghold and
lastest modperl from cvs.  I keep having the same error as follow:


==
ib/perl5/5.6.0/i386-freebsd/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/pe
rl5/
5.6.0/i386-freebsd/CORE -lperl -lm -lc -lcrypt
modules/extra/libphp.a(file.o): In function `TempNam':
file.o(.text+0x13ec): warning: tempnam() possibly used unsafely; consider
using
mkstemp()
modules/proxy/libproxy.a(proxy_cache.o): In function
`ap_proxy_cache_update':
proxy_cache.o(.text+0x1dfa): warning: mktemp() possibly used unsafely;
consider
using mkstemp()
modules/perl/libperl.a(Util.o): In function
`XS_Apache__Util_validate_password':
Util.o(.text+0x7ac): undefined reference to `ap_validate_password'
*** Error code 1

Stop in /usr/local/stronghold/src.
*** Error code 1

Stop in /usr/derrick/modperl.
==

I have already tried to use "perl Makefile.PL EVERYTHING=1", it still the
same.  Does anybody know how to fix this?
I really need help,
thanks to all,

Derrick









Re: question on code snippet in mod_perl guide

2000-08-31 Thread conark


>Hmmm.  How busy is the site or is still in testing phase?

Testing phase.

>Are you saying your connection is getting dropped and then you get an
error,or that you get dropped and then it has to reconnect?

Here's a sample of errors that I'm getting the error_log file:

[Tue Aug 29 20:15:52 2000] null: DBD::Oracle::st execute failed:
ORA-01012: not logged on (DBD ERROR: OCIStmtExecute) at
/u1/web/modules/(some_dir)/process.pm line 580.

[Tue Aug 29 20:25:21 2000] null: DBD::Oracle::db ping failed: ORA-02396:
exceeded maximum idle time, please connect again (DBD ERROR:
OCIStmtExecute/Describe) at /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm
line 112.

What I think is going on is that the script gets killed by Oracle for
being idle and tries to ping the connection, but the ping fails.  I took
the suggestion in Apache::DBI and replaced the ping code with the
subroutine in Oracle.pm but we still encountered this issue.  Later on
though we want the connection back but it never makes another call to the
connect subroutine that is described in the performance tuning t docs.  I
was guessing that the .pm file that calls the connect routine is in memory
someplace so it has no need to call back connect since it assumes that the
connection is still present.  Then at some random interval we get that
error message from apache.  I'm out of ideas of what's causing this.

>
>I guess I am missing the key to the question here :^)
>
>I have some suggestions that can help, but I need to know which you are
>dealing with first.

Cool.  Any help is much appreciated :)

>Rebild your mod_perl with the EVERYTHING=1 flag.  That will get rid of
the
>above error message.

So I have to re-install it?  Is there anything I need to do when I rebuild
it?  Or do I just need to reinstall mod_perl as it's done in the
documentation?




--

Why is College Club the largest and fastest growing college student site?
Find out for yourself at http://www.collegeclub.com





Web based message board system

2000-08-31 Thread Benoit Caron

Hello.

Do anyone know about a good solution (either Free or commercial) for web
based discussion forum that integrate well with mod_perl? This need to
be able to sustain a relatively high load..

Any comments on things like Bazar, Slash, Acity (ex Agora), WWWthreads?


Thanks for any suggestion...


-- 
Benoit Caron
Analyste-Programmeur
Netgraphe - Webfin.com - Le Web Financier
[EMAIL PROTECTED]
(514)847-9155 poste 3233
- - - - - - - - - - - - - - - - - - - - - - - -
Those who do not understand Unix are condemned to reinvent it, poorly. 
-- Henry Spencer



Re: Apache.xs patch for get_client_block

2000-08-31 Thread Doug MacEachern

On 31 Aug 2000 [EMAIL PROTECTED] wrote:

> The mod_perl implementation of get_client_block has a memory leak.
> The following patch should keep it from from pissing in r->pool.

thanks joe.  i don't see how allocating from r->pool is a "leak", but
yeah, it is a waste of resources since Perl is going to make it's own
copy.  read_client_block() has similar waste which i've been meaning to
fix.  this patch trims allocations for both by reading directly into
Perl's buffer:

Index: src/modules/perl/Apache.xs
===
RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.106
diff -u -r1.106 Apache.xs
--- src/modules/perl/Apache.xs  2000/08/31 05:49:06 1.106
+++ src/modules/perl/Apache.xs  2000/08/31 20:33:03
@@ -940,7 +940,7 @@
 void
 read_client_block(r, buffer, bufsiz)
 Apache r
-char*buffer
+SV*buffer
 int  bufsiz
 
 PREINIT:
@@ -948,29 +948,31 @@
 int rc;
 
 PPCODE:
-buffer = (char*)safemalloc(bufsiz);
 if ((rc = setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
aplog_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r->server, 
"mod_perl: setup_client_block failed: %d", rc);
XSRETURN_UNDEF;
 }
 
-if(should_client_block(r)) {
-   nrd = get_client_block(r, buffer, bufsiz);
-   r->read_length = 0;
+if (should_client_block(r)) {
+SvUPGRADE(buffer, SVt_PV);
+SvGROW(buffer, bufsiz+1);
+nrd = get_client_block(r, SvPVX(buffer), bufsiz);
+r->read_length = 0;
 } 
 
 if (nrd > 0) {
-   XPUSHs(sv_2mortal(newSViv((long)nrd)));
-   sv_setpvn((SV*)ST(1), buffer, nrd);
+XPUSHs(sv_2mortal(newSViv((long)nrd)));
 #ifdef PERL_STASH_POST_DATA
-table_set(r->subprocess_env, "POST_DATA", buffer);
+table_set(r->subprocess_env, "POST_DATA", SvPVX(buffer));
 #endif
-safefree(buffer);
-   SvTAINTED_on((SV*)ST(1));
+SvCUR_set(buffer, nrd);
+*SvEND(buffer) = '\0';
+SvPOK_on(buffer);
+SvTAINTED_on(buffer);
 } 
 else {
-   ST(1) = &sv_undef;
+sv_setsv(buffer, &sv_undef);
 }
 
 int
@@ -985,22 +987,25 @@
 void
 get_client_block(r, buffer, bufsiz)
 Apache r
-char*buffer
+SV*buffer
 int  bufsiz
 
 PREINIT:
 long nrd = 0;
 
 PPCODE:
-buffer = (char*)palloc(r->pool, bufsiz);
-nrd = get_client_block(r, buffer, bufsiz);
+SvUPGRADE(buffer, SVt_PV);
+SvGROW(buffer, bufsiz+1);
+nrd = get_client_block(r, SvPVX(buffer), bufsiz);
 if ( nrd > 0 ) {
XPUSHs(sv_2mortal(newSViv((long)nrd)));
-   sv_setpvn((SV*)ST(1), buffer, nrd);
-   SvTAINTED_on((SV*)ST(1));
+SvCUR_set(buffer, nrd);
+*SvEND(buffer) = '\0';
+SvPOK_on(buffer);
+SvTAINTED_on(buffer);
 } 
 else {
-   ST(1) = &sv_undef;
+   sv_setsv(ST(1), &sv_undef);
 }
 
 int




question on code snippet in mod_perl guide

2000-08-31 Thread conark

In the section on optimizing the db and prepare statements (in the
http://perl.apache.org/guide/performance.html url), the document discusses
creating a subroutine called "connect" in a package called package My::DB;
My question is if you have the

my $dbh = My::DB->connect;

statement in another package, what exactly happens to that connection
between request of the script using that package?  For instance, let's say
that statement was contained in package foo.pm and is used in the script
bar.cgi.  If this script is being loaded in mod_perl, when is this
connection being re-established?

Let me see if I can explain the situation that I'm dealing with.  In my
case, let's say I have the script bar.cgi being executed.   I put some
warnings in that connect subroutine that tell me when it's being called.
I look at the error_log in Apache to see when this connection is being
called.  Let's say out of 5-6 times, the function isn't called (which
presumably is because the connection is either persistent or that the
module being loaded in mod_perl doesn't go away??) but on the 7th or so
time I see it called.  The error seems inconsistent.  My guess was that
the connection is maintained as a process until it goes away, but I'm not
100% certain.

The situation kinda sucks because the connection gets lost or is killed by
a trigger in Oracle (after 60 minutes), but I have no real way of figuring
out when this situation arises.  So going back to my question, when is the
connection getting reestablished using this code?

Anyway, while I'm on the topic of disconnecting DBs, I've been getting
this error in the logs:

Rebuild with -DPERL_STACKED_HANDLERS to $r->push_handlers at
/usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 93.

What is this error?  How can I specifically deal with it?  And lastly is
this issue connected with my connection not getting reconnected
occasionally?  Thanks
(Really tired.  Sorry)


--

Why is College Club the largest and fastest growing college student site?
Find out for yourself at http://www.collegeclub.com





Re: Problems loading POSIX module

2000-08-31 Thread Matt Sergeant

On Thu, 31 Aug 2000, erich oliphant wrote:

> Hmmm, well shouldn't Perl and OS handle that?  It's only referenced in the 
> script once.  The POSIX module is not among the default preloaded modules 
> (CGI, etc) and it bombs as described when I try to preload from the 
> httpd.conf.
> 
> It's very bizarre.

Indeed it is - I actually have no idea why its happening. Did you upgrade
an old Perl or something odd?

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: Is there any Solution ???? No Answer

2000-08-31 Thread Joshua Gerth


Sambit,

I am sort of in the same situation as you.  We have multiple NT
domains ( >10) which I needed to authenticate against.  My solution was
basically to rewrite the Apache::AuthenSmb code so it would accept a
NTDOM*\login

login.  Then, in a configuration file I had
NTDOM1:PDC,BDC1,BDC2,BDC3...
NTDOM2:PDC,BDC2,BDC2...
...

My AuthenSmb module simply looks for the NTDOM* in the config file and
whips down the list until one of the servers answers with a "Yes", or
"No".  (The others may be too busy, or down).

This works great for me.  However, I can't post the code to CPAN as I
don't "own" it, my company does.  I hope to shortly be able to "apply" for
its release to the public.  'Till then thats the best I can do.

Hope that helps some,
Joshua


> Hi Group 
>I did not receive any answer from the perl world
> about my question. 
>   Looks Like no body put any attention to it . 
> 
>   I like to remind the question again ..  Here it goes
> 
>
>I am using Apache 1.3.11 + Mod ssl + open SSL +
> Mode Perl + mod _php like that on my web server
> soalris 2.7 for Sparc.
> 
> I am also using Mod AuthenSmb for Authentication of my
> web server with NT Account. and all working fine .
> Till now i am using  Single NT PDC for Authentication
> of User Id / password with Apache Web Server. Now i am
> having a requirement to go for Multiple Domain With
> multiple PDC  for that reason i set like
> 
>   PerlSetVar SEcond-Domain PDC2
>   PerlSetVar PDC2 PDC2 
> 
> like the setup for PDC1 but still it is not working
> 
> Can any body give me idea how to figure out this.
> 
> I will appreciate for all the help.
> 
> Thanks
> 
> Sambit Nanda
> Unix Admin 
> 
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
> 
> 




Is there any Solution ???? No Answer

2000-08-31 Thread Sambit Nanda

Hi Group 
   I did not receive any answer from the perl world
about my question. 
  Looks Like no body put any attention to it . 

  I like to remind the question again ..  Here it goes

   
   I am using Apache 1.3.11 + Mod ssl + open SSL +
Mode Perl + mod _php like that on my web server
soalris 2.7 for Sparc.

I am also using Mod AuthenSmb for Authentication of my
web server with NT Account. and all working fine .
Till now i am using  Single NT PDC for Authentication
of User Id / password with Apache Web Server. Now i am
having a requirement to go for Multiple Domain With
multiple PDC  for that reason i set like

  PerlSetVar SEcond-Domain PDC2
  PerlSetVar PDC2 PDC2 

like the setup for PDC1 but still it is not working

Can any body give me idea how to figure out this.

I will appreciate for all the help.

Thanks

Sambit Nanda
Unix Admin 




__
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/



Re: Problems loading POSIX module

2000-08-31 Thread erich oliphant

Hmmm, well shouldn't Perl and OS handle that?  It's only referenced in the 
script once.  The POSIX module is not among the default preloaded modules 
(CGI, etc) and it bombs as described when I try to preload from the 
httpd.conf.

It's very bizarre.


>From: Matt Sergeant <[EMAIL PROTECTED]>
>To: erich oliphant <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: Problems loading POSIX module
>Date: Wed, 30 Aug 2000 20:32:46 +0100 (BST)
>
>On Wed, 30 Aug 2000, erich oliphant wrote:
>
> > Hi,
> > I have a script that bombs under modperl when it tries to 'use POSIX'.  
>I
> > get the same message when I try to preload it in the httpd.conf.  Here's 
>the
> > error:
> > --
> > [Tue Aug 29 15:59:21 2000] [error] Can't load
> > '/usr/local/lib/perl5/5.6.0/sun4-solaris/auto/POSIX/POSIX.so' for module
> > POSIX: ld.so.1: httpd: fatal: relocation error: file
> > /usr/local/lib/perl5/5.6.0/sun4-solaris/auto/POSIX/POSIX.so:
> > symbolPL_stack_sp: referenced symbol not found at
> > /usr/local/lib/perl5/5.6.0/sun4-solaris/XSLoader.pm line 73.  at
> > /usr/local/lib/perl5/5.6.0/sun4-solaris/POSIX.pm line 24 Compilation 
>failed
> > in require at /dts/env/TRAVEL/app/dts/web/cgi-bin/webspeed.pl line 76. 
>BEGIN
> > failed--compilation aborted at
> > /dts/env/TRAVEL/app/dts/web/cgi-bin/webspeed.pl line 76.
> > --
> > The script runs fine from the command line.
> > There are two versions of perl on the box 5.6 and 5.0005.  5.6 is first 
>in
> > the path on the command line (checked via perl -v and whereis).  I 
>examined
> > the perl-status page for mod_perl (Perl Configuration and Loaded 
>Modules).
> > They indicate that it's using 5.6 , the @INC paths have 5.6 stuff listed
> > first, and all of the loaded modules are coming out of the 5.6 
>directory.
> >
> > I am only using CGI and POSIX.  Since CGI was preloaded, I tried some
> > arbitrary unloaded modules (Math::Trig, etc.) and they ran fine.
> >
> > Any ideas?
>
>Could a POSIX.so already be loaded somehow?
>
>--
>
>
>Fastnet Software Ltd. High Performance Web Specialists
>Providing mod_perl, XML, Sybase and Oracle solutions
>Email for training and consultancy availability.
>http://sergeant.org | AxKit: http://axkit.org
>

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




Re: Dissappearing Lexicals

2000-08-31 Thread David E. Wheeler

Okay, my simplified module wouldn't loose the value of the package-level
lexical, but here's some output from my DBI library, which still looses
the value:

DBH Before Prepare: undef
DBH Before Connect: undef
DBH Connecting...
DBH After Connect: Apache::DBI::db=HASH(0x12d2214)
DBH After Prepare Connect: Apache::DBI::db=HASH(0x12d2214)

DBH Before selectcol_arrayref connect: undef
DBH Before Connect: Apache::DBI::db=HASH(0x12d2214)
DBH After Connect: Apache::DBI::db=HASH(0x12d2214)
DBH After selectcol_arrayref connect: undef


The code that triggers these events looks like this:

dbi_prepare($sql);
dbi_selectcol_arraryref($sql, @params);

The dbi_prepare function looks like this:

sub dbi_prepare {
my $qry = shift;
print STDERR "DBH Before Prepare: ", $dbh || 'undef', "\n";
_connect();
print STDERR "DBH After Prepare Connect: ", $dbh || 'undef', "\n";
return $dbh->prepare($qry);
} # dbi_prepare()


_connect looks like this:

sub _connect {
print STDERR "DBH Before Connect: ", $dbh || 'undef', "\n";
unless ($dbh && $dbh->ping) {
print STDERR "DBH Connecting...\n" if $DEBUG;
$dbh = DBI->connect("DBI:$DBD:$DSN", $ID, $PASS, $ATTR) or die
$DBI::errstr;
}
print STDERR "DBH After Connect: ", $dbh || 'undef', "\n";
} # _connect()

So what happens is that dbi_prepare calls _connect() before it does
anything else. Then the $dbh can be expected to persist beyond the call
to _connect() because it's a package-level lexical. And indeed, it does
persist in dbi_prepare, where it is used to prepare the SQL statement.
dbi_selectcol_arraryref() looks like this:

sub dbi_selectcol_arrayref {
my ($qry, @params) = @_;
print STDERR "DBH Before connect: ", $dbh || 'undef', "\n";
_connect();
print STDERR "DBH After selectcol_arrayref connect: ", $dbh ||
'undef', "\n";
$qry = dbi_prepare($qry) if ref $qry ne 'DBI::st';
return $dbh->selectcol_arrayref($qry, undef, @params);
} # dbi_selectcol_arrayref()

Simple, eh? Yet the print statments (which I collected form the Apache
Error Log) clearly show that $dbh has no value when we enter
dbi_selectcol_arrayref(), but the first thing dbi_selectcol_arrayref()
does is call _connnect(), where it *does* still have a value! Returning
to dbi_selectcol_arrayref(), the value is missing again.

I'll keep working on trynig to create a simpler script that others can
try on their systems.

Thanks,

David



Re: Modperl in E-Business apps

2000-08-31 Thread Perrin Harkins

On Thu, 31 Aug 2000, Ken Kosierowski wrote:
> The subject of this message might be better worded as "Is mod_perl
> ready for E-Business apps, and is anyone using it for such?".

Yes.  Many businesses run their primary web applications on mod_perl.  
Take a look at the sites and success stories on http://perl.apache.org/,
and maybe the ones on http://masonhq.com/ too.  Also, we run
http://etoys.com/ on mod_perl.

- Perrin




Apache.xs patch for get_client_block

2000-08-31 Thread joe

The mod_perl implementation of get_client_block has a memory leak.
The following patch should keep it from from pissing in r->pool.

diff -u /var/lib/cpan/build/mod_perl-1.24/src/modules/perl/Apache.xs 
/usr/src/mod_perl-1.24/src/modules/perl/Apache.xs 

--- /var/lib/cpan/build/mod_perl-1.24/src/modules/perl/Apache.xsFri Apr 
21 02:13:42 2000
+++ /usr/src/mod_perl-1.24/src/modules/perl/Apache.xs   Sat Jul 15 18:27:58 2000
@@ -59,7 +59,7 @@
 #define CORE_PRIVATE
 #include "mod_perl.h"
 #include "mod_perl_xs.h"
-
+#define BUFSIZE 8192
 
 #ifdef USE_SFIO
 #undef send_fd_length
@@ -994,10 +994,11 @@
 
 PREINIT:
 long nrd = 0;
+char buf[BUFSIZE];
 
 PPCODE:
-buffer = (char*)palloc(r->pool, bufsiz);
-nrd = get_client_block(r, buffer, bufsiz);
+buffer = buf;
+nrd = get_client_block(r, buffer, (bufsiz < BUFSIZE) ? bufsiz : BUFSIZE);
 if ( nrd > 0 ) {
XPUSHs(sv_2mortal(newSViv((long)nrd)));
sv_setpvn((SV*)ST(1), buffer, nrd);


 
Joe Schaefer
[EMAIL PROTECTED]

SunStar Systems, Inc.





Re: Dissappearing Lexicals

2000-08-31 Thread David E. Wheeler

Matt Sergeant wrote:
> 
> On Wed, 30 Aug 2000, mgraham wrote:
> [snip]
> > Personally, I've given up on package-scoped lexicals entirely, and
> > moved everything into "use vars".  It's a pain, because you lose the
> > encapsulation and you have to declare and assign the variables
> > separately.  But it generally seems much more robust and predictable.
> 
> This is a real worry for anyone using the Tie::SecureHash sort of thing to
> hide access to private variables.

Okay, I'll try to whip up a quick example today of this issue and submit
it to the list. It seems worthwhile to me to try to get this bug(?)
squashed for the reason Matt brings up and others.

David



Intermittent Segfaults

2000-08-31 Thread Mark Hughes

As this is probably more related to mod_perl than mason specific i've
moved the thread to this list. I'll try and narrow the problem code down
further tomorrow, but maybe someone has some insight ?

 - BTW mod_perl is not built as a dso

Cheers.


> Hi,
> 
> Our sites experience intermittent segfaults (Segmentation Fault (11))
> when serving mason generated pages, these seem to be completely random
> in
> frequency and called component (though components do share common module
> code), and occur infrequently, every few thousand requests or so.
> 
> The servers are very busy, though load and memory usage are light.
> 
> Setup Details:
> 
> Mason 0.87 (Just tried 0.88, same intermittent problem)
> Perl 5.005_03
> mod_perl 1.24
> Apache 1.3.12
> Linux 2.2.16
> 
> I've tried mason using Apache::Request and CGI.pm to handle %ARGS - same
> problem.
> 
> Backtrace, obtained according to mod_perl SUPPORT file
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x80ed2b2 in Perl_pp_entersub ()
> 
> #0  0x80ed2b2 in Perl_pp_entersub ()
> #1  0x80bf38c in perl_call_sv ()
> #2  0x80e13cc in Perl_croak ()
> #3  0x80ee02a in Perl_sv_upgrade ()
> #4  0x80c1d82 in Perl_gv_init ()
> #5  0x80c2e19 in Perl_gv_fetchpv ()
> #6  0x8087f1e in XS_Apache_finfo ()
> #7  0x80ecfb6 in Perl_pp_entersub ()
> #8  0x8116f5d in Perl_runops_standard ()
> #9  0x80bf3a1 in perl_call_sv ()
> #10 0x807c1cb in perl_call_handler ()
> #11 0x807b9db in perl_run_stacked_handlers ()
> #12 0x8079f5d in perl_handler ()
> #13 0x80950e3 in ap_invoke_handler ()
> #14 0x80a85b9 in ap_some_auth_required ()
> #15 0x80a861c in ap_process_request ()
> #16 0x809ff0e in ap_child_terminate ()
> #17 0x80a009c in ap_child_terminate ()
> #18 0x80a01f9 in ap_child_terminate ()
> #19 0x80a0826 in ap_child_terminate ()
> #20 0x80a0fb3 in main ()
> #21 0x400941eb in __libc_start_main (main=0x80a0c6c , argc=6,
> argv=0xbc94, init=0x8060090 <_init>, fini=0x811703c <_fini>,
> rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbc8c)
> at ../sysdeps/generic/libc-start.c:90
> 
> Any clues on how I can further debug this problem to try and get to the
> bottom
> of it. Is this a question better asked on the mod_perl list?
> 
> BTW - I'm not using PerlFreshRestart
> 
> Cheers,
> Mark
> 

Replying to my own email - here's a backtrace with more debug info

Program received signal SIGSEGV, Segmentation fault.
0x80ed2b2 in Perl_pp_entersub ()
(gdb) bt
#0  0x80ed2b2 in Perl_pp_entersub ()
#1  0x8116f5d in Perl_runops_standard ()
#2  0x80bf3a1 in perl_call_sv ()
#3  0x807c1cb in perl_call_handler (sv=0x81e6cd8, r=0x861ac5c, args=0x0)
at mod_perl.c:1643
#4  0x807b9db in perl_run_stacked_handlers (hook=0x811c819
"PerlHandler",
r=0x861ac5c, handlers=0x81e6cc0) at mod_perl.c:1362
#5  0x8079f5d in perl_handler (r=0x861ac5c) at mod_perl.c:905
#6  0x80950e3 in ap_invoke_handler (r=0x861ac5c) at http_config.c:508
#7  0x80a85b9 in process_request_internal (r=0x861ac5c) at
http_request.c:1215
#8  0x80a861c in ap_process_request (r=0x861ac5c) at http_request.c:1231
#9  0x809ff0e in child_main (child_num_arg=0) at http_main.c:4177
#10 0x80a009c in make_child (s=0x814de0c, slot=0, now=967737451)
at http_main.c:4281
#11 0x80a01f9 in startup_children (number_to_start=3) at
http_main.c:4363
#12 0x80a0826 in standalone_main (argc=6, argv=0xbc64) at
http_main.c:4651
#13 0x80a0fb3 in main (argc=6, argv=0xbc64) at http_main.c:4978



Re: Build problems on Solaris

2000-08-31 Thread Carlos Ramirez


I have Apache_1.3.12/mod_perl1.2.1 running on Solaris 5.5.1 with no probs..
You might want to try other things?? Check that your system is up-to-date
with patches?
-Carlos
Doug MacEachern wrote:
On Thu, 10 Aug 2000, Paul Breslaw wrote:
>
> I cannot get mod_perl to pass 'make test' on Solaris (5.5.1). I've
tried
> different versions of mod_perl (1.18, 1.21_03 and 1.24) and different
> versions of Apache (1.3.4, 1.3.12) all against the same version of
> perl 5.004_04 (gcc). I used the INSTALL.simple build, most of the
time,
> but also examples from INSTALL.apaci, eg
>
>   perl Makefile.PL EVERYTHING=1 APACHE_HEADER_INSTALL=0
PERL_TRACE=1
>
> Whatever combination I use, I get output something like that listed
below.
> Bad free() ignored at /usr/local/lib/perl5/Exporter.pm line 232.
if you haven't tried already, a newer version of Perl might help, a
number
of Perl malloc() bugs have been fixed since 5.004_04

-- 
---
 Carlos Ramirez  +  Boeing  +  Reusable Space Systems  +  714.372.4181
---
 


Apache::Sandwich

2000-08-31 Thread Christian Holz

Hi there!

I've recently installed mod_perl and the Apache::Sandwich module using
Apache1.3.12 running under FreeBSD 3.4

mod_perl installation was just fine.

the Apache::Sandwich installation looked pretty good as well, make test
returned an ok, but after embedding the lines

PerlModule Apache::Sandwich
PerlModule Apache::Include


  SetHandler  perl-script
  PerlHandler Apache::Sandwich
 


   PerlSetVar HEADER "/usr/home/www/test.domain.com/banner.add"


to the httpd.conf

Apache error log said

[Tue Aug  8 20:26:44 2000] [error] Can't locate
auto/Apache/Sandwich/handler.al in @INC (@INC contains:
/usr/libdata/perl/5.00502/mach /usr/libdata/perl/5.00502
/usr/local/lib/perl5/site_perl/5.005/i386 freebsd
/usr/local/lib/perl5/site_perl/5.005 . /usr/local/apache/
/usr/local/apache/lib/perl) at /usr/libdata/perl/5.00502/Carp.pm line 0

I mailed Vivik Khera, author of the Apache::Sandwich module. He advised me
to type

perl -MApache::Sandwich -e 1

to the shell, the command prompt returned without any messages. He also
checked the files in the install directory, saying the were ok.

Well, I'm a newbie to mod_perl and don't know much about perl.

Are there any files missing, and if yes where can i look for them (the error
msg doesn't help me much)??? Or have i got another idea where to look???

Thx!

Chris







statically linked Perl

2000-08-31 Thread Todd Caine

Hi, folks.

I'm having a problem building a statically linked perl (yes,
I know, but I
need it for XS debugging).  MakeMaker is trying to link the
static binary
with libapreq.a, which is okay, but libapreq.a doesn't
export a bootstrap
symbol boot_libapreq().  The perlmain.c generated by by
Makefile.aperl
contains a call to the boot_libapreq() function.

I assume this is because libapreq.a is found in the
5.6.0/auto directory.
A quick check shows this is the only .a file in that
directory.  libapreq
appears to be related to Apache and/or mod_perl (APache
REQuest).

I can build the static perl successfully if I manually
delete the call in
perlmain.c to boot_libapreq().  However, it's inconvenient
and clearly
bogus to have to do this every time.

Any ideas?

rat@sandbox ~/work/lib/vended/SNMP 913% make perl
make -f Makefile.aperl perl
Writing perlmain.c
cd . && gcc -c
-I/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE \
-DDEBUGGING -O -DVERSION=\"3.1.0_eli_bulkwalk\" \
-DXS_VERSION=\"3.1.0_eli_bulkwalk\" \
-I/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE
perlmain.c
make[1]: Entering directory
`/home/rat/work/lib/vended/SNMP'
gcc -L/usr/local/lib -L/usr/lib -L/usr/ccs/lib  -o perl
-O ./perlmain.o
-R/usr/local/lib -R/usr/lib blib/arch/auto/SNMP/SNMP.a

/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/libapreq/libapreq.a


/usr/local/lib/perl5/5.6.0/sun4-solaris/auto/DynaLoader/DynaLoader.a

/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE/libperl.a
`cat
blib/arch/auto/SNMP/extralibs.all` -lsfio -lsocket -lnsl
-ldl -lm -lc
-lcrypt -lsec
Undefined   first referenced
 symbol in file
boot_libapreq   ./perlmain.o
ld: fatal: Symbol referencing errors. No output written
to perl
collect2: ld returned 1 exit status
make[1]: *** [perl] Error 1
make[1]: Leaving directory
`/home/rat/work/lib/vended/SNMP'
make: *** [perl] Error 2

rat@sandbox ~/work/lib/vended/SNMP 919% find
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/
-name '*.a' -print

/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/libapreq/libapreq.a








Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread martin langhoff

Jim Winstead wrote:
> plan c: use a wildcard record and move on to real problems. :)

Bummer! I had thought I actually had a real problem ... 

gotta move on to find one !


martin [who can't believe this list's so great]



Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread David Hodgkinson


Jim Winstead <[EMAIL PROTECTED]> writes:

> On Aug 31, David Hodgkinson wrote:
> > martin langhoff <[EMAIL PROTECTED]> writes:
> > 
> > >   Is it possible to tell BIND to catch *.domain.com and answer the same
> > > ip? 
> > 
> > Plan A: Generate the zone files from the database.
> > 
> > Plan B: Use the beta of Bind 9 which, I believe, has database bindings
> > promised.
> 
> plan c: use a wildcard record and move on to real problems. :)

That too :-)

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread Jim Winstead

On Aug 31, David Hodgkinson wrote:
> martin langhoff <[EMAIL PROTECTED]> writes:
> 
> > Is it possible to tell BIND to catch *.domain.com and answer the same
> > ip? 
> 
> Plan A: Generate the zone files from the database.
> 
> Plan B: Use the beta of Bind 9 which, I believe, has database bindings
> promised.

plan c: use a wildcard record and move on to real problems. :)

jim



Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread David Hodgkinson


martin langhoff <[EMAIL PROTECTED]> writes:

>   Is it possible to tell BIND to catch *.domain.com and answer the same
> ip? 

Plan A: Generate the zone files from the database.

Plan B: Use the beta of Bind 9 which, I believe, has database bindings
promised.

I've hacked around with something like plan A recently. Got to the
first 90% stage and lost interest ;-)

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: [OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread Matt Sergeant

On Thu, 31 Aug 2000, martin langhoff wrote:

> 
> the mod_perl related background:
> 
>   I was recently asked if one of the domains we were hosting could have
> its users folders mapped in the domain name. Something like
> folder.domain.com, instead of domain.com/folder . My silly mind tumbled
> around, mumbling at which apache request I was going to catch the domain
> and turn it into a subrequest, and I mumbled 'yes, of course'. 
> 
> the catch:
> 
>   As you may have imagined, it maybe trivial to do in Apache (I haven't
> done it yet, but I hope it is). What is not trivial is to trick BIND
> into saying it knows as many domains as folders I want. Or is it?
> 
> the question:
> 
>   Is it possible to tell BIND to catch *.domain.com and answer the same
> ip? 

Yes, I believe the entry is simply *.domain.com!

Then use mod_rewrite to map the right folder.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: Apache::DBI Wisdom Sought

2000-08-31 Thread Chris Winters

* Mark D Wolinski ([EMAIL PROTECTED]) [000831 11:24]:
> Hi all,
> 
> You'll pardon me a little, I hope for this message does tend to lap over out
> of ModPerl, but if it'll make you feel at ease,  I shall only expect wisdom
> on the modperl side.
> 
> I run a service of free message boards where users can create their own
> message boards.  Currently and in the past, I have used BerkeleyDB to store
> everything.
> 
> I have decided to move towards mySQL and run under ModPerl.
> 
> My current plan is to have one DB which stores everyones settings, etc in
> tables.
> 
> Then I was going to create a database for each message board.
> 
> Under ModPerl, I was going to utilize Apache::DBI to create a persistent
> connection to the main DB.  However, how will this affect the connections
> being made to individual DBs?  I have a nagging feeling that they'll connect
> until mySQL reaches it's concurrent connection limit then stop being able to
> connect to service since it would be filled with persistent connections of
> the first 150 (or so) forums accessed.
> 
> Am I correct in my feelings on that?

You could always connect to the 'mysql' database in your connection
string, and then 'use' the database you'd like once you get the
connection back:

 my $dbh = DBI->connect( 'DBI:mysql:database=mysql', 'user', 'pass',
 { RaiseError => 1 } )
   || die $DBI::errstr;
 $dbh->do( "use $the_proper_database" );

 ... continue ...

I use this all the time, no problems. 

Chris

-- 
Chris Winters
Senior Internet Developerintes.net
[EMAIL PROTECTED]   http://www.intes.net/
Integrated hardware/software solutions to make the Internet work for you.



[OT] DNS question (slightly mod_perl related...)

2000-08-31 Thread martin langhoff


the mod_perl related background:

I was recently asked if one of the domains we were hosting could have
its users folders mapped in the domain name. Something like
folder.domain.com, instead of domain.com/folder . My silly mind tumbled
around, mumbling at which apache request I was going to catch the domain
and turn it into a subrequest, and I mumbled 'yes, of course'. 

the catch:

As you may have imagined, it maybe trivial to do in Apache (I haven't
done it yet, but I hope it is). What is not trivial is to trick BIND
into saying it knows as many domains as folders I want. Or is it?

the question:

Is it possible to tell BIND to catch *.domain.com and answer the same
ip? 

the apologies:

I know. I know. I'm way off topic. Delete my msg ... I'm not a BIND
warrior, but a mod_perl developer bound to BIND woes ... 



martin



Apache::DBI Wisdom Sought

2000-08-31 Thread Mark D Wolinski

Hi all,

You'll pardon me a little, I hope for this message does tend to lap over out
of ModPerl, but if it'll make you feel at ease,  I shall only expect wisdom
on the modperl side.

I run a service of free message boards where users can create their own
message boards.  Currently and in the past, I have used BerkeleyDB to store
everything.

I have decided to move towards mySQL and run under ModPerl.

My current plan is to have one DB which stores everyones settings, etc in
tables.

Then I was going to create a database for each message board.

Under ModPerl, I was going to utilize Apache::DBI to create a persistent
connection to the main DB.  However, how will this affect the connections
being made to individual DBs?  I have a nagging feeling that they'll connect
until mySQL reaches it's concurrent connection limit then stop being able to
connect to service since it would be filled with persistent connections of
the first 150 (or so) forums accessed.

Am I correct in my feelings on that?

Secondly, you may be asking why I don't just store the messages in a single
table in the master database.  My thoughts on that are that when a message
is posted, I create a list of the thread and write those numbers to the
messages to allow quicker retrieval when the message list looked at.  When I
do this, I write lock the DB to prevent concurrent posts from messing up the
threading of another post.  On that point, I may well be over zealously
protective and while this paragraph is so far off topic I would love your
thoughts on that issue, but would understand if shall pass it up to respond
only to the modperl portion of this message.  And I can seek council via the
mysql lists as well on this issue.

Much thanks...

Mark W




Modperl in E-Business apps

2000-08-31 Thread Ken Kosierowski


Hello All,

The subject of this message might be better worded as "Is mod_perl ready for
E-Business apps, and is anyone using it for such?".  I am asking this
question as a modperl developer to modperl developers and users.

Here is my situation:

I come from a strong billing and financial background as a
designer/architect for such systems both in software and networking
requirements, and as a systems integrator.  Previously, I was employed by an
ISP and developed their e-commerce (shopping cart stuff only).  Recently the
ISP was sold and all the software with it was scrapped.  Since then I have
developed an e-business system which mirrors the functionality of IBM's
Websphere commerce system (mostly for do-it-yourself customers) and most of
what Ariba and CommerceOne offer.  It started as a C++/VB/NT app and was
quickly moved to modperl/unix because of system reliability and performance.
Right now, the whole thing is written in perl and modperl.  It is highly OO
(75% reuse between standalone perl and modperl), using method handlers as
described in the Eagle Book (end of chapter 4), OO priciples from Damian
Conway's OO book, and all I can get from Stas's guide.  It is fast, uses
less resources than a similar NT system, and highly reliable.

And now I have a major investor (major credit bureau) who wants to integrate
it with their customers.

Before I commit to such a task as an integrator, has anyone done anything
similar.  Basically what I am look for is potential pitfalls and gotchas.
They were a little weary about the perl part in that it was not C++/NT or
EJB based, but the application proved itself.

I hooked a much bigger fish sooner than I expected and am looking for advice
(help) before I start reeling in.

Thanks so much in advance,

-Ken




Re: SIGTERM/SIGKILL at the stop/restart events (fwd)

2000-08-31 Thread Stas Bekman


It was intended to be sent to the list I guess :) oh, well...

-- Forwarded message --
Date: Thu, 31 Aug 2000 07:26:29 -0500
From: George Sanderson <[EMAIL PROTECTED]>
To: Stas Bekman <[EMAIL PROTECTED]>
Subject: Re: SIGTERM/SIGKILL at the stop/restart events

At 11:18 AM 8/31/00 +0200, you wrote:
>I'm documenting the PERL_DESTRUCT_LEVEL options, which skips the
>perl_destruct() call. At the same place I also mention that whe you
>stop/restart Apache, the parent first sends the SIGTERM (nice) kill signal
>to the children, advising them to quit.
>
>So the parent waits for a few secs and then becomes unpatient and sends
>the cruel SIGKILL saying:
>
>There is nothing you can do against the cruel sysadmin so there comes
>a last cry:
>
>and voila the processes has been killed.
>
>And one of the nice folks has pointed out that it doesn't matter whether
>you have the PERL_DESTRUCT_LEVEL option set to -1, if the processes get
>brutally killed, they will not complete their destroy/end blocks and
>therefore nasty things might happen.
>
>Anyone can comment on this possible problem? I've seen many times the
>Apache processes being killed with kill -9 (SIGKILL), but I had never had
>a significant cleanup to do. Do you?
>
>Because if there is a problem even a potential, it should be fixed or
>prevented fron happening I think.
>
>Thanks a lot!
>
I am also mystified by the whole Apache/mod_perl start/stop process.  

If someone has any good references or comments about this subject, please,
provide them.  

I have a root httpd SIGHUP issue, where an Apache mod_perl module
(Apache::Icon) fails to reread directives from the httpd.conf file.  It's
as if the module gets removed but never re- added after a SIGHUP, therefore
the root httpd process also dies (no joy:(.

I hope you don't mind my removing the theatrics form the above message (if
so, sorry).
 





Re: SIGTERM/SIGKILL at the stop/restart events

2000-08-31 Thread David Hodgkinson


Stas Bekman <[EMAIL PROTECTED]> writes:

*snip*

> P.S. If you are not familiar with the great "Jesus Christ Super
> Star" musical it's a time to watch it. The above lyrics were copied
> from: http://user.chollian.net/~asalabia/musical/jcsly.htm.

And of course, Ian Gillan is on the "original cast" recording.

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



SIGTERM/SIGKILL at the stop/restart events

2000-08-31 Thread Stas Bekman

I'm documenting the PERL_DESTRUCT_LEVEL options, which skips the
perl_destruct() call. At the same place I also mention that whe you
stop/restart Apache, the parent first sends the SIGTERM (nice) kill signal
to the children, advising them to quit. But who wants to die:

 Why I should die
 Would I be more noticed
 Than I ever was before?
 Would the things I've said and done
 Matter any more?

So the parent waits for a few secs and then becomes unpatient and sends
the cruel SIGKILL saying:

 Die if you want to
 You misguided martyr!
 I wash my hands
 Of your demolition
 Die if you want to
 You innocent puppet!

There is nothing you can do against the cruel sysadmin so there comes
a last cry:

 God forgive them
 They don't know what they're doing
 Who is my mother? 
 Where is my mother?
 My God
 My God
 Why have you forgotten me?
 I'm thirsty
 I'm thirsty
 Oh God I'm thirsty
 It is finished
 Father
 Into your hands
 I command my spirit

and voila the processes has been killed.

And one of the nice folks has pointed out that it doesn't matter whether
you have the PERL_DESTRUCT_LEVEL option set to -1, if the processes get
brutally killed, they will not complete their destroy/end blocks and
therefore nasty things might happen.

Anyone can comment on this possible problem? I've seen many times the
Apache processes being killed with kill -9 (SIGKILL), but I had never had
a significant cleanup to do. Do you?

Because if there is a problem even a potential, it should be fixed or
prevented fron happening I think.

Thanks a lot!

P.S. If you are not familiar with the great "Jesus Christ Super
Star" musical it's a time to watch it. The above lyrics were copied
from: http://user.chollian.net/~asalabia/musical/jcsly.htm.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Re: OT -- BerkeleyDB/Perl/Solaris

2000-08-31 Thread Matt Sergeant

On Wed, 30 Aug 2000, Rob Tanner wrote:

> I know this is off topic but I've gotten zero reponses off normal 
> channels nor have I heard back when I emailed the module author (and I 
> know there's at least one other person in the same predicament), so I'm 
> hoping I might get some help here.
> 
> The problem is building the perl BerkeleyDB module on Solaris.  I've 
> installed BerkeleyDB-3.1.14 from Sleepycat.  It comes with a huge 
> battery of tests, and some 14 hours later, they finished and the 
> BerkeleyDB build passed with zero errors.
> 
> Now comes the perl module BerkeleyDB-0.12.  It build without complaint, 
> but can't get to first base in 'make test'.  I have included the full 
> set of results below.

I heard on IRC the other day that BDB still isn't 100% happy on perl 5.6

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org