From 3256e66d4b3769eee47b8a6ef377fa8f61407a66 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 31 May 2015 21:09:39 +0200 Subject: [PATCH] rc: a bit more pruning; we know what we are doing! --- src/etc/rc.php_ini_setup | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup index f38af5e9d..31b04dd3f 100755 --- a/src/etc/rc.php_ini_setup +++ b/src/etc/rc.php_ini_setup @@ -34,19 +34,16 @@ fi # Define php modules. Do not add .so, it will # be done automatically by the script below. -PHPMODULES="standard" + # Config read/write -PHPMODULES="$PHPMODULES dom xml simplexml" +PHPMODULES="dom xml simplexml" # Downloading via HTTP/FTP (pkg mgr, etc) -PHPMODULES="$PHPMODULES curl date" +PHPMODULES="$PHPMODULES curl" # Internationalization PHPMODULES="$PHPMODULES gettext" # User manager PHPMODULES="$PHPMODULES ldap openssl pcntl" -PHPMODULES="$PHPMODULES hash" -PHPMODULES="$PHPMODULES mcrypt" -# Regexs, PERL style! -PHPMODULES="$PHPMODULES pcre" +PHPMODULES="$PHPMODULES hash mcrypt" # Login sessions PHPMODULES="$PHPMODULES session" # Extra sanity seatbelts @@ -58,7 +55,6 @@ PHPMODULES="$PHPMODULES mbstring" # Page compression PHPMODULES="$PHPMODULES zlib" # SQLlite & Database -PHPMODULES="$PHPMODULES spl" PHPMODULES="$PHPMODULES pdo" PHPMODULES="$PHPMODULES pdo_sqlite" PHPMODULES="$PHPMODULES sqlite3" @@ -81,8 +77,6 @@ rm -f /usr/local/etc/php/extensions.ini rm -f /usr/local/etc/php.ini rm -f /usr/local/lib/php.ini -LOADED_MODULES=`/usr/local/bin/php -m | /usr/bin/grep -v "\["` - # Fetch the timezone from the XML and set it here. We set it later too in the running scripts TIMEZONE=Etc/UTC if [ -f /conf/config.xml ]; then @@ -122,20 +116,9 @@ date.timezone="${TIMEZONE}" EOF # Loop through and generate modules to load. -# Take into account modules built into php. -for EXT in $PHPMODULES; do - SHOULDADD="true" - # Check to see if module is compiled into php statically - for LM in $LOADED_MODULES; do - if [ "$EXT" = "$LM" ]; then - SHOULDADD="false" - fi - done - if [ "$SHOULDADD" = "true" ]; then - # Ensure extension exists before adding. - if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then - echo "extension=${EXT}.so" >> /usr/local/etc/php/extensions.ini - fi +for EXT in ${PHPMODULES}; do + if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then + echo "extension=${EXT}.so" >> /usr/local/etc/php/extensions.ini fi done