On Jul 20, 2000 at 11:16:47 +0300, Alex Shnitman twiddled the keys to say:
> On Wed, Jul 19, 2000 at 10:24:24PM -0400, Rick Myers wrote:
> 
> > After fooling with this for several hours I've finally come to the
> > conclusion that this is probably an Apache "problem".
> > 
> > [...]
> > 
> > *whew*
> 
> Wow, MAN! Thank you SO much! It indeed worked!
> 
> A couple of questions remain -- why is the config file parsed twice?

Honestly, I don't know. I could throw out a couple theories here, but
they would be mostly guesswork. In fact, I didn't know myself that there
was a double parse at initial startup. I was aware of that sort of thing
on restarts though.

> Also, what about this observation:
> 
> > > > > Another interesting thing about this issue: if I assign
> > > > > $port{$portname} + 1 to $Port, and not just $port{$portname}, it
> > > > > works! If I ever try to return $Port to the needed value, e.g. using
> > > > > the -- operator, it doesn't work again. This completely stumps me. I
> > > > > tried just about any trick you can think of to get the value from
> > > > > $port{$portname} to $Port, but I can't -- if I add to it or substract
> > > > > from it, it's fine, but if it somehow gets back to the original value,
> > > > > in any way, it doesn't work again.

I went down that path myself since you'd already suggested it. What I
ended up with was indeed a working server, but not on the port you'd
think. For instance, if the desired port was 1885 and I added one to it,
I should've been able to connect to 1886. Instead, what I really had was
a server listening on port 1. When I tried adding 4 to the port I ended
up with a server listening on port 4.

What was really going on was that the second time through the <Perl>
section, POSIX::getcwd was returning `/'. After s!.*/!! you end up with
`', which when used to index into %port returns undef. Now, if you add 1
to that the result is 1, so the server starts and listens on port 1. If
you don't add anything, undef is passed on to Apache, which I guess
assumes you really meant the standard 80. Of course, that promptly barfs
because there's already another server listening there.

Rick Myers                            [EMAIL PROTECTED]
----------------------------------------------------
The Feynman Problem       1) Write down the problem.
Solving Algorithm         2) Think real hard.
                          3) Write down the answer.

Reply via email to