Package: wwwconfig-common Version: 0.0.43 Severity: wishlist Tags: patch Currently, the apache-php.sh script that enables PHP support for apache* servers does not support apache2. Attached is a script that adds this support, by using 'a2enmod' to enable PHP support.
Cheers, Jeremy -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.10 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) -- no debconf information
--- /usr/share/wwwconfig-common/apache-php.sh 2005-03-22 17:21:56.000000000 +0100 +++ apache-php.sh 2005-04-03 16:35:57.764830640 +0200 @@ -16,6 +16,8 @@ # change, no functionality changed. # 20040820 Jeremy Laine <[EMAIL PROTECTED]> # Replace remaining calls to modules-config by apache-modconf. +# 20050403 Jeremy Laine <[EMAIL PROTECTED]> +# Add support for Apache2. # Needs: $phpver - the php version to use. # $phpini - the php config file to use. # $server - the apache server to use, @@ -27,22 +29,33 @@ status=error error="" +if [ "apache2" == "$server" ]; then + modtool='a2enmod' +else + modtool='apache-modconf' +fi + if [ -z "$phpver" ] ; then error="No php version to check for." elif [ -z "$phpini" ] ; then error="No php ini file to check for." elif [ ! -f $phpini ] ; then error="Php config file $phpini not found." -elif [ -z $(which apache-modconf) ] ; then - error="Could not find apache-modconf." +elif [ -z $(which $modtool) ] ; then + error="Could not find module utility '$modtool' for server '$server'." else - phpverm="mod_"$phpver - phpstatus=`apache-modconf $server query $phpverm || true` - if [ -z "$phpstatus" ] ; then - apache-modconf $server enable $phpverm - # Uncomment successful. + if [ "apache2" == "$server" ]; then + phpstatus=`$modtool $phpver || true` status=uncomment else - status=nothing + phpverm="mod_"$phpver + phpstatus=`$modtool $server query $phpverm || true` + if [ -z "$phpstatus" ] ; then + $modtool $server enable $phpverm + # Uncomment successful. + status=uncomment + else + status=nothing + fi fi fi