Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Standalong (cgi) php

0 views
Skip to first unread message

Christian Kratzer

unread,
Feb 18, 2003, 7:09:11 AM2/18/03
to
Hi,

I recall some discussion beginning of the month on getting back the
standalone functionality to the php port. We use the cgi version of
php on our virtual webservers so that we can run customer cgi's as their
own users using suexec.

Because the php port has been stripped of standalone functionality we
have to either maintain a separate port to get the cgi version which is
not too satisfactory ;-(

I could of course modify the mod_php4 port and send a pr but without
discussion and consencus we propably wouldn't get that committed which
is why I would like to discuss what would be best in this situation.

What exactly was the problem that caused the standalone port to be dropped ?

Greetings
Christian

--
CK Software GmbH
Christian Kratzer, Schwarzwaldstr. 31, 71131 Jettingen
Email: c...@cksoft.de
Phone: +49 7452 889-135 Open Software Solutions, Network Security
Fax: +49 7452 889-136 FreeBSD spoken here!


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

Ryan O'Neill

unread,
Feb 18, 2003, 5:22:23 PM2/18/03
to
The mod_php4 port hasn't been stripped of the standalone functionality
entirely, it's just now using the "CLI" version of the standalone by
default, which is a lot different than the "CGI" version. See here
for more:
http://www.php.net/manual/en/features.commandline.php

Basically, if you compile PHP --with-apxs (the apache module), it will
automatically compile the CLI version as /usr/local/bin/php and *not*
compile the CGI version at all. In fact, you can't compile the CGI
version unless you don't specify --with-apxs at all in the configure.

I'm not sure what the mod_php4 maintainer(s) want to do about this
(new php4_cgi port, flag in mod_php4 port, etc?), but our quick
solution was to patch mod_php4's Makefile:

--- Makefile Mon Feb 17 10:14:00 2003
+++ Makefile.new Tue Feb 18 13:15:47 2003
@@ -49,8 +49,15 @@
--with-tsrm-pth
PLIST_SUB= MOD_DIR=libexec/apache2
.else
+.if defined(CGI)
+CONFIGURE_ARGS= --enable-cgi --disable-cli \
+ --disable-pear \
+ --enable-discard-path \
+ --with-readline=/usr
+.else
CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs
PLIST_SUB= MOD_DIR=libexec/apache
+.endif
.endif
CONFIGURE_ARGS+=--with-config-file-path=${PREFIX}/etc \
--enable-versioning \

So our php installation basically goes like this right now:
cd /usr/ports/www/mod_php4
make -DBATCH PHP4_OPTIONS='<bunchofcrap>' install
make clean
make -DCGI -DBATCH PHP4_OPTIONS='<bunchofcrap>' install

Now all i have to do is manually update the port to PHP 4.3.1 to fix
the new CGI vulnerability and recompile. Good times :)

c...@cksoft.de (Christian Kratzer) wrote in message news:<b2t7p7$1kdh$1...@FreeBSD.csie.NCTU.edu.tw>...

0 new messages