Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 88082

Summary: mod_php-5.0.3 conf files are misplaced and apache2 doesn't load them
Product: Gentoo Linux Reporter: Sebastien M <watersoul>
Component: [OLD] UnspecifiedAssignee: PHP Bugs <php-bugs>
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---

Description Sebastien M 2005-04-05 14:27:01 UTC
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 (default-linux/x86/2004.0, gcc-3.4.3, glibc-,
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/libtool:   1.5.14
CFLAGS="-O2 -mtune=pentium2 -fomit-frame-pointer -pipe"
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"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
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"

# 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

Comment 1 Benedikt Böhm (RETIRED) gentoo-dev 2005-04-21 03:45:31 UTC
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...
Comment 2 Sebastien M 2005-04-22 07:47:59 UTC
I tested mod_php-5.0.3-r2 and it's fixed! Thanks!
By the way, it works pretty well. 
Comment 3 Andreas Korthaus 2005-05-02 15:37:09 UTC
mod_php-5.0.3-r2.ebuild uses an incorrect configure-switch:


you have to use 


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
-  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:

You also should not use PHP 5.0.3: (remote access: