When creating the new environment for the apache to start in the LD_LIBRARY_PATH env var should be contained in it. That enables one to put additional paths in LD_LIBRARY_PATH in /etc/conf.d/apache2 that will be honored when starting apache, thus enabling e.g. the Java support in PHP. Reproducible: Always Steps to Reproduce: Patch for /etc/init.d/apache2: --- apache2~ 2005-02-04 18:51:49.874117256 +0100 +++ apache2 2005-02-04 18:51:34.523450912 +0100 @@ -58,7 +58,7 @@ ebegin "Starting apache2" [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache [ -f /usr/lib/apache2/build/envvars ] && . /usr/lib/apache2/build/envvars - env -i PATH=$PATH /sbin/start-stop-daemon --quiet \ + env -i PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH /sbin/start-stop-daemon --quiet \ --start --startas /usr/sbin/apache2 \ --pidfile ${PIDFILE} -- -k start ${APACHE2_OPTS} eend $?
If you want this functionality, you'll have to enable it yourself. From a security stand-point at least, this should not be done by default.