Bolt-CMS没有显示图像(helios模板)

时间:2015-04-16 06:47:09

标签: image bolt-cms

我刚刚安装了Bolt-CMS,我没有太多时间学习整个CMS。我的所有图片都上传到"文件"甚至没有在仪表板上显示。他们被重命名为/1000x1000r/xxxx.xxx并且他们不会显示。任何人都可以告诉我发生了什么,在哪里配置,以便他们开始显示。

这是我的.htaccess代码。我根本没有修改过它:

# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Prevent directory listing
Options -Indexes

# Make sure MultiViews is disabled if available.
<IfModule mod_negotiation.c>
  Options -MultiViews
</IfModule>

<FilesMatch "\.(yml|db|twig|md)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
  </IfModule>
</FilesMatch>

<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteRule cache/ - [F]

  # Some servers require the RewriteBase to be set. If so, set to the correct folder.
  # RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ ./index.php [L]

</IfModule>


# set the correct mime type for woff2 font type
# =============================================
# if you don't set your own mimetypes or you aren't using
# HTML5 Boilerplate Server Configs https://github.com/h5bp/server-configs-apache
# then you can uncomment (delete the hash/pound/octothorpe/number symbol) the section below:

#<IfModule mod_mime.c>
#  AddType application/font-woff2    woff2
#</IfModule>

当我打开仪表板文件管理器时,我得到以下内容。图片不会显示在仪表板和我的网站上。

这是我的浏览器控制台日志:

files:757 GET http://localhost/www/bolt/thumbs/54x40c/analog-camera-photography-vintage-1844.jpg 500 (Internal Server Error)
files:757 GET http://localhost/www/bolt/thumbs/54x40c/alarm-clock-gold-hands-of-a-clock-1778.jpg 500 (Internal Server Error)
files:597 GET http://localhost/www/bolt/thumbs/54x40c/agriculture-cereals-field-621.jpg 500 (Internal Server Error)
files:918 GET http://localhost/www/bolt/thumbs/54x40c/apple-desk-iphone-2750.jpg 500 (Internal Server Error)
files:918 GET http://localhost/www/bolt/thumbs/54x40c/architecture-books-building-2757.jpg 500 (Internal Server Error)
files:1081 GET http://localhost/www/bolt/thumbs/54x40c/bell-bills-cash-register-2738.jpg 500 (Internal Server Error)
files:1856 GET http://localhost/www/bolt/app/view/js/maps/lib.min.js.map 404 (Not Found)
files:1 GET http://localhost/www/bolt/app/view/js/maps/bolt.min.js.map 404 (Not Found)
files:1081 GET http://localhost/www/bolt/thumbs/54x40c/blur-breakfast-coffee-271.jpg 500 (Internal Server Error)
files:1245 GET http://localhost/www/bolt/thumbs/54x40c/blur-flowers-home-1093.jpg 500 (Internal Server Error)
files:1245 GET http://localhost/www/bolt/thumbs/54x40c/building-frame-garage-1599.jpg 500 (Internal Server Error)
files:1406 GET http://localhost/www/bolt/thumbs/54x40c/california-foggy-golden-gate-bridge-2771.jpg 500 (Internal Server Error)
files:1406 GET http://localhost/www/bolt/thumbs/54x40c/carrot-cooking-eat-1398.jpg 500 (Internal Server Error)
files:1574 GET http://localhost/www/bolt/thumbs/54x40c/configure-disc-jockey-disco-1504.jpg 500 (Internal Server Error)
files:1574 GET http://localhost/www/bolt/thumbs/54x40c/food-fruit-orange-1286.jpg 500 (Internal Server Error)
files:1745 GET http://localhost/www/bolt/thumbs/54x40c/garden-gardening-grass-589.jpg 500 (Internal Server Error)
files:1819 GET http://localhost/www/bolt/thumbs/54x40c/keyboard-old-technology-2318.jpg 500 (Internal Server Error)

3 个答案:

答案 0 :(得分:7)

简单修复。这里是。首先,您需要确保在.htaccess文件中取消注释该行   #RewriteBase / 并设置为本地站点文件夹。 HTACCESS文件已有详细记录,但可能会错过这个评论。将站点迁移到生产环境后,请不要忘记需要修复此值。

如果缩略图未显示则表示您的php环境需要文件扩展名才能显示文件信息。查找并取消注释该行 延长= php_fileinfo.dll 重启Apache,你很高兴!

答案 1 :(得分:0)

听起来图像上传得很好,但缩略图没有显示。在这种情况下,它可能是重写的问题。如果您正在使用Apache,请检查您是否有.htaccess文件。如果您正在使用nginx see this Github ticket寻求帮助。

答案 2 :(得分:0)

这些问题中有99%是由沿线某处的错误权限引起的。

当您请求/ thumbs / xxx样式URL时,Web服务器需要能够:

  1. 阅读原始文件(files / xxxx.jpg)
  2. 将创建的缩略图写入缓存目录(app / cache / xxxx)
  3. 如果config.yml中的save_files为true,则可以选择将缩略图的副本复制到/ thumbs文件夹。
  4. 对于这些文件夹, Web服务器将需要文件夹的读/写/执行权限。检查一下,看看它是否排序。