safely running php scripts

Matt Heath matt at
Mon Jun 2 08:44:08 PDT 2003

Maarten de Vries wrote:

>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 
>Any pointers to set it all up in a safe manner again would be much 
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 at alf/home/matt %echo '<? phpinfo() ?>' | php | head -n 10
PHP Version => 4.3.1

System => FreeBSD 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' 
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/home/www/php.ini
PHP API => 20020918

More information about the freebsd-questions mailing list