Instalation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rony
Forum Newbie
Posts: 3
Joined: Tue Jan 21, 2003 9:16 pm
Location: Mex

Instalation

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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://....) ;)
Post Reply