From owner-freebsd-questions@FreeBSD.ORG Wed Jun 20 15:33:42 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B87A16A468 for ; Wed, 20 Jun 2007 15:33:42 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by mx1.freebsd.org (Postfix) with ESMTP id C412513C447 for ; Wed, 20 Jun 2007 15:33:41 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.8/8.13.8) with ESMTP id l5KFXd8X002987; Wed, 20 Jun 2007 11:33:39 -0400 (EDT) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.13.8/8.13.8/Submit) with ESMTP id l5KFXdBP002984; Wed, 20 Jun 2007 11:33:39 -0400 (EDT) (envelope-from doug@fledge.watson.org) Date: Wed, 20 Jun 2007 11:33:39 -0400 (EDT) From: doug To: Jack Barnett In-Reply-To: <467763C3.306@gmail.com> Message-ID: <20070620112448.G5906@fledge.watson.org> References: <467763C3.306@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (fledge.watson.org [127.0.0.1]); Wed, 20 Jun 2007 16:33:39 +0100 (BST) Cc: freebsd-questions@freebsd.org Subject: Re: Apache, php? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: doug@safeport.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 15:33:42 -0000 On Tue, 19 Jun 2007, Jack Barnett wrote: > FreeBSD 6.2 > Apache 1.3.37 (from ports) > php 5.2.3 (from ports) > > on the command line doing `php index.php` works. > But if I use it though a web browser it just displays the php code. > > I installed it like this (extensions to) > http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ > > The only difference is that I'm using 1.3 and not 2.x of Apache. > > Apache config below > Installing 2.x isn't an option yet (test server, still need 1.3) > > fire2# grep -i php * > httpd.conf:AddType application/x-httpd-php .php > httpd.conf:AddType application/x-httpd-php-source .phps > httpd.conf: > httpd.conf: > httpd.conf: DirectoryIndex index.php index.php3 index.html > httpd.conf: > httpd.conf: DirectoryIndex index.php3 index.html > httpd.conf: > httpd.conf: > httpd.conf: DirectoryIndex index.php index.html > httpd.conf: > httpd.conf: > httpd.conf: AddType application/x-httpd-php3 .php3 > httpd.conf: AddType application/x-httpd-php3-source .php3s > httpd.conf: > httpd.conf: AddType application/x-httpd-php .php > httpd.conf: AddType application/x-httpd-php-source .phps > httpd.conf: AddType application/x-httpd-php .php > httpd.conf: AddType application/x-httpd-php-source .phps > I just installed this combination, among the changes to httpd.conf I change pph4-->php5 (see below). You are not getting an index file. If you have 'Options +Indexes' browsing will get you an index listing but will not run index.php. # # This may also be "None", "All", or any combination of "Indexes", @@ -452,18 +454,18 @@ # - + DirectoryIndex index.php index.php3 index.html - + DirectoryIndex index.php3 index.html - + DirectoryIndex index.php index.html - + DirectoryIndex index.html