summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-eselect')
-rw-r--r--app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild (renamed from app-eselect/eselect-php/eselect-php-0.8.2.ebuild)3
-rw-r--r--app-eselect/eselect-php/files/70_mod_php5.backcompat.conf28
2 files changed, 30 insertions, 1 deletions
diff --git a/app-eselect/eselect-php/eselect-php-0.8.2.ebuild b/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
index e52f00465d16..012e47663eac 100644
--- a/app-eselect/eselect-php/eselect-php-0.8.2.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -30,6 +30,7 @@ src_install() {
if use apache2 ; then
insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
doins "${FILESDIR}/70_mod_php.conf"
+ newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
fi
if use fpm ; then
diff --git a/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
new file mode 100644
index 000000000000..bd79f78aa6be
--- /dev/null
+++ b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
@@ -0,0 +1,28 @@
+###########
+# WARNING #
+###########
+#
+# This file is provided for backwards compatibility only. The Apache
+# PHP configuration is now located in 70_mod_php.conf and requires you
+# to set -DPHP in your Apache conf.d file. Please examine
+# 70_mod_php.conf and update your Apache configuration to use -DPHP
+# instead of -DPHP5. Afterwards you may delete this file.
+#
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ # NOTE: Avoiding AddHandler/AddType for security (bug #538822)
+ # NOTE: Please read the related news item!
+ <FilesMatch "\.(php|php5|phtml)$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>