Forum

Thread tagged as: Problem, Addons

Images not uploading on Blog posts, ok locally.

I can upload images fine within my local dev site, but when adding them on the staging server the image starts uploading and then no thumbnail populates in the assets panel, Resources folder is writable, any idea what could be causing this?

Thanks

Diagnostics and template were taken directly from the staging server…

Diagnostics

Perch: 2.8.8
Production mode: Production (100)
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_blog (4.6), perch_forms (1.8.3)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: cfcc41f2eff065c9594842ef7e1f2d1a
L1: 2de5778bd08390ec2c535d61c34009b2
headerColour: #2a95cd
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.8: done
latest_version: 2.8.8
on_sale_version: 2.8.8
headerScheme: dark
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_update: 5.0
perch_blog_post_url: /blog/{postSlug}
perch_blog_slug_format: {postTitle}
perch_blog_akismet_key: ******
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
logoPath: /admin/resources/admin-logo.png
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: ******
PERCH_DB_SERVER: ******
PERCH_DB_DATABASE: ******
PERCH_DB_PREFIX: perch2_
PERCH_TZ: America/Los_Angeles
PERCH_EMAIL_FROM: ******
PERCH_EMAIL_FROM_NAME: RW Elephant
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/html/admin
PERCH_CORE: /var/www/html/admin/core
PERCH_RESFILEPATH: /var/www/html/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/html/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.6.9
Zend: 2.6.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: ****** $
MySQL server: 5.6.22-log
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, bz2, calendar, ctype, curl, dom, exif, fileinfo, ftp, gettext, iconv, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, zip, mysql, mysqli, pdo_mysql, pdo_sqlite, wddx, xmlreader, imagick, json, mhash
GD: No
ImageMagick: Yes
PHP max upload size: 16M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 16M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: staging.rwelephant.com
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36
HTTP_DNT: 1
HTTP_REFERER: https://staging.rwelephant.com/admin/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: __utma=233033501.1017950906.1422894965.1429223920.1429229011.27; __utmz=233033501.1429229011.27.13.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __distillery=v20150227_a1fba27b-2909-4f15-9e20-53e879c51d02; cmsa=1; _ga=GA1.2.1017950906.1422894965; _drip_client_7647773=vid%253D6c3392d0c684013285640e9dd67883c3%2526pageViews%253D138%2526sessionPageCount%253D6%2526lastVisitedAt%253D1436636856770%2526weeklySessionCount%253D1%2526lastSessionAt%253D1436636820951%2526form%255B6141%255D%255Bauto_open%255D%253D1436636840%2526form%255B6141%255D%255Bmanual_close%255D%253D1436636841; PHPSESSID=dvvks26nl7k51f9jbfnd4q8j31; __utma=4220529.1017950906.1422894965.1436635185.1436635185.1; __utmb=4220529.0.10.1436635185; __utmc=4220529; __utmz=4220529.1436635185.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
PATH: /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SOFTWARE: Apache/2.4.12 (Amazon) PHP/5.6.9
SERVER_NAME: staging.rwelephant.com
SERVER_ADDR: 10.0.0.179
SERVER_PORT: 80
REMOTE_ADDR: 86.146.20.54
DOCUMENT_ROOT: /var/www/html
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /var/www/html
SERVER_ADMIN: root@localhost
SCRIPT_FILENAME: /var/www/html/admin/core/settings/diagnostics/index.php
REMOTE_PORT: 58882
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1436637509.022
REQUEST_TIME: 1436637509

Post Template:

