From owner-freebsd-questions@FreeBSD.ORG Thu Jun 21 01:53:17 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 48A6D16A41F for ; Thu, 21 Jun 2007 01:53:17 +0000 (UTC) (envelope-from jackbarnett@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id E8BD913C45A for ; Thu, 21 Jun 2007 01:53:16 +0000 (UTC) (envelope-from jackbarnett@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so742623pyi for ; Wed, 20 Jun 2007 18:53:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=VlRLPEk4P+QhVcPSSJgWlnjMnAIJWDOeusPEIdInyAumbMAzshW5/jeqboytlT154SA0NUKeSNjKEm35/jHWfs4IbmQjcpWKFr/dGhGEDlcrGQTte7e5IdtpjGgVbzZxlejRyLZE+D5uAWV6SdxrgkvjFyRxQa1v61IjH1rzwqY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=YXbb7IRWm/9OEWrJX+jQo/3POdRWKUWCMG9vIzZo6Xf2mhbBUXGApdxHp15/AlHySl7/NkmLaCrncBQa/9Jm20zZC/2zrlu7DlZQrCt1WEhXsFNCjxnnEPAX0NNkh29yzzECyvzmvxeQB+CWrzZ5YJ9nMN9Wz6TUNj0/1VluDoI= Received: by 10.35.18.4 with SMTP id v4mr2192860pyi.1182390796250; Wed, 20 Jun 2007 18:53:16 -0700 (PDT) Received: from ?192.168.17.10? ( [66.41.41.11]) by mx.google.com with ESMTP id f45sm2127865pyh.2007.06.20.18.53.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Jun 2007 18:53:15 -0700 (PDT) Message-ID: <4679DA07.4060307@gmail.com> Date: Wed, 20 Jun 2007 20:53:11 -0500 From: Jack Barnett User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: doug@safeport.com References: <467763C3.306@gmail.com> <20070620112448.G5906@fledge.watson.org> In-Reply-To: <20070620112448.G5906@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: jackbarnett@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 01:53:17 -0000 doug wrote: > 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 > > > hrm... no I don't think that's it. I put this in: DirectoryIndex index.php index.html I have php5 install I created this file: test.php \n"); ?> But that doesn't work either. Is mod_layout screwing it up? I don't understand what is wrong with it? `php test.php` works fine. Also there is no Module Load/Add in the httpd.conf for php. I can't even find the libraries! But /usr/local/bin/ has php and php-cgi (both executables). Do I need to tell apache how to execute .php files?