diff options
authorMichael Orlitzky <>2016-01-08 14:23:41 -0500
committerMichael Orlitzky <>2016-01-08 14:23:41 -0500
commit2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac (patch)
parentAdd sapi_link_name_target() to clean up set_sapi(). (diff)
Add config warning when setting the apache2 target.
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ b/src/
index 7acda64..b47d218 100644
--- a/src/
+++ b/src/
@@ -463,7 +463,27 @@ set_sapi() {
+# Check to see if the user is still using the old-style apache
+# configuration with -DPHP5 and 70_mod_php5.conf. If he is, warn him
+# that it is outdated, and that his eselect choices will not have any
+# effect until the configuration is updated.
+apache2_php5_config_check() {
+ if [ -f "${EROOT}/etc/apache2/modules.d/70_mod_php5.conf" ] ; then
+ local msg
+ write_warning_msg "The apache2 configuration has changed in this"
+ write_warning_msg "version of eselect-php. You should define \"-D PHP\""
+ write_warning_msg "and not \"-D PHP5\" for apache. The module is now"
+ write_warning_msg "loaded by 70_mod_php.conf (was 70_mod_php5.conf)."
+ write_warning_msg "After you have changed \"-D PHP5\" to \"-D PHP\", "
+ write_warning_msg "you should remove 70_mod_php5.conf to eliminate"
+ write_warning_msg "this warning. Until you have done so, your eselect"
+ write_warning_msg "choices for apache2 will have no effect."
+ echo
+ fi
set_apache2() {
+ apache2_php5_config_check
local target="${1}"
set_sapi apache2 "${target}"
write_mod_php_conf "$(resolv_target apache2 "${target}")"