From 706d2804e134b29047ca14eb874d890b5729201f Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 5 Aug 2016 07:32:42 +0200 Subject: [PATCH] rc: scrub extensions.ini writing following a FreeBSD ports change We don't have to do anything here anymore. Since we started using pkg(8) the extensions.ini was always consistent, but we needed to make sure that the order is correct. Some more cleverness was added to no prevent other PHP modules from simply "plugging in", but since they are not in one extensions.ini anymore it won't matter. Expecting some splatter during upgrade, but hopefully also no more php-suhosin clashes with php56-session not loaded. :) --- src/etc/rc.php_ini_setup | 53 ---------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup index 70e5e130563..95d2ad9e08b 100755 --- a/src/etc/rc.php_ini_setup +++ b/src/etc/rc.php_ini_setup @@ -36,46 +36,6 @@ else exit 1 fi -# Define php modules. Do not add .so, it will -# be done automatically by the script below. - -# Config read/write -PHPMODULES="dom xml simplexml" -# Downloading via HTTP/FTP (pkg mgr, etc) -PHPMODULES="$PHPMODULES curl" -# Internationalization -PHPMODULES="$PHPMODULES gettext" -# User manager -PHPMODULES="$PHPMODULES ldap openssl" -PHPMODULES="$PHPMODULES hash mcrypt" -# Socket magic -PHPMODULES="$PHPMODULES sockets" -# Login sessions -PHPMODULES="$PHPMODULES session" -# Extra sanity seatbelts -PHPMODULES="$PHPMODULES suhosin" -# Firewall rules edit -PHPMODULES="$PHPMODULES ctype" -# Page compression -PHPMODULES="$PHPMODULES zlib" -# Databases -PHPMODULES="$PHPMODULES sqlite3" -# RADIUS -PHPMODULES="$PHPMODULES radius" -# json -PHPMODULES="$PHPMODULES json" -# filter -PHPMODULES="$PHPMODULES filter" -# MVC framework -PHPMODULES="$PHPMODULES pdo phalcon" - -_EXTENSIONS_INI=$(mktemp -q /tmp/extensions_ini.XXXXXX) -EXTENSIONS_INI=/usr/local/etc/php/extensions.ini - -touch ${EXTENSIONS_INI} -cp ${EXTENSIONS_INI} ${_EXTENSIONS_INI} -chmod 644 ${_EXTENSIONS_INI} - # Clear the .ini files in preparation for the rewrite rm -f /usr/local/etc/php/extensions.ini rm -f /usr/local/etc/php.ini @@ -121,17 +81,8 @@ extension_dir=${EXTENSIONSDIR} date.timezone="${TIMEZONE}" EOF -# Loop through and generate modules to load. -for EXT in ${PHPMODULES}; do - sed -i '' -e "/${EXT}.so/d" ${_EXTENSIONS_INI} - echo "extension=${EXT}.so" >> ${_EXTENSIONS_INI} -done - # Enable XDebug if installed if [ -f "${EXTENSIONSDIR}xdebug.so" ]; then - sed -i '' -e "/xdebug.so/d" ${_EXTENSIONS_INI} - echo "zend_extension=${EXTENSIONSDIR}xdebug.so" >> ${_EXTENSIONS_INI} - cat >> /usr/local/lib/php.ini << EOF [xdebug] @@ -162,7 +113,3 @@ EOF # Copy php.ini file to etc/ too (cli) cp /usr/local/lib/php.ini /usr/local/etc/php.ini -if [ ! -f /usr/local/etc/php/ext-20-gettext.ini ]; then - # Only needs a copy for FreeBSD's old style PHP module register - mv ${_EXTENSIONS_INI} ${EXTENSIONS_INI} -fi