Forum

Thread tagged as: Problem, Error, Configuration

Issue with transferring development site to live site on a different server

Hi,

I've recently made my development website live on Perch 3. The new site is on a different server so I've made some changes to the config file by adding the following:

switch($http_host)
    {
        case('mylivedomain.com') :

            define("PERCH_DB_USERNAME", 'cl21-db_user');
            define("PERCH_DB_PASSWORD", 'XXXXXXX');
            define("PERCH_DB_SERVER", "localhost");
            define("PERCH_DB_DATABASE", "cl21-db_user");
            break;

        case('mytestingdomain.com') :
            define("PERCH_DB_USERNAME", 'dickie_user');
            define("PERCH_DB_PASSWORD", 'XXXXXXX');
            define("PERCH_DB_SERVER", "localhost");
            define("PERCH_DB_DATABASE", "dickie_db");
            break;

        default :
            define("PERCH_DB_USERNAME", 'cl21-db_user');
            define("PERCH_DB_PASSWORD", 'XXXXXXX');
            define("PERCH_DB_SERVER", "localhost");
            define("PERCH_DB_DATABASE", "cl21-db_user");
            break;
        }

The issue I have is that none of the perch_content_templates are working as they should. For example, I am not able to upload images in the gallery or style content in textarea's which have the markdown attribute applied to it.

The database is working fine in terms of the content on the website, but the CMS area is formatting strangely.

The debug code is as follows:

Debug Message - Perch 3.0.1
[1] SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='1c89070b4bcba55618768b7048b56e83' LIMIT 1
UPDATE perch3_users SET userHash='3eee77183494b5627b1b37c069bee968' WHERE userID='1'
[26] SELECT p.privKey FROM perch3_user_privileges p
[11] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[6] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'
[1] SELECT * FROM perch3_content_regions WHERE regionID=7 LIMIT 1
[1] SELECT * FROM perch3_pages WHERE pageID='1' LIMIT 1
Using template: /templates/content/gallery.html
[1] SELECT * FROM perch3_content_items c WHERE c.regionID=7 AND c.itemRev=54 ORDER BY c.itemOrder ASC
Using template: /templates/content/gallery.html
[1] SELECT * FROM perch3_content_items c WHERE c.regionID=7 AND c.itemRev=54 ORDER BY c.itemOrder ASC
Using template: /templates/content/gallery.html
Form not posted or did not validate
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[1] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='content' LIMIT 1
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /core/apps/content/modes/edit.form.post.php
[1] SELECT * FROM perch3_resources WHERE resourceID='62' LIMIT 1
Darren Cusdin

Darren Cusdin 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the debug from?

Can you show us your diagnostics report once you've updated to the current version?

Hi Drew,

It was for my gallery page.

Here is the diagnostics report:

Perch: 3.0.1, PHP: 5.6.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.1), assets (3.0.1), categories (3.0.1)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /cms
PERCH_PATH: /home/sites/djdickbutcher.com/public_html/cms
PERCH_CORE: /home/sites/djdickbutcher.com/public_html/cms/core
PERCH_RESFILEPATH: /home/sites/djdickbutcher.com/public_html/cms/resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: djdickbutcher.com
DOCUMENT_ROOT: /home/sites/djdickbutcher.com/public_html
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

Let us know if you still get the issue once you're up to date.

Updating Perch resolved the issue! I didn't even think to check that as I only downloaded the Perch files under 2 weeks ago.

Thanks Drew!