Forum

Thread tagged as: Problem

Perch Content not appearing in the Editor

I have the following PHP and the content tag is not being picked up by Perch. I have to include the initial / on the first line of PHP to get the page working.

What am I doing wrong?

<?php include('/perch/runtime.php'); ?> <!doctype html> <html class="no-js" lang="en">

<head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>Home | Music For your Event</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link rel="manifest" href="site.webmanifest"> <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"> <link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link rel="manifest" href="/manifest.json"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="theme-color" content="#ffffff"> <!-- Place favicon.ico in the root directory -->

<link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>

<body> <!--[if lte IE 9]> <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p> <![endif]-->

<!-- Add your site or application content here --> <header> <nav role="navigation"> <button id="toggle" aria-expanded="false">Menu</button> <ul id="menu"> <li class="active" > <a href=""> Home </a> </li> <li> <a href="about-us.html"> About Us </a> </li> <li> <a href="gallery.html"> Gallery </a> </li> <li> <a href="reviews.html"> Reviews </a> </li> <li> <a href="events.html"> Events </a> </li> <li> <a href="contact.html"> Contact </a> </li> </ul> </nav> <h1> Joanne </h1> </header> <section> <h1> All your Music Needs </h1> <?php perch_content('Home'); ?> </section> <footer>

</footer> <script src="js/vendor/modernizr-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script> <script src="js/plugins.js"></script> <script src="js/main.js"></script> <script src="js/menu.js"></script>

</body>

</html>

Michael Tott

Michael Tott 0 points

  • 2 years ago

Michael,

try this <?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php'; ?>

Hi Robert, tried that and that doesn't change the CMS issue and makes the page give a HTTP Error 500

Can you please post your diagnostic report from the admin settings page.

Hi Robert

The basci is:

Health check

Setup folder is present and should be deleted
Perch is up to date
PHP 5.6.38 is up to date
MySQL 5.5.59-cll is up to date
Image processing available

Summary information

Perch: 3.1.3, PHP: 5.6.38, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /data02/c4106692/perch.musicforyourevent.me/perch
PERCH_CORE: /data02/c4106692/perch.musicforyourevent.me/perch/core
PERCH_RESFILEPATH: /data02/c4106692/perch.musicforyourevent.me/perch/resources
Image manipulation: GD
PHP limits: Max upload 16M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
DOCUMENT_ROOT: /data02/c4106692/perch.musicforyourevent.me
HTTP_HOST: perch.musicforyourevent.me
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

The extended is:

Perch information

Perch: 3.1.3
Production mode: Production (100)
Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3)
DB driver: PDO
DB tables: perch3_categories (0), perch3_category_counts (0), perch3_category_sets (0), perch3_content_index (0), perch3_content_items (0), perch3_content_regions (3), perch3_menu_items (8), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (0), perch3_pages (2), perch3_resource_log (0), perch3_resource_tags (0), perch3_resources (0), perch3_resources_to_tags (0), perch3_settings (11), perch3_user_passwords (0), perch3_user_privileges (28), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
App runtimes:

<?php
    $apps_list = [ 
    ];

Editor plug-ins:
H1: 2792d9adb4abdf42d6e0e99022e0a947
L1: 1628aea9a3e809df089fe4f6d32d8803
F1: 3b606135b33e6a102526838f4152a807
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
installedAt: 3.1.3
update_3.1.3: done
latest_version:
on_sale_version: 3.1.3
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: c4106692_taoist
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: c4106692_mfye
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: michael@forequizzes.co.uk
PERCH_EMAIL_FROM_NAME: Michael Tott
PERCH_LOGINPATH: /perch
PERCH_PATH: /data02/c4106692/perch.musicforyourevent.me/perch
PERCH_CORE: /data02/c4106692/perch.musicforyourevent.me/perch/core
PERCH_RESFILEPATH: /data02/c4106692/perch.musicforyourevent.me/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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: 6738d5d5f5664f7c5e34
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /data02/c4106692/perch.musicforyourevent.me/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown

Hosting settings

PHP: 5.6.38
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.5.59-cll
Free disk space: 79.33 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, cgi-fcgi, suhosin, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, json, exif, mcrypt, mysqlnd, mysql, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, SimpleXML, soap, sockets, SourceGuardian, sqlite3, tokenizer, xml, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend Guard Loader, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 16M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
CONTEXT_DOCUMENT_ROOT: /data02/c4106692/perch.musicforyourevent.me
DOCUMENT_ROOT: /data02/c4106692/perch.musicforyourevent.me
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: PHPSESSID=paou5l4e3dbhbcq4q2i194d071; cmsa=1
HTTP_DNT: 1
HTTP_HOST: perch.musicforyourevent.me
HTTP_REFERER: https://perch.musicforyourevent.me/perch/core/settings/diagnostics/
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
PATH: /bin:/usr/bin
QUERY_STRING: extended
REDIRECT_STATUS: 200
REMOTE_ADDR: 82.69.48.242
REMOTE_PORT: 52799
REQUEST_METHOD: GET
REQUEST_SCHEME: http
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /data02/c4106692/perch.musicforyourevent.me/perch/core/settings/diagnostics/index.php
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SCRIPT_URI: https://perch.musicforyourevent.me/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
SERVER_ADDR: 82.71.204.31
SERVER_ADMIN: webmaster@perch.musicforyourevent.me
SERVER_NAME: perch.musicforyourevent.me
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Apache
TZ: Etc/UTC
UNIQUE_ID: XA1BePx35M3I5mNfx3qCHQAAAJQ
proto: http
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1544372600.3824
REQUEST_TIME: 1544372600
argc: 1

Hi Robert,

When looking at these II noticed that my host was using PHP 5.6.38.

Updated this to 7.2.11 (something my host allows), and it is now working.

I noticed that there is an error about the setup folder still being in place, should I just delete this?

Thanks for youe help Robert.

Yes, Delete the setup folder as this is no longer needed. The setup is pretty secure in that it will not create a problem, but as per the setup instructions you should delete it once your able to login to your perch installation.

Many thanks. Am busy creating pages etc. at the moment. Thanks