Re: Detecting graceful restart -> wacky $$

2003-07-01 Thread Bruno Connelly
  Javier> Now I'm having a different problem. In my restart handler I
  Javier> print out the PID using a simple 'warn "pid = $$\n". I was
  Javier> expecting it would print out the PID of the parent
  Javier> (listener) Apache process
  [...]

Sounds like you want getppid() instead.

b.
--
/*  Bruno Connelly, <[EMAIL PROTECTED]>  */



Re: Segfaults when using XML::Parser

2002-10-14 Thread Bruno Connelly

  David>If you have some of the processes segfault when using
  David>XML::Parser you should use

  David>--disable-rule=EXPAT

  David>during the Apache configuration step. 
  David> 
  David>Starting from mod_perl version 1.23 this option is
  David>disabled by default.

  David> It is unclear to me where this disable-rule is specified.

In the configure line for Apache, like so:

  ./configure --disable-rule=EXPAT \
  --activate-module=src/modules/perl/libperl.a

  David> I would assume in apache, but then it makes a statement that
  David> the option has been disabled by default for mod_perl 1.23+.
  David> That seems to imply the option is in mod_perl?

That's assuming you have the mod_perl distribution build Apache for
you, not if you're doing it the other way around.

  David> Can someone please give me specific information about how I
  David> would go about using this disable-rule to fix the
  David> afformentioned problem.

The above should help.

  David> Can someone also give me some information on why this is
  David> needed to fix the problem...what is the root cause of this
  David> problem?  I have only ran into this problem on my fully
  David> updated RedHat 7.3 box (apache 1.3.23 & mod_perl 1.26), not
  David> my RH 6.2 (apache 1.3.12 & mod_perl 1.24) boxes.  Please
  David> advise.

XML::Parser doesn't hide it's symbols properly and hence they collide
with the expat-lite that's in Apache by default.  I can't believe this
hasn't been fixed by now.

Nonetheless, this subject has been covered over and over on the list.
If you look in the archives you'll most certainly find more details.

b.
--
/*  Bruno Connelly, <[EMAIL PROTECTED]>  */




Re: Restarting named service

2002-04-18 Thread Bruno Connelly

  Abd> How can i restart the named service via mod_perl.
  Abd> The script will be activated via a web page.

  Abd> My apache is configured to use "User: apache, Group: apache"

  Abd> Is ther any other way except usine "User root" directive in my
  Abd> httpd.conf file

Assuming you're running a somewhat modern version of BIND and you make
the ndc domain socket read/writable via the user/group Apache is
running as, you should be able to restart the daemon without root
privs.

Not that you still shouldn't be weary of doing something like that,
though.

b.
--
/*  Bruno Connelly, <[EMAIL PROTECTED]>  */




Re: loading mod_perl DSO on a per-virtualhost basis?

2000-01-26 Thread Bruno Connelly

  Bruno> You could always run separate Apache instances per vhost.  :-)

  Thomas> From the added ":-)", I derive that this may not be common
  Thomas> practice :)

It's not uncommon, I'm just making the assumption that if you're
worried about resource consumption, this might not your desired
solution.  However, I don't know your setup.  If you'll only be
splitting vhosts between a mod_perl enabled Apache instance and one
that's not, it might not be too bad.  ...assuming the management of
that wouldn't be too much of a headache.

  Thomas> However, if I'd like to do so, I'd have to split up my
  Thomas> httpd.conf into a part with mod_perl-using-vhosts and a part
  Thomas> with the remaining vhosts and setup 2 startup scripts for 2
  Thomas> separate apache instances, both listening on port 80 (or 443
  Thomas> for https).

Yup, it's pretty straight forward.  Given you won't want to bind() to
every interface plumbed on the machine, you'll probably want to put in
a Listen directive per vhost.  Unless you're doing name based
vhost'ing, but you'll still want a single Listen directive per
instance.

  Thomas> Has anyone ever tried such a setup or used it for a longer
  Thomas> period in a production setup?

It should work fine, just keep in mind the extra resources required
for multiple instances (especially with pre-forking).  But again,
splitting one instance into two shouldn't be too nasty.

--bruno


 Bruno Connelly   <[EMAIL PROTECTED]>
 Interweb Ninjaneer   Whack Productions




Re: loading mod_perl DSO on a per-virtualhost basis?

2000-01-26 Thread Bruno Connelly

  Thomas> I'd like to configure my apache installation (which contains
  Thomas> several virtualhosts) to use mod_perl (compiled as DSO) only
  Thomas> with _some_ of the virtualhosts, but not all of them.

Apache fork()s children to handle requests, hence they are all exact
copies of the parent process.  Unfortunately, there isn't really a way
to do what you want.

  Thomas> That is, I'd like to put a LoadModule directive into those
  Thomas>  sections which use mod_perl and leave it out
  Thomas> in the other virtualhosts. The benefit (so I hoped) would be
  Thomas> a "small" httpd for the non-mod_perl-virtualhosts and a
  Thomas> bigger one for the others.

A single httpd process could handle requests for many different
vhosts.

You could always run separate Apache instances per vhost.  :-)

--bruno
____

 Bruno Connelly   <[EMAIL PROTECTED]>
 Interweb Ninjaneer   Whack Productions




Re: make test

2000-01-24 Thread Bruno Connelly

  Ilan> When I am connected to the net(inetrnet) everything continue
  Ilan> to work fine.

  Ilan> However, when I am offline,  make test fails.
  Ilan> It complains about:

  Ilan> still waiting for server to warm upnot ok
  Ilan> server failed to start!

Perhaps this is because the interface it's trying to bind() to isn't
plumbed yet?

--bruno
________

 Bruno Connelly   <[EMAIL PROTECTED]>
 Interweb Ninjaneer   Whack Productions