summaryrefslogtreecommitdiff
path: root/app-eselect/eselect-php/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-eselect/eselect-php/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-eselect/eselect-php/files')
-rw-r--r--app-eselect/eselect-php/files/70_mod_php5.backcompat.conf28
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher7
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher-r213
-rw-r--r--app-eselect/eselect-php/files/php-fpm.conf1
4 files changed, 49 insertions, 0 deletions
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>
diff --git a/app-eselect/eselect-php/files/php-fpm-launcher b/app-eselect/eselect-php/files/php-fpm-launcher
new file mode 100644
index 000000000000..7a1c1c9f918b
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PHPSLOT="${1}"
+[ -z "${PHPSLOT}" ] && PHPSLOT="$(eselect php show fpm)"
+shift
+
+exec /usr/lib/${PHPSLOT}/bin/php-fpm "${@}"
diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r2 b/app-eselect/eselect-php/files/php-fpm-launcher-r2
new file mode 100644
index 000000000000..3a6b2720fa67
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r2
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /lib/gentoo/functions.sh
+
+# If there are no arguments, then "shift" will fail (bug 626496).
+if [ $# -eq 0 ]; then
+ PHP_SLOT=$(eselect php show fpm)
+else
+ PHP_SLOT=$1
+ shift
+fi
+
+exec "/usr/$(get_libdir)/${PHP_SLOT}/bin/php-fpm" "${@}"
diff --git a/app-eselect/eselect-php/files/php-fpm.conf b/app-eselect/eselect-php/files/php-fpm.conf
new file mode 100644
index 000000000000..801e74f1e620
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm.conf
@@ -0,0 +1 @@
+d /run/php-fpm 755 root root