Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
huntor
Regular
Regular



Joined: Jun 13, 2006
Posts: 54

PostPosted: Sun May 13, 2007 1:59 pm Reply with quote

If I use the rndb_upgrade.php

It is supposed to update from 2.02 to 2.10.

It should create new tables for example

nuke_banner_clients
nuke_banner_plans
nuke_banner_positions
nuke_banner_terms
nuke_cities

Correct. After looking at what this is supposed to do and what it does. It seems to only update the
nuke_config

Which I checked and it did update this. Also when you run that screen it only shows in blue that it updates that single field. It does add nore update the rest of the tables. So it stops right after nuke_config.

Other than that it looks like it updated and everything seems fine. But it does add the rest.

Am I doing something wrong or is there an error in the coding that bypasses the rest of the update?
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun May 13, 2007 3:23 pm Reply with quote

If you are upgrading from 2.10 to 2.10.01 it should only update the config value.

If you are upgrading from 2.02 all the way to 2.10.01 then it has to update quite a number of tables, just like the upgrade from 2.02 to 2.10 did.

There are messages in the program about what config value it detects and what it is doing. I just checked what's in the distribution also and it is the correct version of rndb_upgrade that incorporates both 2.02 to 2.10 and 2.10 to 2.10.01 and distinguishes between the two.

If you are still having problems after reading the above, please copy and paste the messages you get when you run the program (one of the reasons we put messages in there was for situations like this) into a quote box in a forum post in this thread. Also, please confirm what exact version of Ravennuke you were running before you started the upgrade. It makes a big difference whether it's 2.02 or 2.10.
 
View user's profile Send private message Visit poster's website
huntor







PostPosted: Sun May 13, 2007 3:43 pm Reply with quote

Yeah I tryed that but for some reason it just wanted to update the one liner from 2.10.0 to 2.10.1 What I did do was comment out the If statement on 2.10
and If statement on != 2.02
Then re edited in the config back to rn2.02
Ran the update again and it installed all the other tables it neglected to do so before. They all shows now. This is on a different website then other posts I made about 2.10. I have 6 websites running 2.02 version still.
 
fkelly







PostPosted: Sun May 13, 2007 6:01 pm Reply with quote

Humm ...

The intent of this program was that if you already had 2.10, it would just update the config values but not the other tables.

If you had 2.02 it would update the other tables, just as it did in going from 2.02 to 2.10.

I'm not the best judge of whether this works properly because (a) I wrote it and (b) I'm tired. The if statement is:


Code:
if ($config_value != 'rn2.02') {

   echo 'The valid values of the configuration field for updating by this program are rn2.10.00 and rn2.02.  Your system does not have either of those values.  Please check this out -- but this program can not be used to upgrade other versions.<br />';
   die(); }
