diff options
author | pav <pav@FreeBSD.org> | 2006-05-10 22:23:14 +0000 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-05-10 22:23:14 +0000 |
commit | 60a366e2f720f7ce2364b5b9d33c7058aee5829b (patch) | |
tree | e60b3265134c9c2a639d4820648d74c966104a61 | |
parent | a7ed5a0e909ef28ea5e7685977d7fcace93c9069 (diff) | |
download | FreeBSD-ports-60a366e2f720f7ce2364b5b9d33c7058aee5829b.zip FreeBSD-ports-60a366e2f720f7ce2364b5b9d33c7058aee5829b.tar.gz |
- Fix for recent PHP changes, correct path to php-cgi binary
- Add user-overridable variable SUPHP_PATH
- Cosmetics
PR: ports/97047
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com> (maintainer)
-rw-r--r-- | www/suphp/Makefile | 18 | ||||
-rw-r--r-- | www/suphp/files/patch-src-suphp.c | 11 | ||||
-rw-r--r-- | www/suphp/pkg-descr | 13 | ||||
-rw-r--r-- | www/suphp/pkg-message | 3 |
4 files changed, 35 insertions, 10 deletions
diff --git a/www/suphp/Makefile b/www/suphp/Makefile index c56b81f..8a7a70f 100644 --- a/www/suphp/Makefile +++ b/www/suphp/Makefile @@ -7,12 +7,12 @@ PORTNAME= suphp PORTVERSION= 0.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= http://www.suphp.org/download/ MAINTAINER= freebsd@jdc.parodius.com -COMMENT= Securely execute ~user PHP scripts +COMMENT= Securely execute PHP scripts GNU_CONFIGURE= yes USE_PHP= yes @@ -20,7 +20,7 @@ USE_APACHE= 1.3+ WANT_PHP_CGI= yes WITH_LOGFILE?= /var/log/suphp.log -PHP_PATH?= ${LOCALBASE}/bin/php +PHP_PATH?= ${LOCALBASE}/bin/php-cgi MIN_UID?= 80 MIN_GID?= 80 WITH_SETID_MODE?= owner @@ -34,6 +34,14 @@ CONFIGURE_ARGS+= --with-php=${PHP_PATH} \ --with-min-uid=${MIN_GID} \ --with-apxs=${APXS} +# This is the default of the PATH environment variable when scripts +# are run under suphp. This path is normally hard-coded into suphp.c. +# Many people prefer to have /usr/local and other utilities available +# to php scripts. +# Make sure the path is colon-delimited! +# +SUPHP_PATH?= /bin:/usr/bin + ## Available knobs: ## WITHOUT_CHECKPATH: disable check if script resides in DOCUMENT_ROOT .if defined(WITHOUT_CHECKPATH) @@ -58,6 +66,10 @@ show-options: pre-everything:: show-options @${DO_NADA} +post-patch: + @${REINPLACE_CMD} -e 's|%%SUPHP_PATH%%|${SUPHP_PATH}|g' \ + ${WRKSRC}/src/suphp.c + post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} diff --git a/www/suphp/files/patch-src-suphp.c b/www/suphp/files/patch-src-suphp.c new file mode 100644 index 0000000..0c245c7 --- /dev/null +++ b/www/suphp/files/patch-src-suphp.c @@ -0,0 +1,11 @@ +--- src/suphp.c.orig Tue Jul 13 02:43:41 2004 ++++ src/suphp.c Tue May 9 08:59:46 2006 +@@ -55,7 +55,7 @@ + + // Set secure PATH + +- suphp_setenv("PATH", "/bin:/usr/bin", 1); ++ suphp_setenv("PATH", "%%SUPHP_PATH%%", 1); + + // Check for PHP_CONFIG environment variable + diff --git a/www/suphp/pkg-descr b/www/suphp/pkg-descr index 04e588b..e750c43 100644 --- a/www/suphp/pkg-descr +++ b/www/suphp/pkg-descr @@ -1,8 +1,9 @@ -suPHP is a combination of an Apache module (mod_suphp) and an executable -which provides a wrapper for PHP. With both together, it is possible to -execute PHP scripts with the permissions of their owner without having -to place a PHP binary in each user's cgi-bin directory. suPHP doesn't -need Apache's suExec, provides a logging function and support for +suPHP is a combination of an Apache module (mod_suphp) and an +executable which provides a wrapper for PHP. With both +together, it is possible to execute PHP scripts with the +permissions of their owner without having to place a PHP +binary in each user's cgi-bin directory. suPHP doesn't need +Apache's suExec, provides a logging function and support for different php.ini's. -WWW: http://www.suphp.org +WWW: http://www.suphp.org/ diff --git a/www/suphp/pkg-message b/www/suphp/pkg-message index 9c723ef..e7187ad 100644 --- a/www/suphp/pkg-message +++ b/www/suphp/pkg-message @@ -3,7 +3,8 @@ You have installed mod_suphp, a module that provides a wrapper for PHP for Apache. For help on using this module, please see the suPHP homepage: - http://www.suphp.org + + http://www.suphp.org/ Important hints: Using suPHP can break some PHP-scripts, because of Apache's CGI |