From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 17:23:57 2006 Return-Path: X-Original-To: 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 7533016A403 for ; Sun, 17 Dec 2006 17:23:57 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90A1B43C9F for ; Sun, 17 Dec 2006 17:23:54 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with SMTP id EAA23996 for ; Mon, 18 Dec 2006 04:23:52 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 18 Dec 2006 04:23:51 +1100 (EST) From: Ian Smith To: questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Subject: PHP 5 with Apache 1.3 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 17:23:57 -0000 Hi all, bit of a long saga, and a (by now) humble question .. I reinstalled php5-5.2.0 from its package, after having to deinstall php 4 and reinstall 5 after the only major glitch on a portupgrade -aPP on a 5.5-STABLE system upgrading old ports, mostly from 5.4-R days. [FWIW, portupgrading phpMyAdmin from packages forces php5, as does its dependency pecl-pdflib-2.1.2, neither of which require later than php 4.1 according to their docs. Anyway, having decided to go with php5 ..] Despite being listed as "PHP Scripting Language (Apache Module and CLI)" the php5-5.2.0 package is not built with mod_php5, which seems kinda odd as that's what most folks want to install php for, I'd have thought? So I've made php5 from ports (make config; #add 'build Apache module'; make deinstall; make reinstall) and now have a shiny new mod_php5.so and the install added that to httpd.conf, looking good: LoadModule php5_module libexec/apache/libphp5.so .. AddModule mod_php5.c However despite also adding to httpd.conf, hopefully in the right place, DirectoryIndex index.php index.html .. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps and after an apachectl restart (even apachectl stop; apachectl start), with things looking ok according to /localhost/server-info and -status, apache still wants to send raw .php pages to Mozilla, which whinges 'the file "" is of type application/x-httpd-php ..', offering to save it. I'm trying this with phpmyadmin, all this was working before on php4, and I've tried both -dist and -recommended as php.ini What do I need to do to get Apache to execute mod_php5 on .php files? Cheers, Ian (Please cc me, I'm subscribed to the -digest which can take a while)