Page 1 of 1

Instalation

Posted: Tue Jan 21, 2003 9:16 pm
by Rony
I installed php like a module but when I want to run my web page with the php extension, the browser send me a window with the messege: "open with.."

I already checked the extension in apache, but I don't found any problem. Thanks for your help.

Posted: Tue Jan 21, 2003 11:07 pm
by volka
usually there have to be three directives to enable php as apache-module.
  • (if not apache2)
  • LoadModule php4_module <path>/php4apache.dll
  • AddModule mod_php4.c
  • AddType application/x-httpd-php .php
read carefully the install.txt of the php-distribution and also the appropriate sections of http://www.php.net/manual/en/installation.php

You might also want to enable server-info
The directives are already in httpd.conf but you have to uncomment them
  • LoadModule info_module modules/mod_info.so
  • AddModule mod_info.c
  • Code: Select all

    <Location /server-info>
        SetHandler server-info
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
restart apache, http://127.0.0.1/server-info then should bring up an info page with something like

Code: Select all

Module Name: mod_php4.c
Content handlers: application/x-httpd-php , application/x-httpd-php-source , text/html
Configuration Phase Participation: Create Directory Config, Merge Directory Configs, Child Exit
in it

...and of course you have to request the php-page through your webserver (http://....) ;)