Awakenings

Mar. 24th, 2006 02:26 am
swestrup: (Default)
[personal profile] swestrup
My sleep schedule is all screwed up. I woke up a couple of hours ago. I don't feel like I've had enough sleep, but my body refused to let me sleep any more.

I *think* I'm starting to come out of this cold. The headache is diminishing in intensity and I usually feel like I can think again. On the other hand, my appetite still hasn't come back. This 'morning' I was at an all new low weight. Not really eating for a week may work as a diet plan, but I can't recommend it.

Tonight I shall (once more fully awake) endevour to diagnose why I can't get PHP 5.1.2 to work properly under Apache 2.2.  It almost works.  If I have an index.php file, I can successfully invoke PHP via:

    http://test.pooq.com/index.php

But if I try to surf to

    http://test.pooq.com

and let DirectoryIndex hand me the index.php file, it doesn't get executed, it gets downloaded. WTF. Googling so far has found nothing. Up until now my experience with PHP installation has been 'it just works', so I'm not even sure how to go about diagnosing this.
------
EDIT: It turns out that there was a consistent error throughout the default installation of Apache 2.2. The DirectoryIndex command works fine, but it isn't additive. Every single config file for a language extension - perl, php, ruby, SSI, every one would issue a command like:

  DirectoryIndex index.foo

Which would undo the previous DirectoryIndex command. The result was (because those configs were loaded in alphabetical order, after my main config) that only the last such command had any effect. Naturally it had to be something useful like

  DirectoryIndex index.xml

*headdesk* It took me a while to figure it out because Apache 2.2 is so new, and the documentation is spotty in places, and the bug was so pervasive that I figured *I* had to be wrong and they had made the command additive. They haven't.

I have a feeling that by 2.2.1 they'll have added +index.foo and -index.bar options so these attempts might actually work.

Of course, fixing THAT hasn't solved all the configuration bugs, but maybe now I can make some progress on the problems that the fix revealed.

Date: 2006-03-25 05:59 am (UTC)
From: [identity profile] pphaneuf.livejournal.com
Heh, it's always been like that (how the DirectoryIndex directive works), at least back into the 1.3 serie, and I suspect well into the 1.2 as well.

Date: 2006-03-25 05:19 pm (UTC)
From: [identity profile] pphaneuf.livejournal.com
I suspect they had a fit of modularity (as in, using <IfModule>, or whatever it's called). But DirectoryIndex doesn't suit itself to modularity at all. I have to admit that while it makes it annoying for the default configuration to make sense, I'd probably murder someone if it was cumulative (trying to find the order of the directives in a complex multi-files configuration using conditional sections would be very annoying!).

But single directives like "DirectoryIndex index.xml", that's just silly, really.

Date: 2006-03-25 05:30 pm (UTC)
From: [identity profile] pphaneuf.livejournal.com
Except that the order of the indexes being looked up would be random. See, it's a list, not a set (like the Options directive), and having something that's specifically a list and not a set be in random order, that rings a bell of alarm in my head.

Particularly after having written rather involved and convoluted Apache configurations, I think that one would probably lead me to drinking (particularly if the order of the includes isn't asciibetical, but rather just in readdir order, ohh, kill me now!)...

Date: 2006-03-25 06:36 pm (UTC)
From: [identity profile] pphaneuf.livejournal.com
More coffee still required, maybe?

I have to point out that some of my personal areas of expertise are web servers and component (modular) systems. So this is kind of in a "sweet spot" for me. :-)

January 2017

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 14th, 2026 05:59 pm
Powered by Dreamwidth Studios