Skip to content

Commit 61bd1f9

Browse files
committed
- Implemented FS#2653 - Set TMP, TMPDIR and TEMP environment variable.
1 parent a4a4eaa commit 61bd1f9

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

server/conf/php-cgi-starter.master

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
export PHPRC="<tmpl_var name='php_ini_path'>"
55
</tmpl_if>
66

7+
export TMP=<tmpl_var name='document_root'>/tmp
8+
export TMPDIR=<tmpl_var name='document_root'>/tmp
9+
export TEMP=<tmpl_var name='document_root'>/tmp
10+
711
exec <tmpl_var name='php_cgi_bin'> \
812
-d open_basedir=<tmpl_var name='open_basedir'> \
913
-d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \

server/conf/php-fcgi-starter.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export PHP_DOCUMENT_ROOT
99
# export PHP_FCGI_CHILDREN
1010
PHP_FCGI_MAX_REQUESTS=<tmpl_var name='php_fcgi_max_requests'>
1111
export PHP_FCGI_MAX_REQUESTS
12+
export TMP=<tmpl_var name='document_root'>/tmp
13+
export TMPDIR=<tmpl_var name='document_root'>/tmp
14+
export TEMP=<tmpl_var name='document_root'>/tmp
1215
exec <tmpl_var name='php_fcgi_bin'> \
1316
<tmpl_if name="security_level" op="==" value="20"> -d open_basedir="<tmpl_var name='open_basedir'>" \
1417
-d disable_functions="" \

server/conf/php_fpm_pool.conf.master

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ pm.max_requests = <tmpl_var name='pm_max_requests'>
2828

2929
chdir = /
3030

31+
env[TMP] = <tmpl_var name='document_root'>/tmp
32+
env[TMPDIR] = <tmpl_var name='document_root'>/tmp
33+
env[TEMP] = <tmpl_var name='document_root'>/tmp
34+
3135
<tmpl_if name='security_level' op='==' value='20'>
3236
<tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
3337
php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp

server/conf/vhost.conf.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@
204204
<tmpl_if name='php' op='==' value='mod'>
205205
# mod_php enabled
206206
AddType application/x-httpd-php .php .php3 .php4 .php5
207+
SetEnv TMP <tmpl_var name='document_root'>/tmp
208+
SetEnv TMPDIR <tmpl_var name='document_root'>/tmp
209+
SetEnv TEMP <tmpl_var name='document_root'>/tmp
207210
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
208211
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
209212
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp

0 commit comments

Comments
 (0)