jkilbride
Member
I'm running Xenforo in an AWS autoscaling group with the data and internal_data directories located on an EFS (NFS) mount. I'm working on upgrading our system from 1.5.21 to 2.0.7 and I noticed new code_cache and temp directories inside internal_data. I'm assuming that it would be better to put these on the local filesystem -- please correct me if I'm wrong. I have added the following to my config.php file:
However, when I do this the forum and admin pages pull up blank with no errors anywhere. The /tmp/xenforo/code_cache directory is created along with an index.html file, so file permissions aren't a problem. I even manually changed the permissions to 777 (world read/write) and it didn't make a difference. The server is returning a 200 http code, even though the pages are completely blank:
Notice the zero response length after the 200 response code. Am I missing some other configuration? Has anyone successfully changed the code_cache and temp file paths? I'm working with a freshly installed v2.0.7 inside a local Docker development environment using a Redis cache. Literally, no other changes - no posts, only the admin user, etc... Here's my full config file:
Everything works correctly when I remove the codeCachePath and tempDataPath settings. Any help / insight would be appreciated. Thanks!
PHP:
// Put code_cache and temp directories in local /tmp
$config['codeCachePath'] = '/tmp/xenforo/code_cache';
$config['tempDataPath'] = '/tmp/xenforo/temp';
However, when I do this the forum and admin pages pull up blank with no errors anywhere. The /tmp/xenforo/code_cache directory is created along with an index.html file, so file permissions aren't a problem. I even manually changed the permissions to 777 (world read/write) and it didn't make a difference. The server is returning a 200 http code, even though the pages are completely blank:
Code:
172.19.0.1 - - [05/Jul/2018:18:48:15 +0000] "GET /index.php HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:61.0) Gecko/20100101 Firefox/61.0" "-"
172.19.0.1 - - [05/Jul/2018:18:48:45 +0000] "GET /admin.php HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:61.0) Gecko/20100101 Firefox/61.0" "-"
Notice the zero response length after the 200 response code. Am I missing some other configuration? Has anyone successfully changed the code_cache and temp file paths? I'm working with a freshly installed v2.0.7 inside a local Docker development environment using a Redis cache. Literally, no other changes - no posts, only the admin user, etc... Here's my full config file:
PHP:
<?php
$config['db']['host'] = $_SERVER['DB_ENDPOINT'];
$config['db']['port'] = '3306';
$config['db']['username'] = $_SERVER['DB_USER'];
$config['db']['password'] = $_SERVER['DB_PASS'];
$config['db']['dbname'] = $_SERVER['DB_NAME'];
// Caching with Redis
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
'host' => $_SERVER['REDIS_HOST'],
'port' => $_SERVER['REDIS_PORT'],
'database' => $_SERVER['REDIS_DB']
];
$config['cache']['sessions'] = true;
$config['fullUnicode'] = true;
// Put code_cache and temp directories in local /tmp
$config['codeCachePath'] = '/tmp/xenforo/code_cache';
$config['tempDataPath'] = '/tmp/xenforo/temp';
Everything works correctly when I remove the codeCachePath and tempDataPath settings. Any help / insight would be appreciated. Thanks!