From owner-freebsd-questions@FreeBSD.ORG Mon Jun 2 08:44:07 2003 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 E5DC937B401 for ; Mon, 2 Jun 2003 08:44:07 -0700 (PDT) Received: from juice.thebigchoice.com (pc1-nott2-3-cust18.nott.cable.ntl.com [80.4.204.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 9D61B43FBF for ; Mon, 2 Jun 2003 08:44:06 -0700 (PDT) (envelope-from matt@thebigchoice.com) Received: (qmail 52947 invoked from network); 2 Jun 2003 15:44:02 -0000 Received: from localhost.proweb.net (HELO thebigchoice.com) (127.0.0.1) by juice.thebigchoice.com with SMTP; 2 Jun 2003 15:44:02 -0000 Message-ID: <3EDB70C2.9020306@thebigchoice.com> Date: Mon, 02 Jun 2003 16:44:02 +0100 From: Matt Heath User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 X-Accept-Language: en, en-us MIME-Version: 1.0 To: Maarten de Vries References: <200306021618.02280.mdv@unsavoury.net> In-Reply-To: <200306021618.02280.mdv@unsavoury.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@FreeBSD.ORG Subject: Re: safely running php scripts 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, 02 Jun 2003 15:44:08 -0000 Maarten de Vries wrote: >Hi, > >I would like the php scripts that are hosted on my Apache server (FreeBSD >4.8), to run under the UID/GID's that belong to the useraccounts in >question; not the webservers'. >Before, I patched Apache so it ran php's under SuExec, but now the php >standalonebinary port has disappeared, so that seems to be not an option >anymore. > >Any pointers to set it all up in a safe manner again would be much >appreciated! > > > php now includes a cgi-binary as part of the install you can happily use it with SUEXEC I have a server here set up just that way : matt@alf/home/matt %echo '' | php | head -n 10 phpinfo() PHP Version => 4.3.1 System => FreeBSD alf.proweb.net 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Fri Jan i386 Build Date => May 16 2003 11:42:10 Configure Command => './configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-regex=system' '--without-gd' '--without-mysql' '--with-gd=/usr/local' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-bz2=/usr' '--with-pdflib=/usr/local' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-tiff-dir=/usr/local' '--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--with-expat-dir=/usr/local' '--with-xmlrpc' '--with-dom=/usr/local' '--enable-ftp' '--with-curl=/usr/local' '--with-iconv=/usr/local' '--with-ming=/usr/local' '--prefix=/usr/local' 'i386-portbld-freebsd4.7' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /usr/home/www/php.ini PHP API => 20020918