Page 1 of 2

r403 --> check your databasessssssss!

Posted: Sun 14. Nov 2010, 01:14
by Jensensen
klasse. auf dieses update haben wir gewartet.
lieber oliver, vielen dank. aber warum so viel auf einmal?

in der kategorie "fürchterlich aufwendig" erhält dieses update von mir **** --> vier sterne +++
das macht spaß - stundenlang, juchee.
das geht wieder einmal auf anhieb, geradezu perfekt zügig, wie gewohnt reibungslos und dazu noch geradewegs flüssig - in die hose.

what a great shit. nobody tells you about.
again this update requires that you update all your databasesssssss - by hand:
just compare /setup/default_sql/phpwcms_init_410.sql with your old one.

Code: Select all

ALTER TABLE `phpwcms_articlecat` ADD `acat_class` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `phpwcms_articlecat` ADD `acat_keywords` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `phpwcms_articlecontent` ADD `acontent_tab` varchar(255) NOT NULL default '';
Don't forget to add the table prefix of your choice when adding this sql query!!

also check your config!
one variable is new, two has been altered:
/config/phpwcms/dist.conf.inc.php

Code: Select all

$phpwcms['be_lang_parse']     = false; // to disable backend language parsing use false, otherwise 'BBCode' or 'BraceCode'
$phpwcms['mode_XHTML']        = 1; // Doctype: 1 = XHTML 1.0 Transitional, 0 = HTML 4.01 Transitional, 2 = XHTML 1.0 Strict, 3 = HTML5
$phpwcms['wysiwyg_template']  = array( 'FCKeditor' => 'phpwcms_basic,phpwcms_default,Default,Basic', 'CKEditor' => 'phpwcms,Default,Basic' );


Next issue:
the old setup was

Code: Select all

CREATE TABLE `phpwcms_sysvalue` (
  `sysvalue_key` varchar(255) NOT NULL default '',
  `sysvalue_group` varchar(255) NOT NULL default '',
  `sysvalue_lastchange` int(11) NOT NULL default '0',
  `sysvalue_status` int(1) NOT NULL default '0',
  `sysvalue_vartype` varchar(100) NOT NULL default '',
  `sysvalue_value` text NOT NULL,
  PRIMARY KEY  (`sysvalue_key`),
  KEY `sysvalue_group` (`sysvalue_group`),
  KEY `sysvalue_status` (`sysvalue_status`)
) ENGINE=MyISAM ;
since r403 it is

Code: Select all

CREATE TABLE `phpwcms_sysvalue` (
  `sysvalue_key` varchar(255) NOT NULL default '',
  `sysvalue_group` varchar(255) NOT NULL default '',
  `sysvalue_lastchange` int(11) NOT NULL default '0',
  `sysvalue_status` int(1) NOT NULL default '0',
  `sysvalue_vartype` varchar(255) NOT NULL default '',
  `sysvalue_value` mediumtext NOT NULL,
  PRIMARY KEY  (`sysvalue_key`),
  KEY `sysvalue_group` (`sysvalue_group`),
  KEY `sysvalue_status` (`sysvalue_status`)
) ENGINE=MyISAM ;



HOW CAN I CHANGE

Code: Select all

  `sysvalue_vartype` varchar(100) NOT NULL default '',
  `sysvalue_value` text NOT NULL,
INTO

Code: Select all

  `sysvalue_vartype` varchar(255) NOT NULL default '',
  `sysvalue_value` mediumtext NOT NULL,
on a running system?
Can I live without touching it?


Thank you.

Re: r403 --> check your databasessssssss!

Posted: Sun 14. Nov 2010, 08:03
by flip-flop
Hallo Jens,

wenn es nicht klappt mit dem Update, probiere diese Variante: Update nach r403 von < r401

Knut

Re: r403 --> check your databasessssssss!

Posted: Sun 14. Nov 2010, 12:52
by update
Ahh - da bist Du ja wieder, Jens :D

Re: r403 --> check your databasessssssss!

Posted: Mon 15. Nov 2010, 07:18
by Oliver Georgi
To solve failing automatic db upgrade it might help to delete all r***.checked.tmp files in content/tmp. Logout before doing so. Then login again and build-in upgrade process should run as expected.

Re: r403 --> check your databasessssssss!

