From owner-freebsd-questions@FreeBSD.ORG Thu Jun 21 07:46:11 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 3C26216A421 for ; Thu, 21 Jun 2007 07:46:11 +0000 (UTC) (envelope-from ivan@careytech.com.au) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by mx1.freebsd.org (Postfix) with ESMTP id B76FC13C455 for ; Thu, 21 Jun 2007 07:46:10 +0000 (UTC) (envelope-from ivan@careytech.com.au) X-IronPort-AV: E=Sophos;i="4.16,446,1175437800"; d="scan'208";a="146434301" Received: from ppp154-213.static.internode.on.net (HELO [192.168.1.2]) ([150.101.154.213]) by ipmail01.adl2.internode.on.net with ESMTP; 21 Jun 2007 17:16:08 +0930 Message-ID: <467A2CBF.7010907@careytech.com.au> Date: Thu, 21 Jun 2007 17:46:07 +1000 From: Ivan Carey User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: jackbarnett@gmail.com References: <467763C3.306@gmail.com> <46778398.7080506@careytech.com.au> <4679DAB3.2010403@gmail.com> In-Reply-To: <4679DAB3.2010403@gmail.com> 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: ivan@careytech.com.au List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 07:46:11 -0000 Jack Barnett wrote: > Ivan Carey wrote: >> 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 >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>> To unsubscribe, send any mail to >>> "freebsd-questions-unsubscribe@freebsd.org" >>> >>> . >>> >> Hello Jack, >> I have 2 servers running one with php4 and one with php5 >> >> In the php4 httpd.conf I have: >> LoadModule php4_module libexec/apache/libphp4.so >> AddModule mod_php4.c >> >> # DirectoryIndex: Name of the file or files to use as a pre-written HTML >> # directory index. Separate multiple entries with spaces. >> # >> >> >> >> DirectoryIndex index.php index.php3 index.html >> >> >> DirectoryIndex index.php3 index.html >> >> >> >> >> DirectoryIndex index.php index.html >> >> >> DirectoryIndex index.html >> >> >> >> >> # LanguagePriority allows you to give precedence to some languages >> # in case of a tie during content negotiation. >> # >> # Just list the languages in decreasing order of preference. We have >> # more or less alphabetized them here. You probably want to change >> this. >> # >> >> LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br >> ru ltz ca es sv tw >> >> >> >> AddType application/x-httpd-php3 .php3 >> AddType application/x-httpd-php3-source .php3s >> >> >> AddType application/x-httpd-php .php >> AddType application/x-httpd-php-source .phps >> >> >> >> In the Apache2 using php5 I have in the httpd.conf >> LoadModule php5_module libexec/apache2/libphp5.so >> >> # If the AddEncoding directives above are commented-out, then you >> # probably should define those extensions to indicate media types: >> # >> AddType application/x-compress .Z >> AddType application/x-gzip .gz .tgz >> >> AddType application/x-httpd-php .php >> AddType application/x-httpd-php-source .phps >> >> I hope this helps you with your configuration, >> Regards, >> Ivan >> > I don't have libphp5.so anywhere in /usr/local (did a find for it). > the php5 port is broken? Or do I have to reinstall apache after php5? > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > . > Jack, When I want a system with Apache PHP and MySQL. I install them in the following order. 1. Install Apache 2. Install PHP via /usr/lang/php5-extensions (select the extensions you want, this will install php5 and add the required lines to the httpd.conf) 3. Install MySQL Regards, Ivan