Subject: Apache 2 and PHP4 modules
To: None <tech-pkg@netbsd.org>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-pkg
Date: 11/02/2002 17:54:42
PHP4 needs experimental code to be compiled as a DSO module for Apache2.
It's not obvious, since it's activated automatically when --with-apxs2 is
used.
Therefore, the packages php4 and ap2-php4 are different enough not to
allow mod_php4.so load extensions compiled against the php4. The problem
appears as mod_php4.so complaining about an unknown symbol
(executator_globals), but even if it's a bug of PHP, I doubt an extension
using regular code could work with mod_php4.so's experimental code.
That experimental code needs POSIX threads (ap2-php4 uses pth), this is
the reason for the dependency.
I managed to have php4-mysql and php4-imap work with Apache 2, my guess is
that all the others should work too.
The following patch is what I had to do, but it's not useable : php4
should include experimental code _only_ to support Apache 2. Since I don't
know how to do that, I preferred asking here before sending a PR.
Note that I also had to make php4-mysql use buildlink2 for the
mysql-client dependency.
cube
--- pkgsrc/www/php4/Makefile.common.orig Mon Oct 14 08:21:18 2002
+++ pkgsrc/www/php4/Makefile.common Sat Nov 2 16:11:49 2002
@@ -30,4 +30,10 @@
PKG_SYSCONFVAR?= php
+USE_BUILDLINK2= YES
+
+CONFIGURE_ARGS+= --enable-experimental-zts
+CONFIGURE_ARGS+= --with-tsrm-pth
+
.include "../../mk/bsd.prefs.mk"
+.include "../../devel/pth/buildlink2.mk"
--- pkgsrc/databases/php4-mysql/Makefile.orig Thu Feb 28 07:17:09 2002
+++ pkgsrc/databases/php4-mysql/Makefile Sat Nov 2 16:27:34 2002
@@ -5,7 +5,7 @@
PKGREVISION= # empty
COMMENT= PHP4 extension for MySQL databases
-DEPENDS+= mysql-client>=3.23.35:../../databases/mysql-client
+#DEPENDS+= mysql-client>=3.23.35:../../databases/mysql-client
.include "../../www/php4/Makefile.module"
@@ -13,4 +13,5 @@
CONFIGURE_ARGS+= --with-${MODNAME}=shared,${MYSQLDIR}
LDFLAGS+= -Wl,-R${LOCALBASE}/lib/mysql
+.include "../../databases/mysql-client/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
--
That's how I did it, Anton. I never saved anything
for the swim back.
Vincent/Jerome, in Gattaca.