Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Upgrading Questions

Quote Reply
Upgrading Questions
Since the install.dat file is really just a tar file of all the individual files that get installed, is it possible to edit the install.dat file directly with all my changes before running the install.cgi script? It would probably save a bit of downtime in upgrading. Or does the install script edit these files that might cause a problem for me?

Also, is the changelog file up to date... the most recent change date in the copy I downloaded on 2/3/2002 is 11/1/2001? And I didn't see any reference to database changes, so I was wondering if there haven't been any in a while or are they just not listed here?

Almost forgot, I haven't run the isntall yet since I switched the database to a separate physical box, but will having the scripts on one server and the database on another create any problems in running the upgrade?

And if I choose to skip on the templates, does it only skip the templates in data/templates but still update the templates in admin/mysqlman/templates and admin/templates or does it skip all of those too?

Last edited by:

JerryP: Feb 24, 2002, 1:37 AM
Quote Reply
Re: [JerryP] Upgrading Questions In reply to
I have a few more questions about upgrading from 2.05 to 2.06 if I may.

There was a bug before in incoming.pl at line 316 that caused checking of remote pop accounts to fail if the previous pop account being checked failed. In 2.06 it looks like the fix was not incorporated. I tried searching to find where the fix was posted but can't seem to find it right now in the forum.

the old code was
my $count = $POP->connect or die $GT::Mail::POP3::error;

the new code is
my $count = $POP->connect;
if ((!$count) {
GMail->debug ("Unable to connect to POP: $GT::Mail::POP3::error");
return;
}

does this fix need to be reapplied or has it been fixed somewhere else?

Next, when upgrading I got this error message

Upgrading Gossamer Mail from 2.0.5 to 2.0.6 ...
Changing the name of a column in the user table; 'user' is changed to 'email' because 'user' is a reserved word in SQL92 ...
Error: DBD::mysql::st execute failed: Access denied for user: 'mail@domain.com' to database 'gmail' at /www/domain/cgi-bin/mail/admin/GT/SQL/Driver/MYSQL.pm line 113.

My database is on a separate server from the web server and I'm not sure yet if it failed because of a permissions issue or because the database is on the other server, but I manually made the alteration to the table. My question is, this appears to be the last step in the install process under sub upg_205_206 in the install.cgi, so if I manually altered the database, is the upgrade complete or is there anything else that needs to be continued/rerun? I noticed that in mail/admin/GMail/ConfigData.pm the version number did not get changed, so that's what makes me wonder that there might be something else... I'd rather not re-run the install because I've finished applying all my custom changes which took about 6 hours so if someone can point me to exactly what else needs to be done, I'd be most appreciative.

Next, in this upgrade it appears that the alteration to the database above caused a lot of changes, whereever 'user' was used it had to be changed to 'email'. I have a few templates that still have <%user%> in them and wanted to see if this was an oversight or if these need to be changed too. The templates/files are
admin/Plugins/GMail/wap.pm
data/templates/default/admin.eml
data/templates/default/options_compose.htm (two places)
data/templates/default/options_mailbox.htm

I think that about covers it, thanks for any help folks can provide.
Quote Reply
Re: [JerryP] Upgrading Questions In reply to
Hi,

Lots of questions there. Let me know if I missed one. =)

For upgrading, the version number does not get bumped until after all files have been extracted and all upgrade routines have been run. This allows you to rerun install.cgi if you need to.

If you look at sub upg_205_206 in install.cgi you'll see what needs to take place. Basically the user Gossamer Mail runs as did not have permission to alter the database. You must either give it permission or do it manually. You need to:

1. Run:

ALTER TABLE gmail_users CHANGE COLUMN user email CHAR(255) NOT NULL

2. Edit data/admin/defs/gmail_users.def and change:

i. cols->{user} to cols->{email}
ii. unique->{userunique} = ['email']

3. Edit data/admin/defs/gmail_sessions.def and change:

fk->{users}->{session_user} = 'email';

4. Finally edit admin/GMail/ConfigData.pm and update the version to 2.0.6.

There is an issue with 2.0.6 where a few templates still reference user. We will have this fixed shortly.

As for the bug in incoming.pl, it was fixed nov 28, not in time for 2.0.6, but definately for the next release.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Upgrading Questions In reply to
Alex,

In Reply To:
3. Edit data/admin/defs/gmail_sessions.def and change:
fk->{users}->{session_user} = 'email';

Item 2 seems to have been changed okay (my code looks a bit different in the def file, but I understand where you made the changes). On item 3 though, the closest code I can find is this

Code:
'fk' => {
'webmail_users' => {
'session_user_id' => 'user'
}

is that what you are referring to and I need to change 'user' at the very end to 'email'? And after changing the version number in item 4, do I need to do anything special like resyncing or anything?

In Reply To:
There is an issue with 2.0.6 where a few templates still reference user. We will have this fixed shortly.

Did I miss any templates in the list I had above and is <%user%> the only thing I need to change to <%email%>?


Also, since the incoming.pl bug fix didn't get into 2.06 and that was back in November, is there a list somewhere of other bug fixes that should be applied? And my questions in the first post didn't have answers yet...
Quote Reply
Re: [Alex] Upgrading Questions In reply to
In Reply To:
As for the bug in incoming.pl, it was fixed nov 28, not in time for 2.0.6, but definately for the next release.

I found the thread, it's here
http://www.gossamer-threads.com/...orum.cgi?post=168832

but i have a problem, when I add that to incoming.pl which runs out of cron, I get error messages... I'd been out of the office all day and at a message every 5 minutes for 16 hours, I've gotten a few by now... here's what shows up in my cron'd error message from the running of incoming.pl

syntax error at /www/domain/cgi-bin/mail/batch/incoming.pl line 321, near "return"
Global symbol "$count" requires explicit package name at /www/domain/cgi-bin/mail/batch/incoming.pl line 324.
Global symbol "$account" requires explicit package name at /www/domain/cgi-bin/mail/batch/incoming.pl line 327.
syntax error at /www/domain/cgi-bin/mail/batch/incoming.pl line 341, near "}"
Execution of /www/domain/cgi-bin/mail/batch/incoming.pl aborted due to compilation errors.

In going through the fix code, I see a double left paren on the line that begins with if but I don't see both of them closed. Is that an error in the fix?

Last edited by:

JerryP: Feb 26, 2002, 4:53 PM