summaryrefslogtreecommitdiffstats
path: root/etc/rc.php_ini_setup
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-07-18 10:00:05 +0200
committersmos <seth.mos@dds.nl>2012-07-18 10:03:36 +0200
commit9d0be8275a000efba37bfc502e7ed56c117b9bec (patch)
treea380a41d1febf45be2d72e17d6a36c5a7f655b29 /etc/rc.php_ini_setup
parentd2cb157f6f4e1f52a2c5dfb650bab712714ba65f (diff)
downloadpfsense-9d0be8275a000efba37bfc502e7ed56c117b9bec.zip
pfsense-9d0be8275a000efba37bfc502e7ed56c117b9bec.tar.gz
Set the date.timezone from the XML directly when we setup PHP to prevent messages
Adjust the timeouts to something more sane then 99999999. Do note that these might need to be adjusted later. Also note that most of these are not applicable when used from the CLI. The maximum time limit is now 1 hour, execution time is 15 minutes and input time for post is 30 minutes (firmware upgrade) Redmine ticket #2552
Diffstat (limited to 'etc/rc.php_ini_setup')
-rwxr-xr-xetc/rc.php_ini_setup10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index 8c18b21..13edc1f 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -155,6 +155,9 @@ if [ -f /usr/local/lib/php.ini ]; then
fi
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=`cat /conf/config.xml | egrep -E '<timezone>(.*?)</timezone>' | awk -F'>' '{print $2}'|awk -F'<' '{print $1}'`
+
# Get a loaded module list in the stock php
# Populate a dummy php.ini to avoid
# the file being clobbered and the firewall
@@ -165,9 +168,9 @@ output_buffering = "0"
expose_php = Off
implicit_flush = true
magic_quotes_gpc = Off
-max_execution_time = 99999999
-max_input_time = 99999999
-set_time_limit = 0
+max_execution_time = 900
+max_input_time = 300
+set_time_limit = 3600
register_argc_argv = On
file_uploads = On
upload_tmp_dir = ${UPLOADTMPDIR}
@@ -182,6 +185,7 @@ display_errors=on
log_errors=on
error_log=/tmp/PHP_errors.log
extension_dir=${EXTENSIONSDIR}
+date.timezone="${TIMEZONE}"
; Extensions
OpenPOWER on IntegriCloud