php/apache install

basher584 basher584@usol.com
Sun, 26 Aug 2001 13:18:24 -0400


Matt Fuerst wrote:
> Greetings all,
> 
> I got the compile to work so I thought I would share with the class what I
> did.. and of course things still aren't working as well as I would hope.. so
> I was hoping for someone else maybe to pitch in.
> 
> To fix the compilation error, I went into the apache-src/src directory and
> edited the Makefile. In there there was a line that started with "LIBS1="
> with a whole bunch of directives. I added -lz to the end of them, and the
> compile happened magically! I did the few additional configures, makes, and
> make installs and I had a libphp4.so module! Yippie!
> 
> I edited the conf/httpd.conf to make sure that it was loading both
> libphp4.so and my already compiled libssl.so as modules, and added the
> handler for the type... those look something like this in my httpd.conf:
> 
> -------------BEGIN HTTPD.CONF SNIPPET-----------------------------
> <IfDefine SSL>
> LoadModule ssl_module         libexec/libssl.so
> </IfDefine>
> LoadModule php4_module        libexec/libphp4.so
> 
> #  Reconstruction of the complete module list from all available modules
> #  (static and shared ones) to achieve correct module execution order.
> #  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
> ClearModuleList
> AddModule mod_env.c
> AddModule mod_log_config.c
> AddModule mod_mime.c
> AddModule mod_negotiation.c
> AddModule mod_status.c
> AddModule mod_include.c
> AddModule mod_autoindex.c
> AddModule mod_dir.c
> AddModule mod_cgi.c
> AddModule mod_asis.c
> AddModule mod_imap.c
> AddModule mod_actions.c
> AddModule mod_userdir.c
> AddModule mod_alias.c
> AddModule mod_access.c
> AddModule mod_auth.c
> AddModule mod_so.c
> AddModule mod_setenvif.c
> <IfDefine SSL>
> AddModule mod_ssl.c
> </IfDefine>
> AddModule mod_php4.c
> -------------END HTTPD.CONF SNIPPET-----------------------------
> 
> Additionally below I have got some AddType commands going to the effect of:
> 
> -------------BEGIN HTTPD.CONF SNIPPET-----------------------------
> 
> # And for PHP 4.x, use:
> #
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> 
> #
> # To use server-parsed HTML files
> #
> AddType text/html .shtml
> AddHandler server-parsed .shtml
> 
> -------------END HTTPD.CONF SNIPPET-----------------------------
> 
> There are a few others active, but the ones I am most interested in are .php
> and .shtml files. I cannot get either to work correctly. I had an already
> existing pagea located in my htdocs directory and now the Server Side
> Includes (.shtml) files don't work at all. When I load up my front page
> index.shtml I get a blank page, when I view the source I see all of my
> 
> <!--#include virtual="/header.html"-->
> <!--#include virtual="/navbar.html" -->
> <!--#include virtual="/footer.html"-->
> 
> Additionally, I made a test.php on my server. Essentially it just contains
> the command:
> 
> <?phpinfo()?> (I tried it this way and with a colon after the (), neither
> works.)
> 
> I checked my error_log, and apache is starting up fine. I don't understand
> how apache is starting supposedly with SSI (mod_include is compiled in
> statically) and PHP (which is a DSO) working and I'm getting nothing.
> Arrgghhh!
> 
> Flat HTML files serve up fine, as do .txt files.
> 
> Any help? Experiences?
> 
> Thanks so much for any ideas!
> 
> Matt
> 

Check to see if you have an .htaccess file that is redefining your AddType, 
AddHandler directives.

Had a customer once that had "AddHandler server-parsed .php" in their .htaccess 
baffeled me for a good 15 minutes before I figured out they had an .htaccess 
file that redefined it..

(Also its a semicolon not a colon.. so <? phpinfo(); ?> )

-Ben