From owner-freebsd-questions@FreeBSD.ORG Sun Feb 22 00:40:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25C6B16A4D2 for ; Sun, 22 Feb 2004 00:40:22 -0800 (PST) Received: from smtp01.wxs.nl (smtp01.wxs.nl [195.121.6.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4933743D45 for ; Sun, 22 Feb 2004 00:40:19 -0800 (PST) (envelope-from freebsd@akruijff.dds.nl) Received: from kruij557.speed.planet.nl (ipd50a97ba.speed.planet.nl [213.10.151.186]) by smtp01.wxs.nl (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HTH00C5P9F3RX@smtp01.wxs.nl> for freebsd-questions@freebsd.org; Sun, 22 Feb 2004 09:40:16 +0100 (MET) Received: from alex.lan (localhost [127.0.0.1]) by kruij557.speed.planet.nl (8.12.10/8.12.10) with ESMTP id i1M8dfHd003909; Sun, 22 Feb 2004 09:39:41 +0100 Received: (from akruijff@localhost) by alex.lan (8.12.10/8.12.10/Submit) id i1M8deEs003908; Sun, 22 Feb 2004 09:39:40 +0100 Content-return: prohibited Date: Sun, 22 Feb 2004 09:39:40 +0100 From: Alex de Kruijff In-reply-to: To: "Pratt, Benjamin E." Message-id: <20040222083940.GA892@alex.lan> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4.2.1i References: X-Authentication-warning: alex.lan: akruijff set sender to freebsd@akruijff.dds.nl using -f cc: freebsd-questions@freebsd.org Subject: Re: Apache FreeBSD not executing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 08:40:22 -0000 On Sat, Feb 21, 2004 at 07:02:04PM -0600, Pratt, Benjamin E. wrote: > Hello - > > I'm trying to get my Apache web server up and running with PHP support but am running into problems. When I try to go to a .php web page I'm prompted to save the page instead of having the browser show the page. > > I've installed both /usr/ports/www/apache21/ and /usr/ports/www/mod_php5/ and in my httpd.conf file I've got the lines: > > LoadModule php5_module libexec/apache2/libphp5.so > DirectoryIndex index.html index.html.var index.php > AddType application/x-http-php .php > > I've had this running before but not since I formatted my system, installed FreeBSD 5.1 and then synced my source tree and upgraded the system. I am now running FreeBSD 5.2.1-RC2 #2 from Sat Feb 21 13:55:19 CST 2004. > > I've also tried installing /usr/ports/lang/php5/ and /usr/ports/lang/php4/ and had the same issues. > > Thanks for any help, I run Apache2 with php5 on a FreeBSD 4 box and that works. In order for PHP to work you need to set WITH_APACHE2 in the envorement. For csh shell its: setenv WITH_APACHE2 yes I have these for lines: LoadModule php5_module libexec/apache2/libphp5.so DirectoryIndex index.php index.html index.html.var AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps -- Alex Articles based on solutions that I use: http://www.kruijff.org/alex/index.php?dir=docs/FreeBSD/