Gossamer Forum
Quote Reply
Upgrade
Hi

I have a Db in 1.1 that need upgrading I have update.pl Just copy the script to your data directory and run it either from the web

But when I did it just wanted to download the file not run

Can anyone help

Quote Reply
Re: Upgrade In reply to
?Did you open the downloaded file? If so, what did it say? Was it just the content of the script, or was it an error message?

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Upgrade In reply to
I just downlaoded the upgrade.pl pop'ed it into the data directory - copyed the links.db and ran upgrade.pl from IE5 - then I just got IE'5 and a box saying did I want to download upgrade.pl ( I changed it to cgi and got the same )

I think there is a line missing in the script but not sure what

#!/usr/bin/perl
# -------------------------------------------
$ENV{'REQUEST_METHOD'} and (print "Content-type: text/plain\n\n");
open (DB, "<links.db") or print "Unable to open links database 'links.db'. Reason: $!" and exit;
open (DBOUT, ">links2.db") or print "Unable to open output database. Make sure hits dir is chmod 777 temporairly. Reason: $!" and exit;
while (<DB>) {
chomp;
s/NULL//g;
print DBOUT "$_|0|0|Yes\n";
}
close DB;
close DBOUT;
print "Added two new fields onto the end. Saved it as links2.db. Change permissions back to 755 on the hits directory.";
# ---------------------------------------------

Quote Reply
Re: Upgrade In reply to
I've never used the upgrade script, but don't you have to have it in the data folder? Looking at the way it is opening the files, it is looking for them in the same folder. Could also be wrong though Wink

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Upgrade In reply to
Yep the file is in the same folder - if you never used the upgrade folder how do you upgrade the links.db taaking out NULL is OK but it needs more ?

Quote Reply
Re: Upgrade In reply to
Im not sure how it is meant to work, but the following line looks like it is designed for a standard version of links. Do you have mods installed that required links.def to be edited?

Code:
print DBOUT "$_|0|0|Yes\n";
Maybe Eliot, Paul, Glennu, or someone else who has used this script before could shed some light Smile

Andy

webmaster@ace-installer.com
http://www.ace-installer.com