From owner-freebsd-questions@FreeBSD.ORG Mon Dec 6 13:24:47 2004 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 C530016A4CE for ; Mon, 6 Dec 2004 13:24:47 +0000 (GMT) Received: from yggdrasil.interstroom.nl (yggdrasil.interstroom.nl [80.85.129.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 283EC43D48 for ; Mon, 6 Dec 2004 13:24:47 +0000 (GMT) (envelope-from o.greve@axis.nl) Received: from ip102-211.introweb.nl ([80.65.102.211] helo=sjees) by yggdrasil with esmtp (Exim 3.35 #1 (Debian)) id 1CbIqu-0005OK-00; Mon, 06 Dec 2004 14:24:32 +0100 From: "Olaf Greve" To: "'Cristi Tauber'" Date: Mon, 6 Dec 2004 14:24:38 +0100 Message-ID: <00f001c4db96$efd138a0$1e01a8c0@sjees> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2742.200 In-Reply-To: <41B096FF.6030706@daleco.biz> Importance: Normal X-MailScanner-Information: Interstroom virusscan, please e-mail helpdesk@interstroom.nl for more information X-MailScanner-SpamCheck: cc: 'FreeBSD Question' Subject: RE: php4-cli or mod_php4 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: Mon, 06 Dec 2004 13:24:47 -0000 Hi, > > i want to install apache+php+mysql. If i install mod_php i cannot > >install php4-extension (mysql, etc ...). If i try to install php4-cli > >and extensions apache doesn't know how to handle .php files . What's the > >they to go to make apache work with mysql and php ? fBSD is 5.3. Well, up until fBSD 5.2.1 when installing PHP4 and Apache 1.3 using sysinstall, matters would all automatically be swell. Then, the other day I installed fBSD 5.3 on a client's machine, then I did the same trick by installing Apache 1.3, PHP4 + extensions and I tested the combination. A simple 'hello world' script worked a charm, but then I put the actual application on the machine, and all sorts of things would not work! It seems that as of fBSD 5.3, the version that is installed when using sysinstall has a lot less compile options enabled than it used to do previously, one of which being the MySQL support. Here's what I did to solve the issue: 1) Install Apache 1.3, PHP4 (MOD + CLI), PHP4 extensions. 2) Make sure this combination can successfully execute a simple 'hello world' example. 3) Figure out PHP's compilation options (this can be done e.g. using PHPinfo). 4) If possible, compare these options to those of a system on which everything works as it should (I was lucky enough to be able to do so, but perhaps you do not have access to such a system). No write down the compilation options that you're missing in your installation (e.g. something like --enable-mysql, etc.). 5) Go to the proper ports directory, which I think (if memory serves me right here) is something like /ports/lang/php4. Check the Makefile structure, in the beginning of that file you can see PHP's compilation options. 6) Add the missing options to this file. Perform a 'make remove' (to first uninstall PHP4), then perform a 'make all' followed by a 'make install' (I think these were the steps). 7) Restart apache using 'apachectl restart' and check the compilation options again. If you did this process correctly, PHP should work fine now. Note: enabling PHP4 from the Apache httpd.conf file is not that difficult. If your 'hello world' example fails to run, and you can't figure out which configuration options to set in Apache's httpd.conf file, and/or in PHP's php.ini file, please let me know. I've done this several times now, so I can probably help you out with it... Cheerz! Olafo