Zen Cart Logo
Forums / Upgrading to 1.5.x / Upgrading from 1.39h to V1.50 - configure.php for subdomain

Upgrading from 1.39h to V1.50 - configure.php for subdomain

Views: 1,737

Results 1 to 5 of 5
25 May 2012, 3:21 AM
#1
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

Upgrading from 1.39h to V1.50 - configure.php for subdomain

I have followed the instruction on the recommended upgrading steps, and these are what I have done to start the upgrading:

  1. Backup SQL
  2. Created new DB and renamed new DB name for 1.5
  3. Edited files, including most add-ons (Image Handler V2 recommended to be uninstalled and replace with IH4 - recommended to uninstall from Admin/Tools/IH2 which I assumed it has to done after the upgrade; Zen Light box also to install fresh)
  4. Deleted old Time Zone table in SQL (manually, as there is no uninstall SQL)
  5. Edit the configure.php files in both includes/configure.php and admin/includes/configure.php
 define('HTTP_SERVER', 'http://domain.com');
  define('HTTPS_SERVER', 'https://domain.com');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/test/');
  define('DIR_WS_HTTPS_CATALOG', '/test/');

  define('DIR_WS_IMAGES', '/test/images/');
  define('DIR_WS_INCLUDES', '/test/includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . '/test/functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . '/test/classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . '/test/modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . '/test/languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . '/test/pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . '/test/templates/');

  define('DIR_WS_PHPBB', '/test/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/domain/public_html/test/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/test/download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/test/pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . '/test/uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . '/test/email/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', 'zen_');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'myusername');
  define('DB_SERVER_PASSWORD', 'mypassword');
  define('DB_DATABASE', 'domain_zc1234567');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'file'); 
  define('DIR_FS_SQL_CACHE', '/home/domain/public_html/test/cache');

// EOF
  1. Created sub-domain to test the upgrade
  2. Created new folder at http://domain.com/test/
  3. Uploaded the modified files and installation files to above folder
  4. Run zc_install/index.php
  5. Chose upgrade database
  6. 4 steps skipped (said that they already existed)
  7. Chose 'done with updates'
  8. Clicked on the 'visit admin page'

But it's a broken link. What did I do wrong? When created the subdomain, I point it to the root folder at http://domain.com/test/.

Appreciate your help.

25 May 2012, 4:18 AM
#2
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

Re: Upgrading from 1.39h to V1.50 - configure.php for subdomain

DBB1:

Jwduke3d, I did something similar, expanding a bit on the FAQ found at http://www.zen-cart.com/content.php?140...
7. Once complete, I backed up the database from this "cleaned up" Upgrade store. This represented my new, v1.5.0 Upgrade database.

  1. I created a new, fresh Zen Cart v1.5.0 site, using a newly created database. I then restored the v1.5.0 Upgrade database from the backup created in step 7, above into this new database.

-DBB1

Hi, I am confused about the upgrading steps. I have backed up files and DB of the live store, call it Store A; uploaded the zc_install (I didn't install a fresh V1.5 though) on a new subdomain and subfolder. Ran zc_install and opt for DB upgrade option, was prompted to enter the shop admin password (and I typed the one that is originally used with the live store, since that is the only one I have), and prompted with
SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.

I read somewhere in the forum that it's ok. I selected the 'done with update' and the installer sent me straight to the last stage, congratulation me on the setup. I tried to access the admin page or the new shop page (Demo Store B), but it turns out blank.

What did I miss?

25 May 2012, 4:26 AM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Upgrading from 1.39h to V1.50 - configure.php for subdomain

URLs for subdomains usually look like this: http://yoursubdomain.yourdomain.com

You would configure your subdomain to point to a specific folder within your web host. It is this folder where you will upload all your files.. (using your example this folder is called "test")

If your subdomain is configured correctly, then your configure.php would need to be setup to treat your subdomain as if it was a top level domain (http://yourdomain.com). So these two constants will look like this:

 define('HTTP_SERVER', 'http://yoursubdomain.yourdomain.com');
  define('HTTPS_SERVER', 'https://yoursubdomain.yourdomain.com');

The rest of your configure.php settings will act as if this is being configured to run on a top level domain (meaning NO FOLDER NAMES IN THE PATHS except here:

  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/domain/public_html/test/');

and

  define('DIR_FS_SQL_CACHE', '/home/domain/public_html/test/cache');

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

25 May 2012, 4:51 AM
#4
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

Re: Upgrading from 1.39h to V1.50 - configure.php for subdomain

Thank you DivaVocals,

I have made the changes. Wiped out the DB, and redid the steps with zc_install/index.php

When asked for admin password, I entered the old store's login password, since that is the only one I have; and hit the Database upgrade; then I saw these:

SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.

I went ahead to select 'done with updates'. But the link still shows up blank. :(

I have many plugins, and all have been updated (files), so could it be I need to run the SQL using myphp?

25 May 2012, 3:24 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upgrading from 1.39h to V1.50 - configure.php for subdomain

saplanet:

I hit the Database upgrade; then I saw these:

SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.Those are SIMPLY telling you that the cleanup activities that the upgrade does weren't needed. Those can be safely ignored.
saplanet:

I went ahead to select 'done with updates'. But the link still shows up blank. :(

I have many plugins, and all have been updated (files), so could it be I need to run the SQL using myphp?
Instead of jumping to thinking about needs for running SQL scripts, I suggest you first deal with finding out exactly what's causing the blank page. There is a popular FAQ article on that exact topic, which I found by searching the FAQs for "blank page": http://www.zen-cart.com/content.php?124-blank-page

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.