Fetch public templates as files returns Parse Error for Amazon S3 Location

Marcus

Well-known member
I put my internal and external Data in the Amazon S3 cloud and everything runs great. xenForo also saves "Fetch public templates as files" perfectly in the right bucket. But when xenForo fetches the (completely identical with local installation) public templates from Amazon, it does not stop complaining. This is what I see for the stylesheet page
Code:
Parse error: syntax error, unexpected end of file, expecting  ','  or ')' in
s3://s3bucket/internal_data/templates/S.0,L.0,xenforo.css.php on line 2276"
Code:
$__compilerVar16 = '';
$__output .= $this->callTemplateHook('xenforo_css_extra', $__compilerVar16, array());
unset($__compilerVar16);// line 2276 and last line of file
which is a perfectly written down public template, here is the working one on the local server which is absolutely identical:
Code:
$__compilerVar16 = '';
$__output .= $this->callTemplateHook('xenforo_css_extra', $__compilerVar16, array());
unset($__compilerVar16);// line 2276 and last line of file


and the forum index.php results in
Code:
Parse error: syntax error, unexpected '',' (T_CONSTANT_ENCAPSED_STRING), expecting
')' in s3://s3bucket/internal_data/templates/S.1,L.1,PAGE_CONTAINER.php on line 774"
The only exception is admin.php?_css/&css=splash which returns the stylesheet perfectly.
 
Last edited:
DO NOT DO THIS.

If it worked it would kill performance since your server would need to request dozens of files from amazon every page load.
 
Thanks md_5, I wonder how I can tell xenforo to use internal_data from Amazon, but internal_data/templates from local server.
 
You set the paths in config.php.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180456


How do I change the internal data path from the default of internal_data?
Edit the library/config.php file and add the following:
PHP:
$config['internalDataPath'] = 'new_internal_data_path';
Change the path to suit.
Note that the path is relative to the installation path.


How do I change the external data path from the default of data?
Edit the library/config.php file and add the following:
PHP:
$config['externalDataPath'] = 'new_external_data_path';
$config['externalDataUrl'] = 'new_external_data_url';
Change the paths to suit.
Note that the path is a file path (it can be relative to the installation path) and the URL is how the data will be loaded by users. These values need to point to corresponding locations.
 
Thanks, I already set internalDataPath. The problem I face here is that I would like to set internalDataPathTemplates which is not possible by default I guess.

My current setup inspired from the ign.com server administrator is perfect, it is a very easy one and it only consists of less than 10 lines of code (including the configuration setting you kindly pointed out to me, and including my minimal addon). My setup currently fetches all data and internal_data from Amazon S3. The problem is that xenforo is kind of unwilling to do something useful with the perfectly stored internal_data/template pre-compiled templates. It's possible that the huge lag is giving xenforo a hard time.
 
Top Bottom