From ce600535776fdd03600b9c7c44bad4559c900268 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sun, 25 Nov 2007 18:27:56 +0000 Subject: php: added one mod_php.conf for each php and distro version git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1474 370017ae-e619-0410-ac65-c121f96126d4 --- patches/php/conf/mod_php4-apache1.3.conf.example | 12 ++++++++++++ patches/php/conf/mod_php4.conf.example | 12 ------------ patches/php/conf/mod_php5-apache1.3.conf.example | 12 ++++++++++++ patches/php/conf/mod_php5-apache2.conf.example | 12 ++++++++++++ patches/php/conf/mod_php5.conf.example | 12 ------------ patches/php/php.SlackBuild | 12 +++++++++++- 6 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 patches/php/conf/mod_php4-apache1.3.conf.example delete mode 100644 patches/php/conf/mod_php4.conf.example create mode 100644 patches/php/conf/mod_php5-apache1.3.conf.example create mode 100644 patches/php/conf/mod_php5-apache2.conf.example delete mode 100644 patches/php/conf/mod_php5.conf.example (limited to 'patches') diff --git a/patches/php/conf/mod_php4-apache1.3.conf.example b/patches/php/conf/mod_php4-apache1.3.conf.example new file mode 100644 index 00000000..7adf6e0b --- /dev/null +++ b/patches/php/conf/mod_php4-apache1.3.conf.example @@ -0,0 +1,12 @@ +# +# mod_php - PHP Hypertext Preprocessor module +# + +# Load the PHP module: +LoadModule php4_module libexec/apache/libphp4.so + +# Tell Apache to feed all *.php files through the PHP module: +AddType application/x-httpd-php .php + +# This will display PHP files in colored syntax form. Use with caution. +#AddType application/x-httpd-php-source .phps diff --git a/patches/php/conf/mod_php4.conf.example b/patches/php/conf/mod_php4.conf.example deleted file mode 100644 index 7adf6e0b..00000000 --- a/patches/php/conf/mod_php4.conf.example +++ /dev/null @@ -1,12 +0,0 @@ -# -# mod_php - PHP Hypertext Preprocessor module -# - -# Load the PHP module: -LoadModule php4_module libexec/apache/libphp4.so - -# Tell Apache to feed all *.php files through the PHP module: -AddType application/x-httpd-php .php - -# This will display PHP files in colored syntax form. Use with caution. -#AddType application/x-httpd-php-source .phps diff --git a/patches/php/conf/mod_php5-apache1.3.conf.example b/patches/php/conf/mod_php5-apache1.3.conf.example new file mode 100644 index 00000000..e46a5b10 --- /dev/null +++ b/patches/php/conf/mod_php5-apache1.3.conf.example @@ -0,0 +1,12 @@ +# +# mod_php - PHP Hypertext Preprocessor module +# + +# Load the PHP module: +LoadModule php5_module libexec/apache/libphp5.so + +# Tell Apache to feed all *.php files through the PHP module: +AddType application/x-httpd-php .php + +# This will display PHP files in colored syntax form. Use with caution. +#AddType application/x-httpd-php-source .phps diff --git a/patches/php/conf/mod_php5-apache2.conf.example b/patches/php/conf/mod_php5-apache2.conf.example new file mode 100644 index 00000000..2707a2be --- /dev/null +++ b/patches/php/conf/mod_php5-apache2.conf.example @@ -0,0 +1,12 @@ +# +# mod_php - PHP Hypertext Preprocessor module +# + +# Load the PHP module: +LoadModule php5_module lib/httpd/modules/libphp5.so + +# Tell Apache to feed all *.php files through the PHP module: +AddType application/x-httpd-php .php + +# This will display PHP files in colored syntax form. Use with caution. +#AddType application/x-httpd-php-source .phps diff --git a/patches/php/conf/mod_php5.conf.example b/patches/php/conf/mod_php5.conf.example deleted file mode 100644 index e46a5b10..00000000 --- a/patches/php/conf/mod_php5.conf.example +++ /dev/null @@ -1,12 +0,0 @@ -# -# mod_php - PHP Hypertext Preprocessor module -# - -# Load the PHP module: -LoadModule php5_module libexec/apache/libphp5.so - -# Tell Apache to feed all *.php files through the PHP module: -AddType application/x-httpd-php .php - -# This will display PHP files in colored syntax form. Use with caution. -#AddType application/x-httpd-php-source .phps diff --git a/patches/php/php.SlackBuild b/patches/php/php.SlackBuild index d91cf9a2..4240d7a1 100755 --- a/patches/php/php.SlackBuild +++ b/patches/php/php.SlackBuild @@ -538,7 +538,17 @@ fi mkdir -p $PKG/etc/apache cp -a php.ini-dist php.ini-recommended $PKG/etc/apache -cp -a $CWD/mod_php$PHP_SERIES.conf.example $PKG/etc/apache/mod_php.conf.example + +if [ "$PHP_SERIES" == "5" ]; then + if (( `default_version` >= 120 )); then + cp -a $CWD/mod_php$PHP_SERIES-apache2.conf.example $PKG/etc/apache/mod_php.conf.example + else + cp -a $CWD/mod_php$PHP_SERIES-apache1.3.conf.example $PKG/etc/apache/mod_php.conf.example + fi +else + cp -a $CWD/mod_php$PHP_SERIES-apache1.3.conf.example $PKG/etc/apache/mod_php.conf.example +fi + chmod 644 $PKG/etc/apache/* chown root:root $PKG/etc/apache/* -- cgit v1.2.3