From owner-freebsd-questions@FreeBSD.ORG Sun Feb 20 03:18:51 2005
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 06A0E16A4CE
for ; Sun, 20 Feb 2005 03:18:51 +0000 (GMT)
Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161])
by mx1.FreeBSD.org (Postfix) with ESMTP id 86C6043D45
for ; Sun, 20 Feb 2005 03:18:50 +0000 (GMT)
(envelope-from kdk@daleco.biz)
Received: from [69.27.131.0] ([69.27.131.0]) by ns1.tiadon.com with Microsoft
SMTPSVC(6.0.3790.211); Sat, 19 Feb 2005 21:18:51 -0600
Message-ID: <42180198.2030702@daleco.biz>
Date: Sat, 19 Feb 2005 21:18:48 -0600
From: Kevin Kinsey
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Andrei Iarus
References: <20050220022403.72598.qmail@web51710.mail.yahoo.com>
In-Reply-To: <20050220022403.72598.qmail@web51710.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 20 Feb 2005 03:18:52.0485 (UTC)
FILETIME=[E71AB750:01C516FA]
cc: questions@freebsd.org
Subject: Re: PHP
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, 20 Feb 2005 03:18:51 -0000
Andrei Iarus wrote:
>I have installed apache-1.3.33_1, php5-5.0.3_1. And I
>tried to run simple scripts like:
>
>
> PHP Test
>
>
> Hello World
'; ?>
>
>
>and the output was an unexpected one:
>
> Hello World
>
>'; ?>
>It also doesn`t outputs anything when using the
>phpversion() function. A possible bug? Before
>reporting this as a bug, I wanted to check if there
>was someone else with similar problems(or may be I did
>something wrong).
>
>
Simple configuration needed. Note that this is PHP4.
***These are my comments*** (be sure not to put _them_
into your httpd.conf).
-----------------------------------------------------------------------------------------------------------
#grep -A 2 php /usr/local/etc/apache/httpd.conf
LoadModule php4_module /usr/local/libexec/apache/libphp4.so
***this is necessary.***
AddModule mod_php4.c
***so is this.***
DirectoryIndex index.php index.html
***tells Apache to use "index.php" as the preferred index,
if not present, then use "index.html" if it exists***
AddType application/x-httpd-php .php .html .asp .php3
AddType application/x-httpd-php-source .phps
***a little overkill, mostly for humor. My development server
treats files ending in "php", "html" and "asp" as php files and
parses them looking for PHP (mostly as a political statement).***
-----------------------------------------------------------------------------------------------------------------
Basically, you must have 1]LoadModule 2]AddModule and
3]AddType declarations in httpd.conf, then restart Apache
and your scripts should work fine.
HTH, Kevin Kinsey