diff options
Diffstat (limited to 'src/php.eselect.in')
-rw-r--r-- | src/php.eselect.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in index 7acda64..b47d218 100644 --- a/src/php.eselect.in +++ b/src/php.eselect.in @@ -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}")" |