Forums / Upgrading to 1.5.x / Upgrading broke my site

Upgrading broke my site

Results 1 to 12 of 12
22 Mar 2013, 22:20
#1
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Upgrading broke my site

Was trying to upgrade from 1.5 to 1.51. Shouldn't have.

www.shopcybermidi.com

500 internal server error

Can't get into Admin, keep going to "install page"

Can you please pm me so you can take a look at my site and see where I messed up? I never had a problem with an upgrade, but if i can't fix this, I'm basically out of business. I'm not sure if the htacess files and configuration files are correct.

$t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];

define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_HTTPS_CATALOG', '/');

Is that right for the new versions...or should that have been replaced with the install?

thanks
22 Mar 2013, 22:52
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: Upgrading broke my site

Upgrading did not break your site.

You did. :P

I upgrade lots of sites and the upgrading has never broken them.

1.5.0 to 1.5.1 involves only FILE upgrades. There is no dbase upgrade.

If you go through the CHANGELOG in the docs folder, you will see which files need changing. SOME of them might have custom over-rides in your installation. Go through your notes (you have been keeping notes?) to see what files have been customised in the past, and if there are files in your list that also appear on the changelog, then you need to bring in your changes into the 1.5.1 files before you FTP everything to the server.
22 Mar 2013, 23:28
#3
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Upgrading broke my site

I never said YOU broke the site.
IF there is no database upgrade, why does the install include a line for 1.5 to 1.51?

I installed a bunch of "patch" files, which included new files. The originals were'nt edited, I use a custom template with overrides which weren't touched.
22 Mar 2013, 23:43
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: Upgrading broke my site

The FIRST STEP in performing an upgrade is to open the DOCS folder in the later version and view the WHAT'S CHANGED file. I usually go to the index.html page to start right at the beginning:

zen-cart-v1.5.1-full-fileset-09182012/docs/index.html

Now if you look at what's changed between 1.5.0 and 1.5.1 you will see that its only CERTAIN FILES. There is no mention of dbase changes, so we can safely assume there aren't any.

What I do is PRINT OUT the list of changed files, then COMPARE that list to my own list of customisations. If there is a file in the changelog that I have customised, then I need to do a FILE COMPARE to see what must be done to bring my customisations into the later version of that file.

When I have brought in my customisations I BACKUP the server's current version (everything).

Then I ftp ONLY THE FILES that are listed in the changelog. There is no need to overwrite EVERYTHING. As there is no DB upgrade, I do not need to run "install" through the browser.

Then I do a full TEST.

I keep the BACKED UP files (now still 1.5.0) for a couple of weeks just in case.
22 Mar 2013, 23:47
#5
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Upgrading broke my site

I've been able to get the root back. I think my admin config file is corrupt because I keep getting
to system setup required.

Can you tell me if this looks wrong? Thanks


------------------

<?php
/**
* @package Configuration Settings circa 1.3.9
* @copyright Copyright 2003-2010 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* File Built by zc_install on 2011-03-05 09:32:18
*/


/*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

// Define the webserver and path parameters
// Main webserver: eg-http://www.your_domain.com -
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
/*
* URLs for your site will be built via:
* HTTP_SERVER plus DIR_WS_ADMIN or
* HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
* HTTP_SERVER plus DIR_WS_CATALOG or
* HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
* ...depending on your system configuration settings
*
* If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
*/
define('HTTP_SERVER', 'http://www.shopcybermidi.com');
define('HTTPS_SERVER', 'https://cybermidi.powweb.com');
define('HTTP_CATALOG_SERVER', 'http://www.shopcybermidi.com');
define('HTTPS_CATALOG_SERVER', 'https://cybermidi.powweb.com');

// secure webserver for admin? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_ADMIN', 'true');

// secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_CATALOG', 'true');

// 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)
$t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];

define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_HTTPS_CATALOG', '/shopcybermidi.com');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
define('DIR_FS_CATALOG', '/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', '#######');
define('DB_SERVER_USERNAME', '#######');
define('DB_SERVER_PASSWORD', '#######');
define('DB_DATABASE', '#######');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');

// 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', '/#######/shopcybermidi.com/cache');


// EOF
23 Mar 2013, 01:01
#6
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Upgrading broke my site

never mind, figured it all out

thanks
23 Mar 2013, 02:33
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Upgrading broke my site

fairestcape:

1.5.0 to 1.5.1 involves only FILE upgrades. There is no dbase upgrade.

Actually, there ARE a few db changes. Should run zc_install for 1.5.0 to 1.5.1 upgrade.
23 Mar 2013, 02:33
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Upgrading broke my site

notset4life:

never mind, figured it all out

thanks


Care to share what was the culprit?
23 Mar 2013, 09:36
#9
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: Upgrading broke my site

DrByte:

Actually, there ARE a few db changes. Should run zc_install for 1.5.0 to 1.5.1 upgrade.


Hmmm :mellow:
I see now the mysql_upgrade_zencart_150_to_151.sql file.

I'll remember to look for these patches in addition to referencing the changelog.

Now I am pretty competent with phpMyAdmin, so is it "safe" for me to manually make the following changes to the dbase:

ALTER TABLE admin_activity_log CHANGE COLUMN ip_address ip_address varchar(45) NOT NULL default '';
ALTER TABLE whos_online CHANGE COLUMN ip_address ip_address varchar(45) NOT NULL default '';
ALTER TABLE admin CHANGE COLUMN last_login_ip last_login_ip varchar(45) NOT NULL default '';
ALTER TABLE admin CHANGE COLUMN last_failed_ip last_failed_ip varchar(45) NOT NULL default '';
ALTER TABLE coupon_redeem_track CHANGE COLUMN redeem_ip redeem_ip varchar(45) NOT NULL default '';
ALTER TABLE coupon_gv_queue CHANGE COLUMN ipaddr ipaddr varchar(45) NOT NULL default '';

and then run the following as a SQL query

INSERT INTO project_version_history (project_version_key, project_version_major, project_version_minor, project_version_patch, project_version_date_applied, project_version_comment)
SELECT project_version_key, project_version_major, project_version_minor, project_version_patch1 as project_version_patch, project_version_date_applied, project_version_comment
FROM project_version;


Then run the final one:
## Now set to new version
UPDATE project_version SET project_version_major='1', project_version_minor='5.1', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.5.0->1.5.1', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Main';
UPDATE project_version SET project_version_major='1', project_version_minor='5.1', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.5.0->1.5.1', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Database';


I completely understand that this is NOT what you would want novices to do, but I can't see anything too complex in the above SQL that cannot be manually done.
23 Mar 2013, 09:48
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Upgrading broke my site

fairestcape,
Since all of this is completely off-topic, I'll simply say that you should go ahead and run zc_install and do the database-upgrade step that you previously decided to skip.

That is the same advice I would give to everyone.

This thread is not the place to discuss advanced alternatives or the pitfalls of using other approaches.
23 Mar 2013, 09:57
#11
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: Upgrading broke my site

Fair point.

I'll upgrade using the advised protocols and conventions. As I am frequently telling others to do it properly, I should be doing so too.

BTW, when do you get a chance to sleep? It must be 4am where you are :sleep:
23 Mar 2013, 10:02
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Upgrading broke my site

fairestcape:

BTW, when do you get a chance to sleep? It must be 4am where you are :sleep:

Haha. Fair point also. Indeed it is. Later actually. Got up to take care of something else, and decided to check on spam stuff. Cleared that out and answered a few posts. Back to bed.