Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Can anyone provide me with the procedure to upgrade a 1.4.2 version to 1.7.5 with English as their first language? I have read through the upgrade instructions and tried several different ways with failure each time. There has to be some clear concise instructions without such vague things as "adjust new with old". I am not a noob at this stuff and know how to work with php and mySQL databases.
I will not rebuild the whole website from scratch, I will dump phpwcms for another CMS solution before I will do that. There should be better upgrade scripts; If one can create phpwcms; which is a complex application, then one should be able to write a clean upgrade script that does not have the user running around copying and changing files all over the place.
I will not rebuild the whole website from scratch, I will dump phpwcms for another CMS solution before I will do that. There should be better upgrade scripts; If one can create phpwcms; which is a complex application, then one should be able to write a clean upgrade script that does not have the user running around copying and changing files all over the place.
- Oliver Georgi
- Site Admin
- Posts: 9905
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Sure, there could be better upgrade script. But it is a question of time as always.
The easy way is (I recommend to do it locally, using MAMP or XAMP or any other local web server solution):
The easy way is (I recommend to do it locally, using MAMP or XAMP or any other local web server solution):
- Backup your site
- Create a full working copy of this backup with own database. Just change config/phpwcms /conf.inc.php with new path and database information. If you cannot create a new database use the current but rename table names with prefix — see this.
- If you use RENAME on current installation do not forget to set new prefix in config value $phpwcms['db_prepend'].
- When the copy is working as expected, upload new phpwcms files. Keep an eye on modules (include/inc_module) and template folder — merge old customised files with new one. I recommend using tools like WinMerge on PC or Changes/Kaleidoscope on Mac.
- Start upgrading database with setup/upgrade.php — follow instructions there.
- When there is no SQL upgrade script left, open login mask and you are done.
- If all is working, update old templates if necessary. The jump from 1.4.x to current is not that difficult
- Current releases have built-in db update script.
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Thanks, this seems clearer than what I read before. Yes, I could do this either on the sever or with the AMPPS installed locally.
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Why would I have duplicate columns? This is the report I got after running the upgrade:
CREATE TABLE IF NOT EXISTS `ron_phpwcms_log_seo` (
`id` int(11) NOT NULL auto_increment,
`create_date` timestamp NOT NULL,
`domain` varchar(255) NOT NULL DEFAULT '',
`query` varchar(255) NOT NULL DEFAULT '',
`pos` int(11) NOT NULL DEFAULT 0,
`referrer` text NOT NULL,
PRIMARY KEY (`id`)
);
ERROR: Duplicate column name 'article_menutitle' -> ALTER TABLE `phpwcms_article` ADD `article_menutitle` VARCHAR( 255 ) NOT NULL DEFAULT '';
ERROR: Duplicate column name 'cref_module' -> ALTER TABLE `phpwcms_crossreference` ADD `cref_module` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `cref_type`;
ALTER TABLE `phpwcms_crossreference` ADD INDEX ( `cref_module` );
ERROR: Duplicate column name 'f_sort' -> ALTER TABLE `phpwcms_file` ADD `f_sort` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_file` ADD INDEX ( f_sort );
ERROR: Duplicate column name 'detail_regkey' -> ALTER TABLE `phpwcms_userdetail` ADD `detail_regkey` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `detail_id`;
ERROR: Duplicate column name 'detail_salutation' -> ALTER TABLE `phpwcms_userdetail` ADD `detail_salutation` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `detail_title`;
ALTER TABLE `phpwcms_userdetail` ADD INDEX ( detail_regkey );
ERROR: Duplicate column name 'shopprod_track_view' -> ALTER TABLE `phpwcms_shop_products` ADD `shopprod_track_view` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_shop_products` ADD INDEX ( `shopprod_track_view` );
CREATE TABLE IF NOT EXISTS `phpwcms_log` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`log_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`log_type` varchar(50) NOT NULL DEFAULT '',
`log_ip` varchar(30) NOT NULL DEFAULT '',
`log_user_agent` varchar(255) NOT NULL,
`log_user_id` int(11) NOT NULL DEFAULT '0',
`log_user_name` varchar(255) NOT NULL,
`log_referrer_id` int(11) NOT NULL DEFAULT '0',
`log_referrer_url` text NOT NULL,
`log_data1` varchar(255) NOT NULL DEFAULT '',
`log_data2` varchar(255) NOT NULL DEFAULT '',
`log_data3` varchar(255) NOT NULL DEFAULT '',
`log_msg` text NOT NULL,
PRIMARY KEY (`log_id`),
KEY `log_referrer_id` (`log_referrer_id`),
KEY `log_type` (`log_type`)
);
ALTER TABLE `phpwcms_calendar` CHANGE `calendar_refid` `calendar_refid` VARCHAR( 255 ) NOT NULL DEFAULT '';
CREATE TABLE IF NOT EXISTS `ron_phpwcms_log_seo` (
`id` int(11) NOT NULL auto_increment,
`create_date` timestamp NOT NULL,
`domain` varchar(255) NOT NULL DEFAULT '',
`query` varchar(255) NOT NULL DEFAULT '',
`pos` int(11) NOT NULL DEFAULT 0,
`referrer` text NOT NULL,
PRIMARY KEY (`id`)
);
ERROR: Duplicate column name 'article_menutitle' -> ALTER TABLE `phpwcms_article` ADD `article_menutitle` VARCHAR( 255 ) NOT NULL DEFAULT '';
ERROR: Duplicate column name 'cref_module' -> ALTER TABLE `phpwcms_crossreference` ADD `cref_module` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `cref_type`;
ALTER TABLE `phpwcms_crossreference` ADD INDEX ( `cref_module` );
ERROR: Duplicate column name 'f_sort' -> ALTER TABLE `phpwcms_file` ADD `f_sort` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_file` ADD INDEX ( f_sort );
ERROR: Duplicate column name 'detail_regkey' -> ALTER TABLE `phpwcms_userdetail` ADD `detail_regkey` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `detail_id`;
ERROR: Duplicate column name 'detail_salutation' -> ALTER TABLE `phpwcms_userdetail` ADD `detail_salutation` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `detail_title`;
ALTER TABLE `phpwcms_userdetail` ADD INDEX ( detail_regkey );
ERROR: Duplicate column name 'shopprod_track_view' -> ALTER TABLE `phpwcms_shop_products` ADD `shopprod_track_view` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_shop_products` ADD INDEX ( `shopprod_track_view` );
CREATE TABLE IF NOT EXISTS `phpwcms_log` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`log_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`log_type` varchar(50) NOT NULL DEFAULT '',
`log_ip` varchar(30) NOT NULL DEFAULT '',
`log_user_agent` varchar(255) NOT NULL,
`log_user_id` int(11) NOT NULL DEFAULT '0',
`log_user_name` varchar(255) NOT NULL,
`log_referrer_id` int(11) NOT NULL DEFAULT '0',
`log_referrer_url` text NOT NULL,
`log_data1` varchar(255) NOT NULL DEFAULT '',
`log_data2` varchar(255) NOT NULL DEFAULT '',
`log_data3` varchar(255) NOT NULL DEFAULT '',
`log_msg` text NOT NULL,
PRIMARY KEY (`log_id`),
KEY `log_referrer_id` (`log_referrer_id`),
KEY `log_type` (`log_type`)
);
ALTER TABLE `phpwcms_calendar` CHANGE `calendar_refid` `calendar_refid` VARCHAR( 255 ) NOT NULL DEFAULT '';
- Oliver Georgi
- Site Admin
- Posts: 9905
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Can happen, because the old db update process is not perfect. if you can compare your updated db against current default schema (setup/default_sql). In general all is fine with those "duplicate error messages" and can be understood as notice only. Just keep in mind when later problems might occur.
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
So I tryed to get a fully working copy of my isntallation within a subdirectory on my webspace. I created a new db, edited the new db into the conf.inc.php. Then I edited, better to say tryed to edit, the new path. I assumed it'll be as easy as adding the subdir to the "$phpwcms['site'] " and "$phpwcms['DOC_ROOT'] " or at least "$phpwcms['root'] "..Oliver Georgi wrote:Sure, there could be better upgrade script. But it is a question of time as always.
The easy way is (I recommend to do it locally, using MAMP or XAMP or any other local web server solution):
- Backup your site
- Create a full working copy of this backup with own database. Just change config/phpwcms /conf.inc.php with new path and database information. If you cannot create a new database use the current but rename table names with prefix — see this.
- If you use RENAME on current installation do not forget to set new prefix in config value $phpwcms['db_prepend'].
- When the copy is working as expected, .....
So what I have tryed to far to update my new path:
Code: Select all
$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/upgrade'
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT']
$phpwcms['root'] = ''
Code: Select all
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'].'/upgrade'
Code: Select all
$phpwcms['root'] = 'upgrade'
Code: Select all
$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/upgrade'
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT']
$phpwcms['root'] = 'upgrade'
Code: Select all
$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/upgrade'
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'].'/upgrade'
$phpwcms['root'] = ''
Code: Select all
$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].''
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'].'/upgrade'
$phpwcms['root'] = 'upgrade'
So i have absolutely no clue what to do. My backend templates do not have any hardlinks to root/link.html.
It should be possible to install a fully working copy within a simple subdirectory, shouldn't it?
Any help will be appreciated!!
I'll be back next week. May I'll find any help by then?
best regards
- Oliver Georgi
- Site Admin
- Posts: 9905
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Code: Select all
$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'];
$phpwcms['root'] = 'upgrade';
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Thank you very much for your hint.
//edit:
I missed a semicolon...
But when I user your instructions, I get:
while line 28 says:
This ist what happens:
1. link.de/upgrade/ {enter} -> link.de/upgrade/index.php?home_de
2. link.de/upgrade/index.php?home_de {click} -> link.de/upgrade/random_nav_link_de.html
3. link.de/upgrade/random_nav_link_de.html {click/mouse_hover} -> link.de/random_nav_link_de.html
I can't find any hardlinks within the site templates. While there is a seperate template for the start site and one for all other sites, there might be a problem?
Ouh, there might be a rewrite problem. I'll check that.
//edit:
I missed a semicolon...
Parse error: syntax error, unexpected '$phpwcms' (T_VARIABLE) in .../upgrade/config/phpwcms/conf.inc.php on line 28
Nevertheless, the first clicked link on the index functions normal but the second links to the old version again.$phpwcms['root'] = 'upgrade';''
This ist what happens:
1. link.de/upgrade/ {enter} -> link.de/upgrade/index.php?home_de
2. link.de/upgrade/index.php?home_de {click} -> link.de/upgrade/random_nav_link_de.html
3. link.de/upgrade/random_nav_link_de.html {click/mouse_hover} -> link.de/random_nav_link_de.html
I can't find any hardlinks within the site templates. While there is a seperate template for the start site and one for all other sites, there might be a problem?
Ouh, there might be a rewrite problem. I'll check that.
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Since I have absolutely no idea what to do and how to use mod_rewrite and I am afraid of messing up more than fixing.... I'll just leave that sh** as it is. But I am quite sure there must be the freaking solution. Since everything seems to work for that copy except for subfolder links.... I will go on upgrading now..
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Are you using modRewrite?
Then have look into your .htaccess file!
Is it activated?
There it might be necessary, to change some lines, because of the fact, you are now working inside a subdirectory!!!
Then have look into your .htaccess file!
Is it activated?
There it might be necessary, to change some lines, because of the fact, you are now working inside a subdirectory!!!
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Old Boy wrote:Are you using modRewrite?
Then have look into your .htaccess file!
Is it activated?
There it might be necessary, to change some lines, because of the fact, you are now working inside a subdirectory!!!
You were right! After many try&fail's I've managed to get it working properly. Thank you old boy and Oli!
RewriteEngine On
DirectoryIndex index.html index.php
#HTTPS rewrite:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
# Installed in Subfolder http://www.example.com/subfolder/
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.html$ /upgrade/index.php?id=$1,$2,$3,$4,$5,$6&%{QUERY_STRING}
RewriteRule ^(.+)\.html$ /upgrade/index.php?$1&%{QUERY_STRING}
#
RewriteCond %{REQUEST_URI} index/(.*)\.html$
RewriteRule (.*)\.html$ /upgrade/index.php?$1
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
aaaaaaaaaaand....
//edit1
/setup/upgrade.php:
may i just alter the path to /config/phpwcms/conf.inc.php or shell I copy the conf.inc.php to /include/config/?
//edit2
copying the conf.inc.php file to that folder made "upgrade" function at least viewable.
the screen asks me to upgrade sql data base. i've been given a couple of update scripts .. It look like for every version there was an update script for sql. while the most recent script was from 1.4 to 1.5 and I am running 1.6.531 there was nothing for me to do. visiting the login screen and logging in went well ... it is like there are all articles and templates still there...
but looking at the actual website it is absolutely messed up. it can't be that difficult to upgrade phpwcms, can it???
//edit3:
got it working. config.inc.php was messed up.
Please proof location of "conf.inc.php".
//edit1
/setup/upgrade.php:
Code: Select all
$_this_path = realpath(dirname(__FILE__).'/../');
if(is_file($_this_path.'/include/config/conf.inc.php')) {
require_once ($_this_path.'/include/config/conf.inc.php');
} else {
die('Please proof location of "conf.inc.php".');
}
//edit2
copying the conf.inc.php file to that folder made "upgrade" function at least viewable.
the screen asks me to upgrade sql data base. i've been given a couple of update scripts .. It look like for every version there was an update script for sql. while the most recent script was from 1.4 to 1.5 and I am running 1.6.531 there was nothing for me to do. visiting the login screen and logging in went well ... it is like there are all articles and templates still there...
but looking at the actual website it is absolutely messed up. it can't be that difficult to upgrade phpwcms, can it???
//edit3:
got it working. config.inc.php was messed up.
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
The place for the configuration files have been mooved from:
.../config/phpwcms/take all the files from here
to
.../include/config/put all the files in here
you can now delete the empty folders .../config/phpwcms/no more files here
.../config/phpwcms/take all the files from here
to
.../include/config/put all the files in here
you can now delete the empty folders .../config/phpwcms/no more files here
Re: Upgrade 1.4.2 to 1.7.5 Clear Instructions.
Thank you very much! Now the upgraded version is online and runs fine (as far as I say).
BTW: Kalaidoscope did a good job in merging the templates.
BTW: Kalaidoscope did a good job in merging the templates.