summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-06-20 18:53:57 -0400
committerScott Ullrich <sullrich@gmail.com>2011-06-20 18:53:57 -0400
commit8ef700da28a954c3233bc96c142e64afce1bd1b9 (patch)
tree3b0f9105ab218ba6a9050768dca6b0c3d1b9ee4d /etc
parentc76ce920982ea0549ff88f4df99db3e4b05d0816 (diff)
downloadpfsense-8ef700da28a954c3233bc96c142e64afce1bd1b9.zip
pfsense-8ef700da28a954c3233bc96c142e64afce1bd1b9.tar.gz
Add 'dynamodules' for zend_extension and zend_extension_ts. /etc/php_dynamodules_zend and /etc/php_dynamodules_zend_ts directories
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.php_ini_setup31
1 files changed, 31 insertions, 0 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index 5a138ed..657c2d4 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -117,6 +117,9 @@ PHPMODULES="$PHPMODULES ssh2"
# pfSense extensions
PHPMODULES="$PHPMODULES pfSense"
+PHP_ZEND_MODULES=""
+PHP_ZEND_MODULES_TS=""
+
# Modules previously included.
# can be turned on by touching
# /etc/php_dynamodules/$modulename
@@ -183,6 +186,18 @@ if [ -d /etc/php_dynamodules ]; then
PHPMODULES="$PHPMODULES $DYNA_MODULES"
fi
+# Read in zend modules
+if [ -d /etc/php_dynamodules_zend ]; then
+ DYNA_MODULES=`/bin/ls /etc/php_dynamodules/`
+ PHP_ZEND_MODULES="$PHP_ZEND_MODULES $DYNA_MODULES"
+fi
+
+# Read in zend threaded modules
+if [ -d /etc/php_dynamodules_zend_ts ]; then
+ DYNA_MODULES=`/bin/ls /etc/php_dynamodules/`
+ PHP_ZEND_MODULES_TS="$PHP_ZEND_MODULES $DYNA_MODULES"
+fi
+
# Loop through and generate modules to load.
# Take into account modules built into php.
for EXT in $PHPMODULES; do
@@ -201,6 +216,22 @@ for EXT in $PHPMODULES; do
fi
done
+# Zend modules
+for EXT in $PHP_ZEND_MODULES; do
+ # Ensure extension exists before adding.
+ if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
+ echo "zend_extension=${EXT}.so" >> /usr/local/lib/php.ini
+ fi
+done
+
+# Zend threaded modules
+for EXT in $PHP_ZEND_MODULES_TS; do
+ # Ensure extension exists before adding.
+ if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
+ echo "zend_extension_ts=${EXT}.so" >> /usr/local/lib/php.ini
+ fi
+done
+
# Get amount of ram installed on this system
RAM=`/sbin/sysctl hw.realmem | /usr/bin/awk '{print $2/1000000}' | /usr/bin/awk -F '.' '{print $1}'`
export RAM
OpenPOWER on IntegriCloud