Posted: Mon 15. Nov 2010, 09:49
by update
Bislang hat sich das System allen Versuchen widersetzt, es up zu daten - weder Olivers Hinweis noch die Variante von Knut halfen. Ich habe das Gefühl, dass:
Fatal error: _setConfig failed in F:\xampp\htdocs\aktuelledomain\include\inc_lib\dbcon.inc.php on line 538
gar nicht bis zum Rendern kommt.
Auf jeden Fall ist dieses (Test)System bislang unupdatable.

Re: r403 --> check your databasessssssss!

Posted: Tue 16. Nov 2010, 22:15
by Jensensen
Thank you all.
I opened this thread to avoid those questions that just always begin with words like "it's not working", "i have an error".

Well, I have no problem in general to do an update. It's just always tricky and, it needs all your attention. Most hosting solutions give you not the ability that you could use SVN or tools like that.

Merging the local SVN diff files without errors with the files on remote servers is very difficult. You really need much time for every single manual upgrade. Maybe, I must rethink my procedure. Any tip, procedural description, how-to available?


And here comes my other past experience.
Knut, I haven't used your script because you called it still untested. btw: I always use the latest[newest] version. It's r402 I'm talking about. The script refers older versions <401.
But there I found the necessary code. Anyway it was very helpful.

This is the SQL-command that can be used in phpMyAdmin. (regarding TABLE `phpwcms_sysvalue`, what was - in fact - my last question)

Code: Select all

ALTER TABLE `phpwcms_sysvalue` CHANGE `sysvalue_vartype` sysvalue_vartype varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `phpwcms_sysvalue` CHANGE `sysvalue_value` sysvalue_value mediumtext NOT NULL;

I work always very carefully but it looks like that in earlier steps something went wrong. Very strange and somehow irritating but the field `sysvalue_vartype` does not exist - in r402. Can it be?

I had to change the SQL-command to add the field `sysvalue_vartype` into the table `phpwcms_sysvalue`:

Code: Select all

ALTER TABLE `phpwcms_sysvalue` ADD `sysvalue_vartype` varchar(255) NOT NULL DEFAULT '';

BTW: the new release 403 offers new templates. for example CP images <DIV> and imagespecial now have some new variables "formatted like WIN.INI". these both and also teaser.tmpl have a new matrix-like concept using [COLUMN] and rows.

Anybody already knows, how to use it? What can I get? How does it looks like? What is it good?





***
und für doofe wie mich sei die frage noch erlaubt:
habe seit längerem und des öfteren von dem automatischen update gelesen (changelog usw.).

a) offenbar bezieht sich das automatische update nur auf änderungen in der datenbank, nicht wahr?
b) wie kann man das automatische update überhaupt auslösen? im BE habe ich nichts neues gefunden.
c) ist das automatische update etwa das {zufällig hier} von Knut referenzierte script, das man manuell hin- und herschieben muss?


@claus: eigentlich, und zum glück, war ich nie ganz weg, bin aber leider auch seit geraumer zeit mit keinem viertelstündchen freizeit mehr ausgestattet... i didn't forget... i tell you...

Re: r403 --> check your databasessssssss!

Posted: Wed 17. Nov 2010, 12:10
by Oliver Georgi
As I said – missed one significant update 1.3.5->1.5 which creates phpwcms_sysvalue.

Re: r403 --> check your databasessssssss!

Posted: Wed 17. Nov 2010, 18:18
by update
No, this can't be the reason for the failure: I'm running the shop for 2 years now and sysvalue has been there all the time....
As I've said before: up to r400 everything was really fine!

Re: r403 --> check your databasessssssss!

Posted: Wed 17. Nov 2010, 20:49
by Jensensen
Oliver Georgi wrote:As I said – missed one significant update 1.3.5->1.5 which creates phpwcms_sysvalue.
No, no, you get me wrong.

Once again:
This is a part of the SQL-commands that are necessary with r403:

Code: Select all

ALTER TABLE `phpwcms_sysvalue` CHANGE `sysvalue_vartype` sysvalue_vartype varchar(255) NOT NULL DEFAULT '';
The result was: I got an error message in phpMyAdmin.
So, I took a look into the database.
The TABLE `phpwcms_sysvalue` exists already, but the field `sysvalue_vartype` was missing.


Then I have added the field with the new settings (required by r403).

Code: Select all

ALTER TABLE `phpwcms_sysvalue` ADD `sysvalue_vartype` varchar(255) NOT NULL DEFAULT '';