// should not get here without being 2.02 but might as well be paranoid
if ($config_value = 'rn2.02') {


then if you are "rn2.02" it will go on to update the other tables. If your config values aren't correct this won't work properly. This isn't coded as "elegantly" as I'd like but I thought it was better to be "dumb" and "right" than to be "clever" and "wrong". But maybe I'm both dumb and wrong. If so ... let's get it fixed.
 
huntor







PostPosted: Sun May 13, 2007 7:27 pm Reply with quote

hehe Wink
 
huntor







PostPosted: Sun May 13, 2007 7:35 pm Reply with quote

Okay now my question is. After looking at one of my older installs.

After looking at the version number. This is what it has in my version.
Version_Num = rnv2.02.02 Which was the newest version before 2.10 correct???
That means this will never be true.

if ($config_value = 'rn2.02') {
$sql = "UPDATE ".$prefix."_bbconfig SET config_value='.0.22' WHERE config_name='version'";
sqlexec($sql);

Just trying to help out and understand to whats going on. I love what you guys do here.
 
fkelly







PostPosted: Sun May 13, 2007 8:28 pm Reply with quote

You are correct. If we loaded "rnv2.02.02" and tested for "rn2.02" then the test will never be correct and your work around will be appropriate. This will have to be looked at and an adjustment made, most likely. I can't give any guarantee when that will get done so if you have a 2.02 "sub" version you may need to make temporary adjustments. Sorry ... we try to pick up as much of this as we can.
 
fkelly







PostPosted: Mon May 14, 2007 2:54 pm Reply with quote

I have the changes ready to go. I just don't have time to test them, but I have confirmed what you said: the load program for 2.02 loaded "rnv2.02.02". I'm not sure if there may have been other "versions" of 2.02 along the way which may have loaded a different config_value.

The way I'm tentatively re-coding this entire section is:



Code:
$result = $db->sql_query("SELECT Version_Num FROM `".$prefix."_config` WHERE 1");

$row = $db->sql_fetchrow($result);
$config_value = $row['Version_Num'];
echo 'Your RavenNuke configuration value was detected as ' . $config_value . '<br />(This is the value that is in the "Version_Num" field of your config table.)<br />';
if ($config_value = 'rn2.10.00') {
   echo 'This program will simply update your Version_Num field to rn2.10.01 and terminate. <br />';
   echo 'You may want to independently validate that this has occurred';
    $sql = "UPDATE      ".$prefix."_config   SET Version_Num='rn2.10.01'";
   sqlexec($sql);

   die(); }
if ($config_value != 'rn2.02' AND $config_value != 'rnv2.02.02') {
   echo 'The valid values of the configuration field for updating by this program are rn2.10.00 and rn2.02 and rnv2.02.02.  Your system does not have either of those values.  Please check this out -- but this program can not be used to upgrade other versions.<br />';
   die(); }
// should not get here without being 2.02 but might as well be paranoid
if ($config_value = 'rn2.02' OR $config_value =  'rnv2.02.02') {
$sql = "UPDATE      ".$prefix."_bbconfig SET config_value='.0.22' WHERE config_name='version'";
sqlexec($sql);


So if it's rn2.02 OR rnv2.02.02 it will run thru and do all the table updates that we did going from 2.02 to 2.10. Thinking aloud, it's curious that we didn't run into this before because we used this for the 2.10 upgrade.

I don't have time to work on this anymore until Tuesday, so any comments are welcome meantime. I will run some local tests then and put it up on our production area at that time. If you are doing an upgrade meanwhile you can do what huntor did and adjust the program ... that's the advantage of open source.
 
huntor







PostPosted: Mon May 14, 2007 3:36 pm Reply with quote

fkelly I think my most favorite line in the whole script is
// should not get here without being 2.02 but might as well be paranoid
Thanks for your work Wink
 
fkelly







PostPosted: Mon May 14, 2007 6:27 pm Reply with quote

Thanks Huntor. I answered my own "thinking aloud" question while driving around tonight. We didn't do a version check on the rndb_upgrade script going from 2.02 to 2.10 so I didn't have the opportunity to make the error I did here. Looking at the 2.02.02 load files, it looks to me like the only correct version we should be upgrading from is the string: "'rnv2.02.02'". So I'm leaning to using that and eliminating the or and the and.

I will post this in our problem tracking area (internal) also and see if Raven, Montego or any of the other developers have any additional input. Might as well get it right this time rather than rushing it. I'm not sure if there are any "prior" version numbers that still qualify as 2.02 and that we should allow to upgrade thru this process. Most of the SQL statements that are executed would not do any harm and would actually be necessary to get from 2.02 to 2.10.x. The question I have is whether there was anything additional that was done to get from 2.02 to 2.02.02 and what the version number in 2.02 was initially. I don't have a copy of the first version of 2.02 and I don't see it in downloads to check.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon May 14, 2007 7:08 pm Reply with quote

I"ve made this a Sticky for now until we see where we're going to go with this.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
huntor







PostPosted: Tue May 15, 2007 9:47 am Reply with quote

Okay Wink
 
fkelly







PostPosted: Tue May 15, 2007 1:59 pm Reply with quote

The revised rndb_upgrade.php is working its way thru acceptance testing and review. But you are completely right, Huntor, we needed to test for rnv2.02.02 to permit the upgrade from 2.02 to 2.10.01 to work. Temporarily you can either revise the code, or for that matter you could run the rndb_upgrade.php script that came with the "base" rn2.10 and then the one that came with rn2.10.01. The original 2.10 script did not check for versions at all and it would do all the database updates you need to get to 2.10 tables. The only table change that's needed to get from 2.10 to 2.10.01 is to update the config_value field.

I've removed the "paranoid" part from the revised script and just did an else. Either we get the logic right ... errr ... or else.
 
bbuz
New Member
New Member



Joined: May 17, 2006
Posts: 17

PostPosted: Sun May 27, 2007 12:49 am Reply with quote

fkelly wrote:
you could run the rndb_upgrade.php script that came with the "base" rn2.10 and then the one that came with rn2.10.01. The original 2.10 script did not check for versions at all and it would do all the database updates you need to get to 2.10 tables. The only table change that's needed to get from 2.10 to 2.10.01 is to update the config_value field.


Cant find that version in downloads section. i´m stuck in this rnv2.02.02 bug. Could anyone put the 2.10 v in downloads section please?

thanks in advance
 
View user's profile Send private message
ohiodarter
Hangin' Around



Joined: Nov 06, 2002
Posts: 32

PostPosted: Tue Jul 03, 2007 11:21 pm Reply with quote

Can I ask a quickie that has been irking me? From what I am reading in this thread, none of the SQL tables have changed if you are going from 2.10.00 to 2.10.01, other than the version number, right? In other words, only files have changed, not the SQL. The installer would only need to be ran to change the version number. Am I right to assume this?

Are we up-to-date if we;
Backup our current 2.10.00 site and backup the SQL
Copy over the html directory from the 2.10.01 distro
Change the field in the config table to reflect the new version

I get the feeling that I am doing too much if this is the case. Thanks in advance.
Mike
RavensScripts
 
View user's profile Send private message
fkelly







PostPosted: Wed Jul 04, 2007 7:30 am Reply with quote

Ohio, yes what you are proposing sounds like it would work to me. You might want to check and make sure your Sentinel is up to date also, but that can be handled separately from the RN update.

In fact, I just double checked against the "production" upgrade script and you are exactly right. If you are going from 2.10.00 to 2.10.01 the only thing that's updated is the config value. However, the script does warn you to run the Sentinel upgrade separately. The Sentinel update, and whether you even need to do it, is highly dependent on what version you are starting from.
 
fade2gray
Regular
Regular



Joined: Mar 26, 2006
Posts: 87
Location: UK

PostPosted: Sat Nov 17, 2007 8:42 pm Reply with quote

Thought I'd get round to updating from 2.02.02 to 2.10.01 and found that "if ($config_value = 'rn2.10.00')" was catching everything, even if I set nuke_config_Version_Num to NULL.

The only way round it was to comment out the first two "if" statements so the code dropped through to the third.
 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Nov 19, 2007 12:32 am Reply with quote

Looks like a simple bug, it should be equality == (double =)

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
fade2gray







PostPosted: Mon Nov 19, 2007 9:55 am Reply with quote

evaders99 wrote:
Looks like a simple bug, it should be equality == (double =)
Thanks for the reminder. I've been so absorbed with AutoHotkey recently that I'd totally forgoten that php needs 2x"=" to test for equality. Rolling Eyes
 
evaders99







PostPosted: Mon Nov 19, 2007 6:51 pm Reply with quote

Looks like its fixed in the code base. So the new script will probably go out with the next RavenNuke version
 
fkelly







PostPosted: Tue Nov 20, 2007 3:25 pm Reply with quote

Sorry to get to this party so late. The double equality issue was fixed May 15 but you may have a copy prior to that.

I know it should be PHP 101 but = != ==

I screwed that up in the initial version of the update routine but it's fixed now.
 
dschulze
Client



Joined: Dec 31, 2005
Posts: 25

PostPosted: Tue Jan 22, 2008 3:53 pm Reply with quote

Sorry folks but I am only now (1/2008) getting to my 2.02 upgrade to 2.10.01.

I JUST downloaded the code today (1/22/2008) and reviewing the rndb_upgrade.php code ALL the same bugs exist so I don't get it. It seems these were uncovered back in May and the thread indicates they were corrected. I am referring to the 'rnv2.02.02' (which is my current config version value) issue as well as the '==' issue. My downloaded php module contains neither fix. Please advise. Thanks.
 
View user's profile Send private message
evaders99







PostPosted: Tue Jan 22, 2008 4:24 pm Reply with quote

Yes it was fixed when I posted in November, but I think it won't be released until v2.20.00 comes out later this month.
 
dschulze







PostPosted: Tue Jan 22, 2008 4:46 pm Reply with quote

evaders99 wrote:
Yes it was fixed when I posted in November, but I think it won't be released until v2.20.00 comes out later this month.


Ok, thanks for the quick response!
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©