trouble moving local site to dev server for review.
I am trying to move my local set up to my live dev server. Steps followed:
1-ran the compatibility test and got the ok.
2-ran a SQL dump in Navicat on the structure and data
3-created the MySQL db on the dev server
4- created a subdomain of piconline.iswebdev.com
5-imported the sql dump file into the DB using Navicat
6 - uploaded all my files
7- set my config file as instructed here for multiple config settings; File content is below. I don't have live set up yet so that's still empty.
When I visit the page and click on perch to log in, I get all sorts of DB errors. link to perch And some of the tables in the db have an odd name.
Here is a screenshot of the DB tables with their names. [https://piconline.iswebdev.com/db_names.png] (https://piconline.iswebdev.com/db_names.png)
<?php
define('PERCH_LICENSE_KEY', 'LICENSE NUMBER HERE');
$http_host = getenv('HTTP_HOST');
switch($http_host)
{
case('dev.piconline.com:9007') :
define("PERCH_DB_USERNAME", 'rootuser');
define("PERCH_DB_PASSWORD", 'rootpassword');
define("PERCH_DB_SERVER", "localhost");
define("PERCH_DB_DATABASE", "pic_ins");
define("PERCH_DB_PREFIX", "perch2_");
break;
case('piconline.iswebdev.com') :
define("PERCH_DB_USERNAME", 'rckmm_pic');
define("PERCH_DB_PASSWORD", 'serverpassword');
define("PERCH_DB_SERVER", "server.IP");
define("PERCH_DB_DATABASE", "rckmm_piconline");
break;
default :
define("PERCH_DB_USERNAME", 'mysite_user');
define("PERCH_DB_PASSWORD", 'mysite_password');
define("PERCH_DB_SERVER", "localhost");
define("PERCH_DB_DATABASE", "db-mysite");
break;
}
define('PERCH_TZ', 'America/New_York');
define('PERCH_EMAIL_FROM', 'kim@myemail.com');
define('PERCH_EMAIL_FROM_NAME', 'Admin Name');
define('PERCH_LOGINPATH', '/perch');
define('PERCH_PATH', str_replace(DIRECTORY_SEPARATOR.'config', '', __DIR__));
define('PERCH_CORE', PERCH_PATH.DIRECTORY_SEPARATOR.'core');
define('PERCH_RESFILEPATH', PERCH_PATH . DIRECTORY_SEPARATOR . 'resources');
define('PERCH_RESPATH', PERCH_LOGINPATH . '/resources');
define('PERCH_HTML5', true);
Have you tested that the value of
$http_host
is what you're expecting?I don't know how to do that. Do you have an example here of what I need to do to get that?
And, does that image of the database tables look right to you? I don't see the PERCH_DB_PREFIXtablenamehere tables in my local database, only in the remote DB on the dev server.
No, you should not have any instance of
PERCH_DB_PREFIX
in your table names.That's what I thought. Can you tell me how that happened with a SQL dump? Why are they there and can I delete them? Also, how do I check to see the value of $http_host?
Ok, so I deleted the tables and ran the SQL dump file again. Now the tables reinstalled properly. But, when I visit the perch login page I get errors and the PREFIX tables are created in the DB. Hope that helps in some way.
If you're not confident with what you're doing in your
config.php
file, I'd suggest just stripping it back to a basic single-site version.Either I'm not explaining this properly or I'm missing something. Whether I set the config.php file up as a single site and use the information I have set up, or I use the multi-server set up, the site still cannot be worked on on my dev server. Please try to help me understand why it's not working in either set up.
My local environment is dev.piconline.com:9007 My development site is on my remote hosting server at hostgator.com and is under the domain "iswebdev.com" where I set a subdomain of piconline.iswebdev.com The live site will be housed at piconline.com
Is there something in those set ups that will not allow the site to function? I mean am I allowed to set iswebdev.com as the development domain? I'm confident my settings are correct. I have the site working perfectly under my local environment. Why won't it work on the dev server?
If this helps, the errors I'm getting are below. There are several more than what I copied here.
And, when trying to visit a page that is listed in the parent directory I get the following error
Your configuration file is not defining the PERCH_DB_PREFIX for all configurations. You should move that out of the case statement.
As Drew suggested, you might find it easier to use a single server configuration file if you aren't sure which parts should go where.
Rachel,
Thank you for catching that.I missed that in my config file. However, I followed the directions in the docs here when setting up the config file for multi-servers. https://docs.grabaperch.com/perch/building/servers/multiple-server-config/. I also stated that even with a single server configuration I get the same results. The errors and tables being added to the DB. When I try to login at piconline.iswebdev.com/perch/ I get the errors shown. And, the pages do not show anything but the static HTML code from the footer.
So, changing to a single server doesn't work either. I really need to know how I can get this working so I can allow the client to review the site prior to making it live on their server. Any other ideas as to why this is happening?
It's happening because your configuration file is wrong. Are you sure
HTTP_HOST
contains the port number on your server? I'd be very surprised, but I guess it's possible.The config with the port number is on my local mac. So, yes it has a port number in MAMP. It's this listing that's not resolving properly:
Have you checked that
$http_host === 'piconline.iswebdev.com'
?As I mentioned earlier in this thread, I don't know how to do that. I'm not a programmer. I'm a designer and I know HTML and CSS. PHP is not something I know at all. -- I'm sorry.
Even googling it didn't get me an answer that helped. I know its frustrating for you. I do appreciate the help. I only have to get this sorted one time and then I will know how to handle it in the future and won't be a bother. Would I just paste the following onto a page and visit that in a browser?
I think it would be far better if you went back to using the single site configuration file, we really cannot assist with host specific issues in free support.
If you don't understand what that case statement is doing then use the single file with all of the configuration options in it, just as Perch creates when doing the install. That way you won't need to worry what is being returned. If you don't know PHP it would definitely be a good idea to just use what we ship as standard as we can't help with individual server configurations as part of a free support offering.
Rachel,
I did go to a single site configuration file. I mentioned that here in my response to you. However, the single site configuration, STANDARD as shipped, with perch, set up for the remote dev site still throws the same errors for me. I am not sure this is host specific.
If the file works in one environment and not in the other then it's host specific.
What does your config file currently look like, and what error are you getting?
Thank you for not giving up on me.
The root directory shows links to the pages then clicking on the link to perch so that I can log into the admin at piconline.iswebdev.com/perch/ Shows the following errors
~~~The following error occurred: ALTER TABLE
PERCH_DB_PREFIXcontent_regions
ADDregionUpdated
TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTERregionEditRoles
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_regions' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_items
ADDitemUpdated
TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTERitemSearch
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_items' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_items
ADDitemUpdatedBy
CHAR(32) NOT NULL DEFAULT '' AFTERitemUpdated
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_items' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageTemplate
CHAR(255) NOT NULL DEFAULT '' AFTERpageAttributeTemplate
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDtemplateID
INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTERpageTemplate
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageSubpageTemplates
VARCHAR(255) NOT NULL DEFAULT '' AFTERtemplateID
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageCollections
VARCHAR(255) NOT NULL DEFAULT '' AFTERpageSubpageTemplates
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcategories
CHANGEcatDisplayPath
catDisplayPath
CHAR(255) NOT NULL DEFAULT '' SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcategories' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXusers
ADDuserPasswordToken
CHAR(255) NOT NULL DEFAULT 'expired' AFTERuserMasterAdmin
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXusers' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXusers
ADDuserPasswordTokenExpires
DATETIME NOT NULL DEFAULT '2015-01-01 00:00:00' AFTERuserPasswordToken
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXusers' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXusers
ADDuserLastFailedLogin
DATETIME NULL AFTERuserPasswordTokenExpires
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXusers' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXusers
ADDuserFailedLoginAttempts
INT(0) UNSIGNED NOT NULL DEFAULT '0' AFTERuserLastFailedLogin
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXusers' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXresources
ADD INDEXidx_list
(resourceParentID
,resourceKey
,resourceAWOL
) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXresources' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_items
ADD INDEXidx_regrev
USING BTREE (itemID, regionID, itemRev) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_items' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_items
ADD INDEXidx_order
USING BTREE (itemOrder) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_items' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_regions
ADD INDEXidx_key
USING BTREE (regionKey) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_regions' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXcontent_regions
ADD INDEXidx_path
USING BTREE (regionPage) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXcontent_regions' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpage_templates
ADDtemplateNavGroups
VARCHAR(255) NULL DEFAULT '' AFTERtemplateReference
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpage_templates' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXuser_privileges
ADD UNIQUE INDEXidx_key
(privKey
) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.navgroups.configure','Configure navigation groups',7), ('content.navgroups.create','Create navigation groups',8), ('content.navgroups.delete','Delete navigation groups',9) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.pages.create.toplevel','Add new top-level pages',3) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.pages.delete.own','Delete pages they created themselves',4) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.templates.configure','Configure master pages',6) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.pages.republish','Republish pages', 12) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageAccessTags
VARCHAR(255) NOT NULL DEFAULT '' AFTERpageNavOnly
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageCreatorID
INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTERpageAccessTags
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageModified
DATETIME NOT NULL DEFAULT '2014-01-01 00:00:00' AFTERpageCreatorID
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageAttributes
TEXT NOT NULL AFTERpageModified
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: ALTER TABLEPERCH_DB_PREFIXpages
ADDpageAttributeTemplate
VARCHAR(255) NOT NULL DEFAULT 'default.html' AFTERpageAttributes
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXpages' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('content.pages.attributes','Edit page titles and attributes',6) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('assets.create','Upload assets',1) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('assets.manage','Manage assets',2) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('categories.create','Create new categories',1) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('categories.delete','Delete categories',2) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('categories.manage','Manage categories',3) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('categories.sets.create','Create category sets',4) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist The following error occurred: INSERT INTOPERCH_DB_PREFIXuser_privileges
(privKey
,privTitle
,privOrder
) VALUES ('categories.sets.delete','Delete category sets',5) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rckmm_piconline.PERCH_DB_PREFIXuser_privileges' doesn't exist<?php define('PERCH_LICENSE_KEY', 'Licenese Key');
Warning: include(/home/rckmm/piconline/perch/addons/apps/comments/runtime.php): failed to open stream: No such file or directory in /home/rckmm/piconline/perch/core/inc/apps.php on line 21
Warning: include(): Failed opening '/home/rckmm/piconline/perch/addons/apps/comments/runtime.php' for inclusion (include_path='.:/opt/php54/lib/php') in /home/rckmm/piconline/perch/core/inc/apps.php on line 21 ~~~
PERCH_DB_PREFIX is still missing from your file. This needs to be in your config file.
The other error indicates that the comments app runtime is not found.
The comments app runtime is there. I checked. When PERCH_DB_PREFIX is added to the config
I get tables added to the DB like this image: https://iswebdev.com/piconline/db_names.png