When I try to start apache2 I'll get the following error: /etc/init.d/apache2 start * Starting apache2... /sbin/start-stop-daemon: invalid option -- k Try `/sbin/start-stop-daemon --help' for more information. [ !! ] It seems that the start-stop-daemon doesn't correctly delivers the options to apache. The config-files for apache have been updated. We tested this also on another machine with exactly the same error. Reproducible: Always Steps to Reproduce: 1. emerge -uD apache 2. /etc/init.d/apache2 stop 3. etc-update 4. /etc/init.d/apache2 start Actual Results: /etc/init.d/apache2 start * Starting apache2... /sbin/start-stop-daemon: invalid option -- k Try `/sbin/start-stop-daemon --help' for more information. [ !! ] Expected Results: /etc/init.d/apache2 start * Starting apache2... [OK] Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.4.22-gentoo-r4) ================================================================= System uname: 2.4.22-gentoo-r4 i686 Intel(R) Celeron(R) CPU 2.00GHz Gentoo Base System version 1.4.3.12 distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.7.8 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo ftp://gentoo.inode.at/source/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.easynet.nl/mirror/gentoo/ http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="acl acpi acpi4linux apache2 berkdb crypt fbcon gdbm gif gtk2 icc icc-pgo imagemagick imap imlib jpeg ldap libwww mbox mpeg mpi ncurses nls pam perl php pic png python readline sasl slang spell sse ssl tcpd tiff uclibc usb x86 xml2 zlib"
*** Bug 38158 has been marked as a duplicate of this bug. ***
ok, please open up /etc/init.d/apache2 goto line 44 ('env -i PATH=$PATH ...') and add 'echo' to the front of it then run '/etc/init.d/apache2 start' and include the output here. also, please include the output from: egrep -v '^#|^$' /etc/conf.d/apache2
output from /etc/init.d/apache2: etc/init.d/apache2 start * Starting apache2... env -i PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/opt/intel/compiler70/ia32/bin /sbin/start-stop-daemon --quiet --start --startas /usr/sbin/apache2 --pidfile -- -k start -D PHP4 [ ok ] output from egrep -v '^#|^$' /etc/conf.d/apache2: APACHE2_OPTS="-D PHP4"
you didn't do etc-update properly! the etc-update of /etc/conf.d/apache2 should have added these two lines: PIDFILE=/var/run/apache2.pid RESTARTSTYLE="graceful" they are required by /etc/init.d/apache2 do the emerge again and etc-update properly.