r403 --> check your databasessssssss!

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

r403 --> check your databasessssssss!

Post 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.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: r403 --> check your databasessssssss!

Post by flip-flop »

Hallo Jens,

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

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: r403 --> check your databasessssssss!

Post by update »

Ahh - da bist Du ja wieder, Jens :D
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: r403 --> check your databasessssssss!

Post 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.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: r403 --> check your databasessssssss!

Post 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.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: r403 --> check your databasessssssss!

Post 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...
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: r403 --> check your databasessssssss!

Post by Oliver Georgi »

As I said – missed one significant update 1.3.5->1.5 which creates phpwcms_sysvalue.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: r403 --> check your databasessssssss!

Post 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!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: r403 --> check your databasessssssss!

Post 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.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: r403 --> check your databasessssssss!

Post 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.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
baklavoni
Posts: 170
Joined: Mon 23. Oct 2006, 00:48
Location: Bosnia and Herzegovina

Re: r403 --> check your databasessssssss!

Post 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
There is no page like home page...
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: r403 --> check your databasessssssss!

Post by Oliver Georgi »

See include/inc_lib/revision/*.php

And it is not planned on my side to implement this for older releases.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: r403 --> check your databasessssssss!

Post 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
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
baklavoni
Posts: 170
Joined: Mon 23. Oct 2006, 00:48
Location: Bosnia and Herzegovina

Re: r403 --> check your databasessssssss!

Post 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!
There is no page like home page...
User avatar
baklavoni
Posts: 170
Joined: Mon 23. Oct 2006, 00:48
Location: Bosnia and Herzegovina

Re: r403 --> check your databasessssssss!

Post 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!
There is no page like home page...
Post Reply