I have setup an asset pool for all files our customer wants to upload using {basePath} and {baseUrl} variables which are defined in the configuration file.
- Uploading files works
- Selecting files to assign them to content works
- displaying the files on the front page works
- thumbnail generation in the backend does not work - returning 404 for the resized url
- custom transforms for thumbnails on the front page do not work - 0-byte images get created which are of course empty
Nothing gets logged in the errorlog - everything seems to work fine.
I'm kind of lost currently - Project working nicely local but not on our server. Any help on how to debug and solve this problem? Looks like an inconsistency problem inside of craft as some methods are accessing the assets correctly while others don't.
Here some files:
general.php
<?php return [
'allowAutoUpdates' => false, // Using shared craft, disable update triggering for customer - TODO: Completely hide update stuff in backend.
'omitScriptNameInUrls' => true,
'environmentVariables' => [
'baseUrl' => CRAFT_SITE_URL,
'basePath' => CRAFT_SITE_PATH
]
];
index.php
<?php
define('CRAFT_CONFIG_PATH', 'assets/configs/');
define('CRAFT_PLUGINS_PATH', 'assets/plugins/');
define('CRAFT_TEMPLATES_PATH', 'assets/templates/');
define('CRAFT_TRANSLATIONS_PATH', 'assets/translations/');
define('CRAFT_STORAGE_PATH', 'cache/');
define('CRAFT_SITE_URL', substr($_SERVER['SCRIPT_NAME'], 0, -9));
define('CRAFT_SITE_PATH', substr(__FILE__, 0, -9));
require '../_craft/app/index.php';
.htaccess
# Compression
SetOutputFilter DEFLATE
RewriteEngine On
# No duplicate rewriting.
#TODO Remove and use [END] when Apache 2.4 is available on production.
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]
# Sass and JavaScript compilation and minification - except for admin backend.
RewriteCond %{REQUEST_URI} !admin/ [NC]
RewriteRule \.css$ scss.php [L]
RewriteCond %{REQUEST_URI} !admin/ [NC]
RewriteRule \.js$ js.php [L]
# Make bootstrap fonts available.
RewriteRule ^assets/bootstrap/(.+)$ vendor/twbs/bootstrap-sass/assets/fonts/bootstrap/$1 [L]
# Let craft handle everything else.
RewriteRule ^assets/icons/ - [L]
RewriteRule ^assets/images/ - [L]
RewriteRule .* index.php [L]
Both Environments have Imagick and GD available.
Environment Development: Ubuntu, Apache 2.4, PHP 5.6, MySQL 5.6
Environment Production: Debian, Apache 2.2, PHP 5.5, MySQL 5.5