From owner-freebsd-questions@FreeBSD.ORG Sun Jul 2 00:33:08 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 33A6816A40F for ; Sun, 2 Jul 2006 00:33:08 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from ferengi.borderworlds.dk (ferengi.borderworlds.dk [80.166.152.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF60F43D48 for ; Sun, 2 Jul 2006 00:33:07 +0000 (GMT) (envelope-from xi@borderworlds.dk) Received: from dominion.borderworlds.dk (dominion.borderworlds.dk [10.1.0.10]) by ferengi.borderworlds.dk (Postfix) with ESMTP id 4DDCBB97D for ; Sun, 2 Jul 2006 02:33:06 +0200 (CEST) Received: by dominion.borderworlds.dk (Postfix, from userid 2000) id 2F5288C8; Sun, 2 Jul 2006 02:33:05 +0200 (CEST) To: freebsd-questions@freebsd.org References: From: Christian Laursen Date: Sun, 02 Jul 2006 02:33:04 +0200 In-Reply-To: (bill's message of "Sat, 1 Jul 2006 06:52:19 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: bill Subject: Re: Linux shared libs on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 00:33:08 -0000 bill writes: > We have a third-party php extension that we need to use for a > specific application here. The extension is compiled for Linux, but > it appears that its possible to use them in FreeBSD under the Linux > emulation. It is, but it's not pretty. > Its not working out so well for us, unfortunately. Here's what I've > done, and hopefully someone can point out where we've gone wrong and > maybe suggest a fix: > > 1) the PHP .so has been branded using: brandelf -t Linux > > 2) linux compatibility is enabled, linprocfs is mounted, etc. > > 3) the port linux_base-8-8.0_14 is installed and seems to be working > properly. > > I think that should about do it, no? Not quite. You can't mix native binaries and linux libraries. You need to use a php built for linux and load your .so into that. I had to do this once and chose to run php in cgi mode from a native apache. If you want to use php as an apache module, you'll need an apache built for linux as well. -- Christian Laursen