Forum

Thread tagged as: Problem, Installation, Configuration

White screen of death

Hello everyone,

I'm having an issue with viewing a page that I create through Perch. I can edit the page, modify, and input content into regions. My problem is viewing the page.

I've read the community article regarding the Blank Page and attached my error log below from our server.

I see the page that was created using an FTP client, but the page is empty.

PHP Error Log

AH01071: Got error 'PHP message: PHP Warning: include(/var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch/templates/pages): failed to open stream: No such file or directory in /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/positions/northwood-medical-position-two.php on line 1\nPHP message: PHP Warning: include(/var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch/templates/pages): failed to open stream: No such device in /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/positions/northwood-medical-position-two.php on line 1\nPHP message: PHP Warning: include(): Failed opening '../perch/templates/pages' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/positions/northwood-medical-position-two.php on line 1\n', referer: https://clients.ota.studio/northwood-jobs/perch/core/apps/content/page/url/?id=19

Master Page Header (We're building this in a subfolder, hence the updated path)

<?php if (!defined('PERCH_RUNWAY')) include($_SERVER['DOCUMENT_ROOT'].'/northwood-jobs/perch/runtime.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php perch_pages_title();?> - Northwood Medical</title>
....
....

Diagnostic Information

Perch: 3.0.14, PHP: 7.0.28, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /northwood-jobs/perch
PERCH_PATH: /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch
PERCH_CORE: /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /northwood-jobs/perch/core/settings/diagnostics/index.php
REQUEST_URI: /northwood-jobs/perch/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/ota.studio/clients.ota.studio
HTTP_HOST: clients.ota.studio

Any help would be appreciated.

Cheers, Matt

MATTHEW URSO

MATTHEW URSO 0 points

  • 3 years ago

Your directory setup looks a little strange. I think you might be having problems because your Perch folder isn't in your root directory for the domain. Is /var/www/vhosts/ota.studio/clients.ota.studio/ the domain root?

Shane Lenzen said:

Your directory setup looks a little strange. I think you might be having problems because your Perch folder isn't in your root directory for the domain. Is /var/www/vhosts/ota.studio/clients.ota.studio/ the domain root?

I believe it is correct, as I can upload resources and edit regions on a static home page.

So Perch is living in /var/www/vhosts/ota.studio/clients.ota.studio/perch? Then maybe your runtime is the only problem. You're using a Runway runtime line, and it's pointing to /perch in a subdirectory. Try replacing:

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

with:

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

If that doesn't work, make a blank .php file with the line <?php echo $_SERVER['DOCUMENT_ROOT']; ?> inside, then access it to figure out where your root is.

Also...looking at your Perch diagnostics, it looks like Perch isn't in root:

PERCH_PATH: /var/www/vhosts/ota.studio/clients.ota.studio/northwood-jobs/perch

Shane Lenzen said:

So Perch is living in /var/www/vhosts/ota.studio/clients.ota.studio/perch? Then maybe your runtime is the only problem. You're using a Runway runtime line, and it's pointing to /perch in a subdirectory. Try replacing:

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

with:

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

If that doesn't work, make a blank .php file with the line <?php echo $_SERVER['DOCUMENT_ROOT']; ?> inside, then access it to figure out where your root is.

Perch is installed on a dev server, which hosts multiple staging sites. We've installed Perch in a subfolder multiple times with great success.

<?php include($_SERVER['DOCUMENT_ROOT'].'/northwood-jobs/perch/runtime.php'); ?>

Is still doing the same thing. Blank page.

The response from the blank PHP document containing

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

was

/var/www/vhosts/ota.studio/clients.ota.studio

What URL do you use to successfully access Perch admin?

Shane Lenzen said:

What URL do you use to successfully access Perch admin?

The login path would be: https://clients.ota.studio/northwood-jobs/perch/

Hmm...well if Perch is capable of running in a subfolder, then I would think <?php include($_SERVER['DOCUMENT_ROOT'].'/northwood-jobs/perch/runtime.php'); ?> should work. I've only ever run Perch from root, so I don't know. Maybe someone else will have a better idea.