Update 1.3.5->1.5 has been saved the last time in September 2008. I can't remember the SQL-commands at that time. But I'm sure that I never used this file, because 'we' make updates manually, step by step.
It's possible that I overlooked or forget important changes. This happens when you have to search the content of new files to get to know what you really need to do to get best results.

Likely the mistake has happened exactly at this step. That's the problem. Thus I doubt the reliability of the procedure.
That's the theme of this article.

For me it means one hour searching, comparing, extracting, preparing files, then checking, adjusting and again checking, but this time, templates. Once again comparing, testing. Maintenance of the servers. Logging in, Backend, phpMyAdmin... copying, ftping,... Hours and hours. Again and again - for every project using phpwcms.

For you it means a handful lines of code for example in the changelog file.

Re: r403 --> check your databasessssssss!

Posted: Thu 18. Nov 2010, 08:16
by Oliver Georgi
I know, sorry for that. I am bored too of that crappy old update thing.

It would be fine to write an auto db upgrade that can handle every neccessary task. With new revisions thing I have shown how this can work.

A handy thing is to use phpMyAdmin and export old db schema (without data) then create a fresh db with the new schema, export it too with same settings as the old db. Then do a compare with WinMerge on Win or Changes or equal app on Mac.

It is faster than doing it visually.

Re: r403 --> check your databasessssssss!

Posted: Thu 18. Nov 2010, 12:20
by baklavoni
Oliver Georgi wrote: It would be fine to write an auto db upgrade that can handle every neccessary task. With new revisions thing I have shown how this can work.
Hello Oliver!

Where I can see your revisions of how this can work?
And, is there any estimate, when it will be done?

Greetings

Re: r403 --> check your databasessssssss!

Posted: Thu 18. Nov 2010, 12:40
by Oliver Georgi
See include/inc_lib/revision/*.php

And it is not planned on my side to implement this for older releases.

Re: r403 --> check your databasessssssss!

Posted: Thu 18. Nov 2010, 13:49
by flip-flop
1. login.php

Code: Select all

// make compatibility check
if(phpwcms_revision_check_temp($phpwcms["revision"]) !== true) {
	phpwcms_revision_check($phpwcms["revision"]);
}
2. In /include/inc_lib/backend.functions.inc.php
-> "phpwcms_revision_check" and "phpwcms_revision_check_temp".

3. DB-Update files: -> include/inc_lib/revision/r[rev-No].php

4. If "/content/tmp/r[rev-No].checked.php" exists, no update available.
These files are generated when the appropriate automatic DB-updates were implemented.
"login.php" looks for the existence of these files.
If these files are not present an update is attempted.


In Technics/core it is very easy to follow the function calls.

Knut

Re: r403 --> check your databasessssssss!

Posted: Thu 18. Nov 2010, 14:44
by baklavoni
Oliver Georgi wrote:See include/inc_lib/revision/*.php

And it is not planned on my side to implement this for older releases.
Oh, I didn't saw it before,... OK, I'll read about it more...

And one more question: What is considered as older release? Older than r401?

flip-flop wrote: In Technics/core it is very easy to follow the function calls.

Knut
Thanks Knut, I'll read it and will try to do as instructed.


Many thanks!

Re: r403 --> check your databasessssssss!

Posted: Thu 2. Dec 2010, 22:48
by baklavoni
Ok, I attempt to upgrade to 1.4.7 from 1.4.2
I created fresh install of 1.4.7, and then made export of DB structure. Also I made export of 1.4.2 DB structure.
After that I compared it with WinMerge, and I made file with all necessary updates...

After upgrade of DB, I copied new config/phpwcms/ files (overwriting old ones). Of course, I made **** of new and old config files, and I added new stuff where it belong.
Then I overwrite include, img and template directories (my custom files remained in overwritten directories).
After that, I overwrite files in root folder (index.php, login.php, etc)

In frontend, i have bad situation... My JS Image rotator on index page is not working, page Background is not displayed (bg image setting in pagelayout),...
I checked templates and pagelayout,... It seems that all data is there, but it is not rendering data from pagelayout (background color and bg picture).

You can check how it look like on http://www.kompas.ba/cms2
This is how it suppose to look http://kompas.ba/cms2

I checked revision files,... they are created in content/tmp/ (files: r401.checked.tmp, r403.checked.tmp, r406.checked.tmp).
I suppose r402.checked.tmp isn't meant to be created?

Where I did go wrong?

Help please!