Forum

Thread tagged as: Question, Problem, Error

Perch crashes and logs out on Save or Delete of any item in the CMS

I'm running perch version 2.7.4 (I tried to update to 2.7.10 before posting here but it errors out).

My PHP version is 5.4.19 and add'l diagnostics are below.

--

The problem I'm experiencing right now is: In a Shared region (using perch_content_custom) all items were somehow duplicated -- I believe this occurred when an editor was reordering the list and possibly refreshed the page. I've gone in to try to delete the dupes but it doesn't seem that the page is trying to process on delete. I've also tried opening the delete action in a new tab which loads a confirmation page and when I click that Delete button it ends up erroring out and logging out of Perch as well.

Any help is greatly appreciated!

Thanks, Tom

--

Diagnostics:

Perch: 2.7.2
Production mode: Production (100)
Installed apps: content (2.7.2), assets (2.7.2), categories (2.7.2), perch_events (1.9), perch_forms (1.8.2), perch_gallery (2.8.5), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_events, perch2_events_categories, perch2_events_to_categories, perch2_forms, perch2_forms_responses, perch2_gallery_albums, perch2_gallery_image_versions, perch2_gallery_images, 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: 8
App runtimes:

<?php
    $apps_list = array(
        'content'
    );

Scheduled tasks for perch_events: update_category_counts (60 mins)
Editor plug-ins: markitup
H1: 64ecc12b4c9fd34b5a32e11584d80b4e
L1: a178d727ea02b5e7d06720f95b336d8e
content_collapseList: 1
content_frontend_edit: 1
content_hideNonEditableRegions: 0
content_singlePageEdit: 1
dashboard: 0
headerColour: #000000
headerScheme: dark
helpURL:
hideBranding: 1
hide_pwd_reset: 0
lang: en-gb
latest_version: 2.7.10
logoPath: /laurielynnstark/perch/resources/logo.png
on_sale_version: 2.7.10
perch_backup_mysqldump_path:
perch_events_detail_url: /exhibitions/detail/?t={eventSlug}
perch_events_update: 1.8
perch_gallery_basicUpload: 0
perch_gallery_bucket: default
perch_gallery_bucket_mode: single
perch_gallery_update: 2.8.5
siteURL:
update_2.5.4: done
update_2.6.3: done
update_2.7.2: done
update_2.7.4: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: laurielynnstark
PERCH_DB_SERVER: laurielynnstark.db.6761859.hostedresource.com
PERCH_DB_DATABASE: laurielynnstark
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: tommybiglow@gmail.com
PERCH_EMAIL_FROM_NAME: tommy biglow
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/content/59/6761859/html/perch
PERCH_CORE: /home/content/59/6761859/html/perch/core
PERCH_RESFILEPATH: /home/content/59/6761859/html/perch/resources
PERCH_RESPATH: /perch/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: /home/content/59/6761859/html/perch/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.4.19
Zend: 2.4.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.19
MySQL server: 5.5.40-36.1-log
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, apc, bcmath, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, json, mbstring, mcrypt, mysql, mysqli, session, PDO, pdo_mysql, pdo_sqlite, standard, pspell, Reflection, Phar, SimpleXML, soap, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 33M
PHP memory limit: 64M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
TMPDIR: /home/content/59/6761859/tmp
PHPRC: /home/content/59/6761859/html/
TEMP: /home/content/59/6761859/tmp
PATH: /sbin:/usr/sbin:/bin:/usr/bin
PWD: /web/cgi-bin
SPI: TRUE
TMP: /home/content/59/6761859/tmp
PHP_FCGI_MAX_REQUESTS: 100000
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 52609
SCRIPT_FILENAME: /var/chroot/home/content/59/6761859/html/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: support@secureserver.net
CONTEXT_DOCUMENT_ROOT: /var/chroot/home/content/59/6761859/html
REQUEST_SCHEME: http
DOCUMENT_ROOT: /var/chroot/home/content/59/6761859/html
REMOTE_ADDR: 67.247.3.248
SERVER_PORT: 80
SERVER_ADDR: 97.74.183.128
SERVER_NAME: laurielynnstark.com
SERVER_SOFTWARE: Apache
SERVER_SIGNATURE: <address>Apache Server at laurielynnstark.com Port 80</address>
LD_LIBRARY_PATH: /web/httpd24/lib
HTTP_CONNECTION: close
HTTP_COOKIE: _ga=GA1.2.1392174104.1417045542; cmsa=1; PHPSESSID=a5c7dff9c74e2f33c514a13d28617b62; cmssb=0; _gat=1
HTTP_REFERER: https://laurielynnstark.com/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0
HTTP_HOST: laurielynnstark.com
PARENT_DOCUMENT_ROOT: /var/chroot/home/content/59/6761859/html
GD_PHP_HANDLER: x-httpd-php5-4
userlimit_limit: 50
userlimit_name: 6761859
REAL_USERNAME: lauriestark
SUBDOMAIN_DOCUMENT_ROOT: /var/chroot/home/content/59/6761859/html
GD_ERROR_DOC: /
XID: 6761859
REAL_DOCUMENT_ROOT: /var/chroot/home/content/59/6761859/html
DOMAIN_NAME: laurielynnstark.com
SCRIPT_URI: https://laurielynnstark.com/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
UNIQUE_ID: VNwNl2FKGMwAADG1x2wAAACR
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1423707543.7406
REQUEST_TIME: 1423707543
argc: 1
Tommy Biglow

