Commit 3256e66d authored by Franco Fichtner's avatar Franco Fichtner

rc: a bit more pruning; we know what we are doing!

parent a173ea37
...@@ -34,19 +34,16 @@ fi ...@@ -34,19 +34,16 @@ fi
# Define php modules. Do not add .so, it will # Define php modules. Do not add .so, it will
# be done automatically by the script below. # be done automatically by the script below.
PHPMODULES="standard"
# Config read/write # Config read/write
PHPMODULES="$PHPMODULES dom xml simplexml" PHPMODULES="dom xml simplexml"
# Downloading via HTTP/FTP (pkg mgr, etc) # Downloading via HTTP/FTP (pkg mgr, etc)
PHPMODULES="$PHPMODULES curl date" PHPMODULES="$PHPMODULES curl"
# Internationalization # Internationalization
PHPMODULES="$PHPMODULES gettext" PHPMODULES="$PHPMODULES gettext"
# User manager # User manager
PHPMODULES="$PHPMODULES ldap openssl pcntl" PHPMODULES="$PHPMODULES ldap openssl pcntl"
PHPMODULES="$PHPMODULES hash" PHPMODULES="$PHPMODULES hash mcrypt"
PHPMODULES="$PHPMODULES mcrypt"
# Regexs, PERL style!
PHPMODULES="$PHPMODULES pcre"
# Login sessions # Login sessions
PHPMODULES="$PHPMODULES session" PHPMODULES="$PHPMODULES session"
# Extra sanity seatbelts # Extra sanity seatbelts
...@@ -58,7 +55,6 @@ PHPMODULES="$PHPMODULES mbstring" ...@@ -58,7 +55,6 @@ PHPMODULES="$PHPMODULES mbstring"
# Page compression # Page compression
PHPMODULES="$PHPMODULES zlib" PHPMODULES="$PHPMODULES zlib"
# SQLlite & Database # SQLlite & Database
PHPMODULES="$PHPMODULES spl"
PHPMODULES="$PHPMODULES pdo" PHPMODULES="$PHPMODULES pdo"
PHPMODULES="$PHPMODULES pdo_sqlite" PHPMODULES="$PHPMODULES pdo_sqlite"
PHPMODULES="$PHPMODULES sqlite3" PHPMODULES="$PHPMODULES sqlite3"
...@@ -81,8 +77,6 @@ rm -f /usr/local/etc/php/extensions.ini ...@@ -81,8 +77,6 @@ rm -f /usr/local/etc/php/extensions.ini
rm -f /usr/local/etc/php.ini rm -f /usr/local/etc/php.ini
rm -f /usr/local/lib/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 # Fetch the timezone from the XML and set it here. We set it later too in the running scripts
TIMEZONE=Etc/UTC TIMEZONE=Etc/UTC
if [ -f /conf/config.xml ]; then if [ -f /conf/config.xml ]; then
...@@ -122,20 +116,9 @@ date.timezone="${TIMEZONE}" ...@@ -122,20 +116,9 @@ date.timezone="${TIMEZONE}"
EOF EOF
# Loop through and generate modules to load. # Loop through and generate modules to load.
# Take into account modules built into php. for EXT in ${PHPMODULES}; do
for EXT in $PHPMODULES; do if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
SHOULDADD="true" echo "extension=${EXT}.so" >> /usr/local/etc/php/extensions.ini
# 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
fi fi
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment