Hello On Sun, Apr 03, 2005 at 04:53:12PM +0200, Jeremy Laine wrote: > 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.
This is not needed in apache2 as you can install files instead. wwwconfig-common should not be used for apache configuration anymore. Actually wwwconfig-common will be depricated soon as there is a new tool dbconfig-common that have most of its useful functionality. The patch is very welcome though. If you really want me to apply it, I'll do that but you should know that I think this tool is (about to become at least) depricated. Regards, // Ola > 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 -- --------------------- Ola Lundqvist --------------------------- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD | | +46 (0)54-10 14 30 +46 (0)70-332 1551 | | http://www.opal.dhs.org UIN/icq: 4912500 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]