I feel like I'm missing something about installing/enabling modules in Apache

Discussion in 'Apache' started by stalepretzel, Apr 14, 2009.

  1. #1
    Hey All,

    I'm installing Apache 2.2 and PHP5 on my Mac (OS 10.4). I've been using Apache 1.3 and an earlier version of PHP5 on this computer before, but I'm installing these new, clean-slate style, so that I can have a better understanding of what's going on in my web server.

    I've got Apache and PHP installed now... separately. I can get PHP working in the command line, and I can get Apache serving from port 80. But, when it comes to a php file, it simply spits out the source. I need to make them work together. As far as I know, this is done with a module.

    I have a file from my old 1.3 server, libphp5.so. Is this all I need? Do I need another file, like mod_php5.c or something?

    With the fact that I'm confused about that one aspect (probably among others) in mind, can anybody explain how I can take my separate Apache 2.2 and PHP5 installations and make them work together?

    Thanks a ton!
     
    stalepretzel, Apr 14, 2009 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    there is MORE needed

    either in your apache default system config file or your htaccess lines like

    AddType application/x-httpd-php .html .htm
    AddHandler application/x-httpd-php .html .htm

    adapt the file extensions to the ones you use for your PHP content files ( may be .php )

    see for full details to original doc source

    http://httpd.apache.org/docs/2.0/mod/mod_mime.html

    as you may encounter additional similar config problems to be solved

    avoid the reuse of apache 1.3 configuration files - rather study any possible changes by looking at the proper apache 2.2 config files
     
    hans, Apr 16, 2009 IP
  3. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Lpe04, Apr 27, 2009 IP