Skip site navigation (1)Skip section navigation (2)
Date:      14 Sep 2002 23:20:43 -0000
From:      Clement Laforet <sheepkiller@cultdeadsheep.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/42790: New Port - www/suphp : A pretty PHP wrapper (for Apache)
Message-ID:  <20020914232043.48302.qmail@cultdeadsheep.org>

next in thread | raw e-mail | index | archive | help

>Number:         42790
>Category:       ports
>Synopsis:       New Port - www/suphp : A pretty PHP wrapper (for Apache)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 14 16:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Clement Laforet
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
The Cult Of The Dead Sheep
>Environment:
System: FreeBSD goofy.cultdeadsheep.org 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Jul 4 10:05:12 CEST 2002 root@goofy.cultdeadsheep.org:/usr/obj/usr/src/sys/GOOFY i386


	
>Description:
	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, and provides a logging function. 

>How-To-Repeat:
	
>Fix:

	

--- suphp.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	suphp/
#	suphp/Makefile
#	suphp/distinfo
#	suphp/pkg-comment
#	suphp/pkg-descr
#	suphp/pkg-message
#	suphp/pkg-plist
#	suphp/files
#	suphp/files/patch-aa
#
echo c - suphp/
mkdir -p suphp/ > /dev/null 2>&1
echo x - suphp/Makefile
sed 's/^X//' >suphp/Makefile << 'END-of-suphp/Makefile'
X# New ports collection makefile for:	suphp
X# Date created:				15 September 2002
X# Whom:					Clément Laforêt <sheepkiller@cultdeadsheep.org>
X#
X#
X#
X
XPORTNAME=	suphp
XPORTVERSION=	0.2
XCATEGORIES=	www
XMASTER_SITES=	http://www.suphp.org/download/
X
XMAINTAINER=	sheepkiller@cultdeadsheep.org
X
XBUILD_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
XRUN_DEPENDS=	${LOCALBASE}/bin/php:${PORTSDIR}/lang/php4
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
XUSE_REINPLACE=	yes
X
XMAKE_ARGS+=	APXS="${APXS}"
XAPXS?=		${LOCALBASE}/sbin/apxs
XWWW_USER?=	www
XLOG_PATH?=	/var/log
X
Xpre-configure:
X	@${ECHO}
X	@${ECHO} "*-------------------------------------------------------------*"
X	@${ECHO} " suPHP conflicts with mod_php4. It works only with php command"
X	@${ECHO} " line binairy."
X	@${ECHO} " Options :"
X	@${ECHO} "     - WWW_USER = Apache's User"
X	@${ECHO} "     - Define CHECK_PATH, to enable or disable suExec-like"
X	@${ECHO} "       path checking (based on DocumentRoot directive)."
X	@${ECHO} "     - LOG_PATH=/path/to/your/logs . Default /var/log/."
X	@${ECHO} "*-------------------------------------------------------------*"
X	@${ECHO}
X
Xdo-configure:
X	@${ECHO} "Setting User to : ${WWW_USER}"
X	@${REINPLACE_CMD} -e 's!OPT_APACHE_USER "wwwrun"!OPT_APACHE_USER "${WWW_USER}"!' \
X		${WRKSRC}/config.h
X	@${ECHO} "Setting checkpath. (if enabled)"
X	@${REINPLACE_CMD} -e 's!OPT_CHECKPATH!OPT_CHECKPATH ${CHECK_PATH}!' \
X		${WRKSRC}/config.h
X	@${ECHO} "Setting logs path"
X	@${REINPLACE_CMD} -e 's,OPT_LOGFILE "/opt/apache/var/logs/suphp_log",OPT_LOGFILE "${LOG_PATH}/suphp_log",' \
X		${WRKSRC}/config.h
X	@${REINPLACE_CMD} -e 's,OPT_PATH_TO_PHP "/usr/bin/php",OPT_PATH_TO_PHP "${LOCALBASE}/bin/php",' \
X		${WRKSRC}/config.h
X
Xpre-install:
X	${APXS} -i -a -c -n suphp ${WRKSRC}/apache/mod_suphp.c
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR} ${DOCSDIR}/apache
X	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/apache/CONFIG ${DOCSDIR}/apache
X	${INSTALL_DATA} ${WRKSRC}/apache/README ${DOCSDIR}/apache
X	${INSTALL_DATA} ${WRKSRC}/apache/INSTALL ${DOCSDIR}/apache
X	${INSTALL_DATA} ${WRKSRC}/apache/LICENSE ${DOCSDIR}/apache
X.endif
X	@${CHMOD} u+s ${PREFIX}/sbin/suphp
X	@${RM} mod_suphp.o
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-suphp/Makefile
echo x - suphp/distinfo
sed 's/^X//' >suphp/distinfo << 'END-of-suphp/distinfo'
XMD5 (suphp-0.2.tar.gz) = 7bc75f50a7d6b97554d5c91089d7e089
END-of-suphp/distinfo
echo x - suphp/pkg-comment
sed 's/^X//' >suphp/pkg-comment << 'END-of-suphp/pkg-comment'
XsuPHP is a combination which provides a wrapper for PHP.
END-of-suphp/pkg-comment
echo x - suphp/pkg-descr
sed 's/^X//' >suphp/pkg-descr << 'END-of-suphp/pkg-descr'
XsuPHP is a combination of an Apache module (mod_suphp) and an executable 
Xwhich provides a wrapper for PHP. With both together, it is possible to 
Xexecute PHP scripts with the permissions of their owner without having 
Xto place a PHP binary in each user's cgi-bin directory. suPHP doesn't 
Xneed Apache's suExec, provides a logging function and support for 
Xdifferent php.ini's. 
X
XWWW: http://www.suphp.org
END-of-suphp/pkg-descr
echo x - suphp/pkg-message
sed 's/^X//' >suphp/pkg-message << 'END-of-suphp/pkg-message'
X----------------------------------------------------------------
XYou have installed mod_suphp, a module that provides a wrapper 
Xfor PHP for Apache.
X
XFor help on using this module, please see the suPHP homepage:
X    	http://www.suphp.org
X-----------------------------------------------------------------
END-of-suphp/pkg-message
echo x - suphp/pkg-plist
sed 's/^X//' >suphp/pkg-plist << 'END-of-suphp/pkg-plist'
Xsbin/suphp
Xlibexec/apache/mod_suphp.so
X@exec %D/sbin/apxs -e -a -n suphp %D/%f
X@unexec echo "===>  If you do not plan on reinstalling suphp, you must manually remove"; echo "===> references to it in httpd.conf."
X%%PORTDOCS%%share/doc/suphp/README
X%%PORTDOCS%%share/doc/suphp/apache/CONFIG
X%%PORTDOCS%%@dirrm share/doc/suphp/apache
X%%PORTDOCS%%@dirrm share/doc/suphp/
END-of-suphp/pkg-plist
echo c - suphp/files
mkdir -p suphp/files > /dev/null 2>&1
echo x - suphp/files/patch-aa
sed 's/^X//' >suphp/files/patch-aa << 'END-of-suphp/files/patch-aa'
X--- Makefile.orig	Sun Jun  2 16:07:34 2002
X+++ Makefile	Sat Sep 14 16:23:40 2002
X@@ -2,7 +2,7 @@
X ## Makefile for suPHP                       ##
X ##############################################
X 
X-SUPHP_INSTALL = /usr/sbin/suphp
X+SUPHP_INSTALL = $(PREFIX)/sbin/suphp
X 
X CC = gcc
X CFLAGS = -c -Wall
X@@ -31,11 +31,7 @@
X 	touch suphp.h
X 
X install: suphp
X-	if [ $$UID = 0 ]; then \
X-	 cp suphp ${SUPHP_INSTALL}; \
X-	else \
X-	 echo -e "You need to be root to install suPHP."; \
X-	fi
X+	 cp suphp ${SUPHP_INSTALL}
X 
X clean:
X 	rm *.o
X@@ -43,3 +39,5 @@
X 
X rmbackups:
X 	rm *~
X+
X+all: suphp
END-of-suphp/files/patch-aa
exit
--- suphp.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020914232043.48302.qmail>