summaryrefslogtreecommitdiffstats
path: root/etc/rc.php_ini_setup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-22 23:38:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-22 23:38:42 +0000
commit0804f51508d65ecd02b974c59407c3f1629e4df8 (patch)
treee52e493a3826c886f4f26374c65f8fffc45ad8ba /etc/rc.php_ini_setup
parent2ed3203cd26e42efbe830b5fee848a2e9ebada05 (diff)
downloadpfsense-0804f51508d65ecd02b974c59407c3f1629e4df8.zip
pfsense-0804f51508d65ecd02b974c59407c3f1629e4df8.tar.gz
* Make PHP extensions directory a variable
* Check to ensure that each needed extension exists before adding to php.ini
Diffstat (limited to 'etc/rc.php_ini_setup')
-rwxr-xr-xetc/rc.php_ini_setup10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index 4df3d76..9bd6df5 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -2,6 +2,7 @@
# Set our operating platform
PLATFORM=`cat /etc/platform`
+EXTENSIONSDIR="/usr/local/lib/php/20060613/"
PHPMODULES="apc \
bcmath \
@@ -56,7 +57,7 @@ zlib.output_compression = On
zlib.output_compression_level = 1
include_path = ".:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg"
uploadprogress.file.filename_template = /tmp/uploadprogress_%s.txt
-extension_dir=/usr/local/lib/php/20060613/
+extension_dir=${EXTENSIONSDIR}
; Extensions
EOF
@@ -71,7 +72,12 @@ for EXT in $PHPMODULES; do
fi
done
if [ "$SHOULDADD" = "true" ]; then
- echo "extension=${EXT}.so" >> /usr/local/lib/php.ini
+ if [ -f "${EXTENSIONSDIR}/${EXT}.so" ]; then
+ echo "extension=${EXT}.so" >> /usr/local/lib/php.ini
+ else
+ echo ">>> WARNING! Could not locate ${EXTENSIONSDIR}/${EXT}.so"
+ echo ">>> WARNING! Could not locate ${EXTENSIONSDIR}/${EXT}.so <<< " | logger -p daemon.info -i -t rc.php_ini_setup
+ fi
fi
done
OpenPOWER on IntegriCloud