Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 046c867

Browse files
committed
Merge pull request #68 from jdeathe/issue/63.2
ISSUE 63: Update environment variable name in php-wrapper.
2 parents d1faecf + d731b10 commit 046c867

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

var/www/app-bin/php-wrapper

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source /etc/apache-bootstrap.conf
55
# Allow PHP settings to be varied by passing a parameter to php-wrapper
66
PHP_VERSION=$1
77
PHP_WRAPPER_MODE=$2
8+
89
# VirtualHost specific options can be used to override the PHP options set in the wrapper
910
PHP_VHOST_OPTIONS=$3
1011

@@ -56,15 +57,15 @@ if [[ ${DB_MYSQL_PORT_3306_TCP_PORT} == '${DB_MYSQL_PORT_3306_TCP_PORT}' ]]; the
5657
export DB_MYSQL_PORT_3306_TCP_PORT=
5758
fi
5859

59-
export TMP="${APP_HOME_DIR}/var/tmp"
60+
export TMP="${APACHE_CONTENT_ROOT}/var/tmp"
6061
export TEMP=${TMP}
6162
export TMPDIR=${TMP}
6263

6364
# PHP Configuration Options that may need to be customised for different app features
6465

6566
## Important: Make sure you do not add spaces in this setting
6667
PHP_OPTIONS_DISABLE_FUNCTIONS="system,exec,passthru,shell_exec,proc_open,show_source,popen,pcntl_fork,pcntl_exec,escapeshellarg,escapeshellcmd,openlog,closelog,uname,php_uname"
67-
PHP_OPTIONS_OPEN_BASE_DIR="${APP_HOME_DIR}/"
68+
PHP_OPTIONS_OPEN_BASE_DIR="${APACHE_CONTENT_ROOT}"
6869

6970
PHP_OPTIONS_MEMORY_LIMIT="32M"
7071
PHP_OPTIONS_POST_MAX_SIZE="32M"
@@ -119,8 +120,8 @@ esac
119120

120121
PHP_OPTIONS="
121122
-d disable_functions=${PHP_OPTIONS_DISABLE_FUNCTIONS}
122-
-d open_basedir=${APP_HOME_DIR}
123-
-d include_path=${APP_HOME_DIR}
123+
-d open_basedir=${APACHE_CONTENT_ROOT}
124+
-d include_path=${APACHE_CONTENT_ROOT}
124125
-d expose_php=Off
125126
-d allow_url_fopen=Off
126127
-d magic_quotes_sybase=Off
@@ -133,13 +134,13 @@ PHP_OPTIONS="
133134
-d mysqli.reconnect=On
134135
-d register_globals=Off
135136
-d default_charset=UTF-8
136-
-d date.timezone=UTC
137+
-d date.timezone=${PHP_OPTIONS_DATE_TIMEZONE:-UTC}
137138
-d error_reporting=${PHP_OPTIONS_ERROR_REPORTING}
138139
-d display_errors=${PHP_OPTIONS_DISPLAY_ERRORS}
139140
-d log_errors=On
140-
-d error_log=${APP_HOME_DIR}/var/log/php_error_log
141+
-d error_log=${APACHE_CONTENT_ROOT}/var/log/php_error_log
141142
-d html_errors=${PHP_OPTIONS_HTML_ERRORS}
142-
-d session.save_path=${APP_HOME_DIR}/var/session
143+
-d session.save_path=${APACHE_CONTENT_ROOT}/var/session
143144
-d session.name=app-session
144145
-d session.cookie_httponly=1
145146
-d session.hash_function=sha256

0 commit comments

Comments
 (0)