Forum
Issues with Perch Runtime string?
Are there currently any issues with the Perch runtime string: <?php include('perch/runtime.php'); ?> I've noticed when I try 'Perchify' a webpage of fresh HTML code, by renaming the file to index.php and adding the above string to the top of the page, it automatically adds an open < character after the <body> tag which in turn breaks things on the page, such as fonts, etc. I'm running the site on Mamp local server. This is happening to several different sites I try it with and is also happening with out without custom templates. Wondering if there were any known issues?
Summary information
Perch: 3.1.1, PHP: 7.1.1, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1)
App runtimes: <<?php $apps_list = array( 'content', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Applications/MAMP/htdocs/perch
PERCH_CORE: /Applications/MAMP/htdocs/perch/core
PERCH_RESFILEPATH: /Applications/MAMP/htdocs/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: localhost
DOCUMENT_ROOT: /Applications/MAMP/htdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
What's happening in your page or template at that point?
Once the string is added it is placing an open < character straight after the opening body tag <body>. This is not in the code. Either pre-perch HTML code or even post-perch code. There is no stray bracket, etc. The string is essentially causing this to happen. Once this happens stays and functions relatively the same, however you can visially see the < character on the webpage and the fonts and some links are broken.
I have since taken an entirely different website and setup Perch on it, through Mamp using a different desktop and it is not having this issue.
So the issue is either with Mamp on my Mac OR something in the Perch install itself, that's casuing this to happen. I am going to take the website that's having this issue and transfer it to an online address and see does it resolve the issue. I should stress that this was working fine before something was altered and this began happening. Appreciate any advise or things to check, etc.
It sounds like a stray
<
in one of your files.Hi Drew, yes you would think that and believe me it's the first thing I did but it's happening to any piece of code. Even if I create an index file with the below basic code and then add the perch runtime string, it causes the < to appear. The issue is either with the Perch install or Mamp. Would it be best to re-install Perch? (Really don't want to have to do that!)
I would replace the
perch/core
folder if you believe that has become corrupted somehow.Hi Drew. I did that yesterday but to no effect. There was a minor update since I downloaded Perch last week. (3.1.0 - 3.1.1)
Hi Drew, the issue is now resolved. The extra character found its way into the /config/apps.php presumably when I was installing the blog. Thanks again.