I just updated apache2 to 2.0.53 and mod_php to 5.0.3. I noticed all the changes, but tried in vain to load mod_php, and it wasn't working. Later on I figured out that this apache build required the 70_mod_php5.conf to be in /etc/apache2/modules.d/70_mod_php5.conf instead of /etc/apache2/conf/modules.d/70_mod_php5.conf Quick fix : ln -s /etc/apache2/conf/modules.d/70_mod_php5.conf /etc/apache2/modules.d/70_mod_php5.conf Reproducible: Always Steps to Reproduce: 1.emerge sync && emerge apache -u && emerge mod_php -u 2./etc/init.d/apache2 restart 3.viewing any php page on the server, the server will send it as a common file. tail /var/log/apache2/error_log told me the list of the loaded modules, and PHP5 wasn't in. Actual Results: View step 3. Expected Results: to render the php Portage 2.0.51.19 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686) ================================================================= System uname: 2.6.10-gentoo-r7 i686 Pentium II (Deschutes) Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Mar 3 2005, 15:02:01)] ccache version 2.4 [enabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.9.5, 1.6.3, 1.4_p6, 1.7.9-r1, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r7, 2.15.92.0.2-r4 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -mtune=pentium2 -fomit-frame-pointer -pipe" CHOST="i386-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=pentium2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 alsa apache2 apm arts avi berkdb bitmap-fonts calendar cdr crypt cups curl dba emboss encode esd fam font-server foomaticdb fortran ftp gd gd-external gdbm gif gpm gstreamer gtk2 imagemagick imap imlib ipv6 java jpeg ldap libg++ libwww mad maildir mikmod mime mmx motif mozilla mp3 mpeg multislot mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl simplexml slang spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts xml2 xmlrpc xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY /etc/conf.d/apache2 # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-src/apache/dist/2.0/init/apache2.confd,v 1.1 2005/01/08 03:58:40 vericgar Exp $ # Config file for /etc/init.d/apache2 APACHE2_OPTS="-D SSL -D PHP5"
mod_php5 is currently hard masked becuase of ZTS issues, but it seems 5.0.3-r2 has an experimental fix for that, and also the right location for the config file, could you please try this version and reopen if it's still wrong...
I tested mod_php-5.0.3-r2 and it's fixed! Thanks! By the way, it works pretty well.
mod_php-5.0.3-r2.ebuild uses an incorrect configure-switch: --enable-experimental-zts you have to use --enable-maintainer-zts instead (you should not use this switch in production enviroment!). Why is php5-prefork.patch needed? It removes the following: - if test "$APXS_MPM" != "prefork"; then - PHP_BUILD_THREAD_SAFE - fi But why? That code makes a lot of sense to me. Or will $APXS_MPM not be set? But why not? If I compile it by myself I have no problems with ZTS. If I don't use --enable-maintainer-zts and use prefork MPM, I get a PHP-Version without ZTS. ATM I don't see the reason for the php5-prefork.patch workaround. I have used the mod_php-5.0.3-r2.ebuild on different servers for quite a while now, and it works perfectly. In most cases I use it with Apache 1.3, but I also tested with 2.0. Because of the security-issues with <5.0.4 I use 5.0.4 for some time in production enviroment now. mod_php-5* is masked for 2 months now, there is no official 5.0.4 ebuild, which has been released 1 month ago (including security-fixes). You should not use mod_php with a threaded MPM at all: http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2 You also should not use PHP 5.0.3: http://secunia.com/advisories/14792/ (remote access: http://bugs.gentoo.org/show_bug.cgi?id=87471)