Forum

Thread tagged as: Problem

Blank page in Perch admin when viewing form responses

I've installed Perch + Blog + Forms app on a client's web hosting (compatibility test passed) but I'm getting a blank page when I click on a contact form response in Perch admin, when I attempt to export the .csv file of responses, and when I click on a blog post comment to view it. Form responses have been stored and I can see them listed but I get blank page here /perch/addons/apps/perch_forms/responses/detail/?id=4 and on the other pages above.

I'm also not getting form responses by email but that may be unrelated to the above.

There's nothing in the server PHP error log and PERCH_DEBUG output doesn't show any error messages on other pages in the admin.

I cannot figure out where this is going wrong.

Diagnostics report as follows:

Perch: 2.8.10, PHP: 5.4.41, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.10), assets (2.8.10), categories (2.8.10), perch_blog (4.6), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/sycxpdhr/public_html/perch
PERCH_CORE: /home/sycxpdhr/public_html/perch/core
PERCH_RESFILEPATH: /home/sycxpdhr/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 64M, Memory: 64M, Total max file upload: 64M
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/sycxpdhr/public_html
HTTP_HOST: cloud9care.com
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Clive Walker

Clive Walker 22 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It could be you're hitting the maximum execution time or the available memory allowance.

I've contacted the host company support and they have replied:

The maximum execution time on our shared server is 30 sec and maximum php memory limit is 128 MB which cannot be increased

That should be OK shouldn't it?

Drew McLellan

Drew McLellan 2638 points
Perch Support

How much data are you trying to export?

There are only 4 responses that I created after Forms app set-up. These each have five forms fields (name, telephone, email, message, simple question) .... so, very little data.

The others pages where I see the same problem wouldn't have any such problems with execution time and memory limit though - would they?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does this work in your dev site?

Yes, I can view responses and comments and export .csv.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. So it's something about the environment.

Do you have any errors in your PHP log, or just nothing that relates to this? If it's completely empty, chances are it's not logging.

The error log in cPanel has some entries but not related to this. E.g if I enter a non-existent URL I get a File does not exist: error written to the log.

Although, it looks like the log is emptied frequently. Entries from earlier today aren't there now.

Update: PHP errors are also written to a log file in the root. There's are entries in that but nothing related to this in there either

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. When you say a blank page, how blank is it?

There is nothing in view source.

Drew McLellan

Drew McLellan 2638 points
Perch Support

So it sounds like either you're getting a PHP fatal error (which should certainly be in the log) or the request isn't getting as far as PHP.

The site was previously running Drupal. Is it possible that URL rewriting is interfering with Perch admin? Currently, the old Drupal index.php page has been replaced with a new temporary 'Coming Soon' page so it shouldn't be getting as far as Drupal now.

I have commented out the Drupal rewrites in .htaccess.

Here's the htaccess file as it stands now. I've left the server-related items and just commented out the Drupal rewrites.

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (https://example.com/... will be redirected to https://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (https://www.example.com/... will be redirected to https://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at https://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at https://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  #Added by cvw
  #RewriteCond %{REQUEST_URI} !^/perch/

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  #cvw removed these
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.81.2.4 2008/01/22 09:01:39 drumm Exp $

RewriteCond %{HTTP_HOST} ^www.cloud9care.com [NC] 
RewriteRule ^(.*)$ https://cloud9care.com/$1 [L,R=301]
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'd suggest comparing the settings between your known good environment and the one that's having problems. I can't really get into debugging your server.

Ok, no problem. Those I have already checked appear to be the same but I will recheck and look at other settings.

Just to follow-up and complete this thread. I contacted the web hosting company. They have said that because Perch isn't in their cPanel Softaculous toolkit, it's not compatible with their shared hosting. Not very helpful really and they were not more specific.

I'll suggest that client moves their hosting.