Tommy Biglow 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

When you say Perch is crashing what do you mean by that? Is Apache crashing?

What are the actual error messages you see when Perch "errors out"?

Unfortunately I'm getting a 500 error and my host doesn't supply any sort of debug info.

All I'm seeing at the moment is a long save/delete time followed by the account being logged out of perch.

I'd be happy to supply login info if you guys want to have a look.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need the actual error to be able to help. So you will need to speak to your host.

There is information in this article I wrote for Smashing about how to get proper error logging working.

https://www.smashingmagazine.com/2011/11/30/a-guide-to-php-error-messages-for-designers/

Hi Rachel,

Here's the error I'm getting now:

Fatal error: Call to a member function delete() on a non-object in /homepages/46/d374498725/htdocs/dev/laurielynnstark-live/perch/core/apps/content/PerchContent_Region.class.php on line 280

Hope that helps!

Thanks, Tommy

This might be more detailed:

[Thu Feb 12 17:15:15 2015] [6761859] [fcgid:warn] [client 67.247.3.248:50152] mod_fcgid: read data timeout in 120 seconds, referer https://laurielynnstark.com/perch/core/apps/content/delete/item/?id=3&itm=308 [Thu Feb 12 17:15:15 2015] [6761859] [core:error] [client 67.247.3.248:50152] End of script output before headers: index.php, referer https://laurielynnstark.com/perch/core/apps/content/delete/item/?id=3&itm=308

Rachel Andrew

Rachel Andrew 394 points
Perch Support

That sounds like you are missing files, or perhaps part of a file.

Try reuploading perch core.

Hmm just tried an update on dev and got the following errors:

DROP INDEX 'idx_uni' ON 'perch2_resource_log' SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

ALTER IGNORE TABLE 'perch2_resource_log' ADD UNIQUE INDEX 'idx_uni' ('appID', 'itemFK', 'itemRowID', 'resourceID') SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Is that just because I'm on dev and using the live DB?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

I don't know, are you able to connect to your live MySQL server from outside the network? That would be rather unusual.

It's not a Perch issue however.

Migrated everything over to the proper server, now receiving this when I attempt to login to the perch back-end:

"There's a problem with connecting to the database. Please check your settings. "

Perch Test ran properly and I'm sure that I'm using the same database info so I turned on debug and am receiving the following:

Debug Message SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db565453155.perch2_settings' doesn't exist

Could it be that the database didn't complete transfer? I'm attempting again but would love any feedback!

Drew McLellan

Drew McLellan 2638 points
Perch Support

It sounds like it - you certainly have at least one table missing.

Looks like it's probably an issue with the 1and1.com phpmyadmin upload of the SQL database. This thing is pretty huge. Would you recommend me splitting the SQL file into parts?

It's stalling out on the perch_resource_log INSERTs. My zipped file is about 33MB (1and1 max upload is 50MB) -- unzipped it's around 500mb

Drew McLellan

Drew McLellan 2638 points
Perch Support

You could split the file into parts, yes.

Hoping that this is the error that answers it all, it printed in my address bar after failing to delete an item on the testing server:

in /perch/core/apps/content/edit/

Fatal Error: Call to a member function delete() on a non-object in /homepages/46/d374498725/htdocs/dev/laurielynnstark-live/perch/core/apps/content/PerchContent_Region.class.php on line 280

edit: removed HTML tags from error message

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the region in draft by any chance?

Hmm that may have been it.. I got everything working again on dev with a new database and am backloading all of the content. Thanks for your guys' help with this. Best, T