Forum

Thread tagged as: Problem, Installation, Configuration

Moving from development to production

I'm testing a new site from dev to production and may have run into an issue. Might be database permission or a rewrite problem. Not quite sure what is causing the problem. Any hints what I should look for?

Here are notes during setup.

  1. Ran perchrunwaytest successfully
  2. But when I ran perch setup, after I entered license info msg indicated a database connection error until I manually imported dev sql database. No error is showing up.
  3. I can login and view Perch admin, but no pages loads on front end
  4. When I create new page with master page, no regions are created

I can create tables and drop tables manually and when I created new pages on through Perch see pages get inserted when I create new pages on Perch control panel.

And diagnostics all come up fine. Am running site on digital ocean.

Diagnostics report
HEALTH CHECK

Perch Runway is up to date
PHP 5.5.9-1ubuntu4.7 is up to date
MySQL 5.5.41-0ubuntu0.14.04.1 is up to date
Image processing available
SUMMARY INFORMATION

Perch Runway: 2.8.8, PHP: 5.5.9-1ubuntu4.7, MySQL: 5.5.41, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/html/perch
PERCH_CORE: /var/www/html/perch/core
PERCH_RESFILEPATH: /var/www/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 250M, Max POST 250M, Memory: 256M, Total max file upload: 250M
Resource folder writeable: Yes
HTTP_HOST: www.scottgruber.me
DOCUMENT_ROOT: /var/www/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Default page template has two regions, which aren't showing up in control panel after page is created.

Looks like this.


<h1><?php perch_content('Main heading'); ?></h1> <?php perch_content('Intro'); ?>

Rewrite code is


# Perch Runway RewriteEngine On RewriteCond %{REQUEST_URI} !^/perch RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* /perch/core/runway/start.php [L]
Scott Gruber

Scott Gruber 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Are there errors in your error log?

You shouldn't run Perch Setup if you are importing your database. Just make sure your config file is correct, import the database and deploy the files.

No errors in my error log.

Perch setup files removed after initial database import.

I can create new pages based on master pages and there are perch regions in the master page. After pages are created on production the regions didn't show up. Triple checked database permissions. Kind of strange as a page does get inserted in the database but no regions.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have any sort of server side cache in place?

Like Varnish? Nothing I know of.

As an aside, Dropbox backup worked. So Perch ain't likely suspect. And site works fine locally.

I inserted rubbish into my .htaccess file and site still didn't break, but that should have broken it.

I opened a support ticket with Digital Ocean. Probably a setup or configuration issue that I introduced or maybe some kind of permission error. Not quite sure though.

Taking an exercise break and will revisit in a couple hours. Will post follow-up.

Have a good evening.

Yea! I got solved it.

On Digital Ocean Ubuntu LAMP stack mod_rewrite isn't enabled by default.

In apache2.conf switched AllowOverride from None to All

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

And then ran this from command line to enable Mod_Rewrite

sudo a2enmod rewrite 

Finally after restarting Apache, all the issues raised in this thread were fixed.