My httpd.conf had some of the lines, but not all of them -- mine was missing the LoadModule and AddModule lines for php. I'm not sure why -- I don't delete any of those; I just comment them out if I'm not using them. Plus, the note above put a space in "LoadModule"; it has no space. I didn't know about the "apachectl graceful" trick, though -- since "httpd -k restart" stopped working (probably around 10.2), I had just been doing it manually -- find the process, kill it, and hit httpd again -- thanks for the tip!

So for those who are missing any of the lines, here are the full lines.

In the section with all the other LoadModules: LoadModule php4_module libexec/httpd/libphp4.so</div>

Directly below that section should be the AddModules; you need: AddModule mod_php4.c

And then the AddType lines should be right after the language priorities (so after the AddCharset lines and after the LanguagePriority bit): AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps

Then restart apache/httpd as described above, and hopefully you should be good.

BTW, the actual module should be at:/usr/libexec/httpd/libphp4.soSo if things fail, you can check to see if that's there.

Thanks to others who posted here; it definitely helped and got me on the right track. I just had to find the module manually to write my own LoadModule line.

To build on MacOS X 10.3.5 set the environment variable CFLAGS in the following way (depending on your shell)

setenv CFLAGS "-DBIND_8_COMPAT=1 -DEAPI -O3"

export CFLAGS="-DBIND_8_COMPAT=1 -DEAPI -O3"

Then launch configure with the options:

./configure --prefix=/usr --mandir=/usr/share/man ....

The -DBIND_8_COMPAT=1 gets you over a problem in the DNS files because MacOS X has definitions for Bind9 and PHP expects Bind8 definitions. -DEAPI is needed if you build it for Apache 1.3.31. -O3 enables the gcc optimizer.

You can also add one of the following lines to your CFLAGS depending on the CPU you use to further improve speed:-mcpu=G3 -mtune=G3-mcpu=G4 -mtune=G4-mcpu=G5 -mtune=G5