Forum

Thread tagged as: Problem, Configuration

Regions not showing up on Perch console

HEALTH CHECK

Perch is up to date
PHP 7.0.8 is up to date
MySQL 5.5.42 is up to date
Image processing available
SUMMARY INFORMATION

Perch: 2.8.32, PHP: 7.0.8, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/georginapacey/Projects/pic/perch
PERCH_CORE: /Users/georginapacey/Projects/pic/perch/core
PERCH_RESFILEPATH: /Users/georginapacey/Projects/pic/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: pic
DOCUMENT_ROOT: /Users/georginapacey/Projects/pic
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
[25-Nov-2016 14:02:22 Europe/London] PHP Warning:  include(): https:// wrapper is disabled in the server configuration by allow_url_include=0 in /Users/georginapacey/Projects/pic/app/components/about/about.php on line 1
[25-Nov-2016 14:02:22 Europe/London] PHP Warning:  include(https://pic/perch/runtime.php): failed to open stream: no suitable wrapper could be found in /Users/georginapacey/Projects/pic/app/components/about/about.php on line 1
[25-Nov-2016 14:02:22 Europe/London] PHP Warning:  include(): Failed opening 'https://pic/perch/runtime.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.0.8/lib/php') in /Users/georginapacey/Projects/pic/app/components/about/about.php on line 1
[25-Nov-2016 14:02:22 Europe/London] PHP Fatal error:  Uncaught Error: Call to undefined function perch_content() in /Users/georginapacey/Projects/pic/app/components/about/about.php:37
Stack trace:
#0 {main}
  thrown in /Users/georginapacey/Projects/pic/app/components/about/about.php on line 37

The above is the PHP Error thrown when I load my /about page for which I put

<?php include('https://pic/perch/runtime.php');?>

and

<?php perch_content("IntroParagraph"); ?>

as per tutorial.

Georgina Pacey

Georgina Pacey 0 points

  • 4 years ago
Ben Furfie

Ben Furfie 3 points
Registered Developer

You can't define absolute paths to Perch. Hence why it's throwing an error about https://

The best way to do what you're trying to do is this to tweak the path to Perch the page templates use.

<?php if (!defined('PERCH_RUNWAY')) include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php'); ?>

If it's installed in a subdirectory (i.e. pic), then just add pic before /perch:

i.e.

<?php if (!defined('PERCH_RUNWAY')) include($_SERVER['DOCUMENT_ROOT'].'/pic/perch/runtime.php'); ?>

Working, thanks very much