<article class="article">
  <div class="article-banner">
    <div class="inner-wide">
      <h1 class="article-title"><a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark"><perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /></a></h1>
      <p class="article-meta">Published on <time datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />"><perch:blog id="postDateTime" type="date" time="true" format="%e %B %Y" /></time>, by <perch:blog id="authorNickName" type="hidden" /></p>
      <p class="article-intro"><perch:blog id="postIntro" type="textarea" label="Introduction" textile="false" order="2" size="xs autowidth" /></p>
      <perch:if exists="featureImage">
        <div class="article-featured-image">
          <img src="<perch:blog id="featureImage" type="image" width="1000" crop="true" label="Feature Image" bucket="blog"" order="3" />" alt="<perch:blog id="postTitle" />">
        </div>
      </perch:if>
    </div>
  </div>
  <div class="article-content">
    <div class="inner">
      <perch:blog id="postDescHTML" type="textarea" label="Post Text" imagewidth="820" order="4" textile="true" editor="markitup" size="l autowidth" required="true" />

      <!-- Article Blocks -->
      <perch:blocks order="5">

        <!-- Text Block -->
        <perch:block type="textblock" label="Text Block">
          <perch:blog id="postText" type="textarea" label="Post Text" imagewidth="820" textile="true" editor="markitup" size="l autowidth" />
        </perch:block>

        <!-- Figure -->
        <perch:block type="figure" label="Figure Image">
          <figure>
            <img src="<perch:blog type="image" id="figureImage" label="Image" imagewidth="820" bucket="blog"" />" alt="<perch:blog type="text" id="alt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" />" />
            <perch:if exists="figureText">
              <figcaption>
                <perch:blog id="figureText" type="text" label="Text" />
              </figcaption>
            </perch:if>
          </figure>
        </perch:block>

        <!-- Image Left -->
        <perch:block type="leftImage" label="Image Left">
          <p class="image-left"><img src="<perch:blog type="image" id="leftImage" label="Image" width="420" bucket="blog"" />" alt="<perch:blog type="text" id="leftImageAlt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" title="true" />" /></p>
        </perch:block>

        <!-- Image Center -->
        <perch:block type="centerImage" label="Image Center">
          <p class="image-center"><img src="<perch:blog type="image" id="centerImage" label="Image" width="420" bucket="blog"" />" alt="<perch:blog type="text" id="centerImageAlt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" title="true" />" /></p>
        </perch:block>

        <!-- Image Right -->
        <perch:block type="rightImage" label="Image Right">
          <p class="image-right"><img src="<perch:blog type="image" id="rightImage" label="Image" width="420" bucket="blog"" />" alt="<perch:blog type="text" id="rightImageAlt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" title="true" />" /></p>
        </perch:block>

        <!-- Blockquote -->
        <perch:block type="quote" label="Blockquote">
          <div class="article-quote">
            <blockquote>
              <p>“<perch:blog id="quoteText" type="textarea" label="Quote Text" textile="false" size="s autowidth" required="true" />”</p>
              <perch:if exists="quoteAuthor">
                <footer>— <cite><perch:blog id="quoteAuthor" type="text" label="Author" /></cite></footer>
              </perch:if>
            </blockquote>
          </div>
        </perch:block>

        <!-- Video (iframe) -->
        <perch:block type="video" label="Video (iframe)">
          <div class="video-wrapper">
            <perch:blog id="video" type="textarea" label="Video" textile="false" html="true" size="s autowidth" help="Paste the video embed code (iframe)" />
          </div>
        </perch:block>

        <!-- CTA Banner -->
        <perch:block type="ctaBanner" label="CTA Banner">
          <a class="article-image-cta" href="<perch:blog id="ctaLink" type="text" label="Link URL" required="true" order="3" />"><img src="<perch:blog type="image" id="ctaImage" label="Image Banner" imagewidth="820" bucket="blog"" order="3" />" alt="<perch:blog type="text" id="alt" label="Description" required="true" order="2" help="e.g. Photo of MD John Smith with his best wig on" />" /></a>
        </perch:block>

      </perch:blocks>

    </div>
  </div>
</article>

<perch:blog id="excerpt" type="textarea" label="Excerpt" order="5" suppress="true" size="xs" divider-before="Post excerpt for list views" />
Mark Heggan

Mark Heggan 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's different between your dev site and this?

Nothing at all (that I can see) Drew, I've just uploaded directly, and I'm now having the problem above. I'm just building locally on MAMP. Any ideas, seems very strange?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you upload directly into the Assets app?

I can, which is strange, but the thumbnail doesn't show for up some reason - https://up.kibakoapp.com/NTS0RW6iky

And then also when I view the image, it doesn't show up at all, you can also see the "choose file" option - https://up.kibakoapp.com/JckdmgDqJG

So strange, I've never seen this before.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Are images actually being created in the resources folder?

What size are the images you are uploading?

Hi Rachel, I can ftp in and see 1 single image, so it looks like they are not being processed by perch properly. just the original file shows. I've tried big and small images, but no luck with either, same issue.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If Perch is working locally with the same code, then it's going to be some issue on your server.

Either you have something odd going on with permissions, or PHP doesn't have the available memory to process the image (if this is shared hosting then the amount of memory and resources stated in your config can have no bearing on what is actually available).

I'd check the error log, and you may need to raise a ticket with your host.

Hi Rachel. You were correct, it was permissions problem with Amazon Linux, really weird but now resolved. Thanks again for your assistance.