Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2001 13:02:54 -0500
From:      "John Straiton" <jsmailing@clickcom.com>
To:        "'Drew Tomlinson'" <drew@mykitchentable.net>
Cc:        <freebsd-questions@freebsd.org>
Subject:   RE: Apache Upgrade With Mod_PHP
Message-ID:  <003401c17db7$112fb170$4116c60a@win2k.clickcom.com>
In-Reply-To: <00df01c17db3$49a1e810$962a6ba5@lc.ca.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
> There doesn't seem to be any 
> man pages or docs
http://www.php.net or http://us.php.net in the States.


> How do I get apache to run /usr/local/bin/php webpage.php (I 
> assume this is what must happen) to create the html and serve 
> it?  I guess I'm not understanding the whole concept here.

Apache should run the php processor automatically on any file it finds
that has the extensions you specify (or the port installed for you).
Examples would be .php and .php3 and .phps

Assuming you used the mod_php4 port, look in your
/usr/local/etc/apache/httpd.conf for the following directives:

LoadModule php4_module	libexec/apache/libphp4.so	
AddModule mod_php4.c
AddType application/x-httpd-php	.php

There's a possibility that the AddType declaration would be in all your
VirtualHost directives that you want php enabled for.

You'll probably want to add index.php to your list of files in the
"DirectoryIndex" directive as well, if it's not there.

Once everything is in there, "apachectl restart" should do an adequate
job of enabling the changed.

The php should fire up when a .php page is requested.

Unless I'm mistaken, using the mod_php will allow you to repatch your
httpd binary for future versions of frontpage without requiring you
rebuild php along with them, since they get loaded on startup instead of
being built into the binary. I use mod_frontpage with mod_php4 without
problems.

John


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003401c17db7$112fb170$4116c60a>