Forum

Thread tagged as: Question, Problem, Error

Photos disappears

Hi,

When i upload a photo to Perch it shows the photo in the CMS and on the website. But when i go in to the same page and save the page agian the photo disappears – any ideas what happens?

Perch: 2.7.2, PHP: 5.3.29, MySQL: 5.1.73, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.7.2), assets (2.7.2), categories (2.7.2), perch_blog (4.5.4)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog' );
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/vhosts/rswatches.dk/httpdocs/admin
PERCH_CORE: /var/www/vhosts/rswatches.dk/httpdocs/admin/core
PERCH_RESFILEPATH: /var/www/vhosts/rswatches.dk/httpdocs/admin/resources
Image manipulation: GD
PHP limits: Max upload 200M, Max POST 200M, Memory: 256M, Total max file upload: 200M
Resource folder writeable: Yes
HTTP_HOST: rswatches.dk
DOCUMENT_ROOT: /var/www/vhosts/rswatches.dk/httpdocs
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Simon Rothenborg

Simon Rothenborg 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you try with the latest version?

Hi.

I have now updated. Same problem.

Cheers, Simon

Perch: 2.7.4
Production mode: Production (100)
Installed apps: content (2.7.4), assets (2.7.4), categories (2.7.4), perch_blog (4.5.4)
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_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: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog'
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: ckeditor, tinymce, redactor, markitup
H1: 00d61ffd67eb3b5b72e5ba00d53d86ee
L1: c4de45906c235e3038692f2b0c2da8fc
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.7.2: done
latest_version: 2.5.3
on_sale_version: 2.7.4
perch_blog_update: 5.0
perch_blog_post_url: /blog/post.php?s={postSlug}
headerScheme: light
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 7
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 1
content_frontend_edit: 0
perch_blog_comment_notify: 0
update_2.7.4: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: c8429_axcel
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: c84299_axcel
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/Copenhagen
PERCH_EMAIL_FROM: simon@rothenborg.net
PERCH_EMAIL_FROM_NAME: Simon Rothenborg
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/vhosts/rswatches.dk/httpdocs/admin
PERCH_CORE: /var/www/vhosts/rswatches.dk/httpdocs/admin/core
PERCH_RESFILEPATH: /var/www/vhosts/rswatches.dk/httpdocs/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_CLEAN_RESOURCES:
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/vhosts/rswatches.dk/httpdocs/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.3.29
Zend: 2.3.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.1.73
MySQL server: 5.1.73-cll-lve
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, exif, tokenizer, xml, cgi-fcgi, PDO, pdo_mysql, xmlwriter, wddx, zip, dom, intl, pdo_sqlite, Phar, xmlreader, json, gd, mcrypt, mbstring, mysql, mysqli, fileinfo, imap, sockets, xsl, mhash, ionCube Loader
GD: Yes
ImageMagick: No
PHP max upload size: 200M
PHP max form post size: 200M
PHP memory limit: 256M
Total max uploadable file size: 200M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /sbin:/usr/sbin:/bin:/usr/bin
PP_CUSTOM_PHP_INI: /var/www/vhosts/system/rswatches.dk/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX: fastcgi
FCGI_ROLE: RESPONDER
UNIQUE_ID: VJAew38AAAEAC5HBFrsAAAAG
SCRIPT_URL: /admin/core/settings/diagnostics/
SCRIPT_URI: https://rswatches.dk/admin/core/settings/diagnostics/
HTTP_HOST: rswatches.dk
HTTP_X_REAL_IP: 37.49.143.155
HTTP_X_FORWARDED_FOR: 37.49.143.155
HTTP_X_ACCEL_INTERNAL: /internal-nginx-static-location
HTTP_CONNECTION: close
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_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
HTTP_REFERER: https://rswatches.dk/admin/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: da-DK,da;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_COOKIE: cmsa=1; PHPSESSID=sa5s8642g99ktpq93gu3dslv56; __utmt=1; __utma=41442593.104298782.1418398129.1418655890.1418728116.4; __utmb=41442593.37.10.1418728116; __utmc=41442593; __utmz=41442593.1418398129.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
SERVER_SIGNATURE: <address>Apache Server at rswatches.dk Port 80</address>
SERVER_SOFTWARE: Apache
SERVER_NAME: rswatches.dk
SERVER_ADDR: 77.66.85.139
SERVER_PORT: 80
REMOTE_ADDR: 37.49.143.155
DOCUMENT_ROOT: /var/www/vhosts/rswatches.dk/httpdocs
SERVER_ADMIN: simon@rothenborg.net
SCRIPT_FILENAME: /var/www/vhosts/rswatches.dk/httpdocs/admin/core/settings/diagnostics/index.php
REMOTE_PORT: 34619
REMOTE_USER: emilie
AUTH_TYPE: Basic
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.0
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: 1418731203

Hi agian,

The template tag i use is:

        <perch:repeater id="images" label="Side fotos">
          <img src="<perch:content type="image" id="images" label="Foto" width="900" height="500" crop="true" help="Vælg det foto der skal stå i højre side" />" alt="København" class="img-responsive">
          <p class="imagetext margin-30-bot">
            <perch:content id="billedetekst" type="text" label="Tekst under foto" markdown="false" editor="markitup" />
          </p>
        </perch:repeater>

If that have something to say

I get this error from the log:

PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/rswatches.dk/httpdocs/admin/core/lib/PerchUtil. class.php on line 532, referer: https://rswatches.dk/admin/core/apps/content/page/?id=10

Does it mean anything ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you need to allocate more memory to PHP, or upload smaller images.

I have enough memory, but it seems like a problem serializing the JSON data. I have seen 6MB JSON blobs in the database, which I manually deleted to get things going again. However, it the image still dissapears from the repeater when I upload > save and reload the page. Using just a normal image without repeater, works fine.

This is very strange.

Drew McLellan

Drew McLellan 2638 points
Perch Support

How many items do you have in the repeater?