diff options
-rwxr-xr-x | etc/rc.php_ini_setup | 31 |
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 |