FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » upgrade problem
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
upgrade problem [message #17000] Tue, 09 March 2004 15:24 Go to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
I'm upgrading from 2.3 to 2.6 using upgrade script dated 1/4/04.

First of all, is there a bug in line 444 about $k vs k?

As I watched, the script tried to upate the users table by first creating a tmp version of each of the MYI and MYD files, but as soon as the size of the tmp files reach the size of the originals, the script stops and prompts me for login again. Once I logged in, the process will start all over again.

When I first stared I saw some message on my screen, but not any more, now, as soon as I log in, the script goes directly to the users table, and spins wheels there.

Any suggestions? Thanks!
Re: upgrade problem [message #17001 is a reply to message #17000] Tue, 09 March 2004 15:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The typo online 444 was fixed, thanks for letting me know about the problem.

Which database backend are you using? (name & version please)

Could you please add a .txt file with the structure of your users table.


FUDforum Core Developer
Re: upgrade problem [message #17002 is a reply to message #17001] Tue, 09 March 2004 16:00 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Thanks for the quick response!

The database is:
mysql Ver 12.22 Distrib 4.0.16, for sun-solaris2.8 (sparc)

Attched is the structure of the users table:

Thanks!
Re: upgrade problem [message #17003 is a reply to message #17002] Tue, 09 March 2004 16:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Ok.

The temporary 'tables' that are being created are actually being created by MySQL when it modified the table structure of the table. Your table needs quite a few modifications performed on it.

The fact that the script stops implies some sort of an error, that I would expect to see on screen. Please check the following:

1) Make sure that PHP errors would be displayed on screen of they are not that they are logged to a file (check that file for errors).

2) Check your webserver log to see if perhaps PHP/Apache is crashing?

3) Try modifying the function q($query) to print the $query string to screen so you can see on what query does it die.

4) Ensure that your MySQL data directory has sufficient space.


FUDforum Core Developer
Re: upgrade problem [message #17006 is a reply to message #17003] Tue, 09 March 2004 16:53 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Thanks for the anylasis!

- PHP/apache did not crash
- We have planty space on the servers hosting fudforum and mysql
- What's the proper way to modify upgrade.php? I tried something, but after save, the file size shrunk greatly and I failed the "checksum test" when I try to run it again.
- How can I make upgrade.php to print to screen? It used to do that complainintg about that can't access .htacess file etc., after I fixed those, it stopped print message to the screen.

Thanks!
Re: upgrade problem [message #17007 is a reply to message #17006] Tue, 09 March 2004 16:58 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
To edit the file follow these simple instructions:

1) Get a new files from the FUDforum upgrade archive.
2) Add echo <?php
$query
."<br />\n";
?>
inside the q() function before the query execution.
3) Save the file, (before you save the file make sure that your editor didn't wordwrap the file or convert \n to \r\n).


FUDforum Core Developer
Re: upgrade problem [message #17011 is a reply to message #17007] Tue, 09 March 2004 17:17 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
I use vi on a unix box and after save, the file size did decrease greatly. How can I avoid that and to pass the checksum test?
Thanks!
Re: upgrade problem [message #17013 is a reply to message #17011] Tue, 09 March 2004 17:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
No idea, I don't use VI Wink

FUDforum Core Developer
Re: upgrade problem [message #17014 is a reply to message #17000] Tue, 09 March 2004 17:20 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If you want give me access to the server and I'll try to figure out and resolve the problem. It is possible that there is a bug in the upgrade script, which is why you are having all these problems.

FUDforum Core Developer
Re: upgrade problem [message #17016 is a reply to message #17014] Tue, 09 March 2004 17:31 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
The saerver is behind firewall, I'm afraid you can't access it. What other editor you recommend can perserve the end of liners?
Thanks!
Re: upgrade problem [message #17017 is a reply to message #17016] Tue, 09 March 2004 17:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I use JOE editor.

FUDforum Core Developer
Re: upgrade problem [message #17046 is a reply to message #17017] Fri, 12 March 2004 13:26 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
After about 8 hours running, I got another sql error when it tried to update fud23_pmsg set fldr = X where folder_id = 'SENT'. Sad

I noticed that when the table fud23_pmsg was re-created, folder_id field is gone, so it the above sql still valid?

In the upgrade.php script, how/where the function pmsg_fldr is called? If I want to skip all the prior steps until pmsg_fldr() what should I do?

Thanks!


Re: upgrade problem [message #17051 is a reply to message #17046] Fri, 12 March 2004 20:05 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The SQL modifications that may take a long time (you probably have a very large forum) will not happen if they already occurred. The changes that are being made based on the table structure comparison, if it is good the previously made changes were successful it won't try to re-apply them.

The function pmsg_fldr() will be called right after fldr field was added to pmsg table.


FUDforum Core Developer
Re: upgrade problem [message #17105 is a reply to message #17051] Wed, 17 March 2004 13:20 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
It happened again and here's the error message I got:

Populating pdest field for private messages
Q: SELECT to_list, id FROM fud23_pmsg WHERE folder_id='SENT' AND duser_id=ouser_id
MySQL Error: #1054 (Unknown column 'folder_id' in 'where clause'): SELECT to_list, id FROM fud23_pmsg WHERE folder_id='SENT' AND duser_id=ouser_id

What should I do next? Last time it stopped like this, I tried to run upgrade.php again to continue, but it could not find my log in ID from the users table, so, I had to re-import the users table and started all over again.

Please help, thanks!
Re: upgrade problem [message #17111 is a reply to message #17105] Wed, 17 March 2004 14:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Could you do me a favor and send me the complete table structure of all your forum tables (without data).

FUDforum Core Developer
Re: upgrade problem [message #17112 is a reply to message #17111] Wed, 17 March 2004 15:52 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Here's the structure of all tables. Thanks!
Re: upgrade problem [message #17119 is a reply to message #17112] Wed, 17 March 2004 16:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Please try the 2.6.1 upgrade script the query that is failing was updated and should now work.
Re: upgrade problem [message #17143 is a reply to message #17119] Thu, 18 March 2004 13:13 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
With 2.61 I've gone further this time, but it stopped again at a later place, please advice!

Reserving id for anon users
Q: SELECT * FROM fud23_users WHERE id=1
Q: INSERT INTO fud23_users (id, login, alias, time_zone, theme, email, passwd, name, users_opt) VALUES(1, 'Anonymous Coward', 'Anonymous Coward', 'America/Montreal', 1, 'dev@null', '1', 'Anonymous Coward', 4488117)
Q: SELECT * FROM fud23_stats_cache
Q: INSERT INTO fud23_stats_cache VALUES(0,0,0,0,0,0,0)
Q: UPDATE fud23_ses SET action=REPLACE(action, 'http://bb.prohost.org/mm/', '')
Adding GLOBAL Variables
Q: SELECT theme, lang, name FROM fud23_themes WHERE (theme_opt & 1) > 0 OR id=1
Compiling theme default
Undefined template: "iemail_CHARSET" inside "iemail.inc.t"
Re: upgrade problem [message #17149 is a reply to message #17143] Thu, 18 March 2004 13:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, we are making progress Wink. The fact you reached this point indicates all SQL upgrades were successful. The problem you are having now is due to the theme compiler not finding a section, that should be defined inside iemail.tmpl. Try to open this file (thm/default/tmpl/iemail.tmpl) and see if it has the section indicated in the error. If it does not it means something during file upgrade went wrong.

P.S. Did you modify/customize the default theme?
Re: upgrade problem [message #17151 is a reply to message #17149] Thu, 18 March 2004 14:21 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Thanks for the quick response!
There's no thm directory in forum, there's only theme and I can't find the file named iemail.templ anywhere under forum.
We do customize the look and feel a bit which I don't know too much.
So, how should I continue here? Thanks!
Re: upgrade problem [message #17152 is a reply to message #17151] Thu, 18 March 2004 14:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Is your data directory the same as the web root? If it is not the thm/ directory will be inside the data directory.
Re: upgrade problem [message #17153 is a reply to message #17152] Thu, 18 March 2004 14:53 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Found the file iemail.templ at fdata/thm/default/tmpl directory.
Here's the part about the email_CHARSET in that file.

{SECTION: CHARSET}
{CHARSET}
{SECTION: END}
Re: upgrade problem [message #17156 is a reply to message #17153] Thu, 18 March 2004 15:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That's not quite it, there should be:
{SECTION: iemail_CHARSET}
{CHARSET}
{SECTION: END}

at the very bottom of the file.
Re: upgrade problem [message #17157 is a reply to message #17156] Thu, 18 March 2004 15:46 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
The three lines start on line: 89 out of 123, that's the only place CHARSET apperaed, the bottom of this file is (last 7 lines):
{SECTION: iemail_body_lnk1}
{ROOT}?t=rview&goto={VAR: obj->id}
{SECTION: END}

{SECTION: iemail_attach_entry_lnk}
{ROOT}?t=getfile&amp;id={VAR: v[0]}&amp;{DEF: _rsid}
{SECTION: END}
Re: upgrade problem [message #17158 is a reply to message #17157] Thu, 18 March 2004 15:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
About the 3rd or 4th line from the top of the file should be
$Id: iemail.tmpl ...

please include that complete line.
Meanwhile you can modify the file manually (add the missing section), login to the admin control panel and try to rebuild the theme from the theme manager. If that works, then run the consistency checker and you'll be done.
Re: upgrade problem [message #17159 is a reply to message #17158] Thu, 18 March 2004 16:01 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
How should I edit that file and add the missing section? Please instruct.

I'm attahcing the entire iemail.tmpl file for you. I have to change the name to do so. It's iemail.tmpl.txt now.
Re: upgrade problem [message #17160 is a reply to message #17159] Thu, 18 March 2004 16:24 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm wow the file you have is very old, I wonder why it was not replaced by the upgrade script. Make sure that the user the webserver is running has write access to forum's files and re-run the upgrade script.
Re: upgrade problem [message #17161 is a reply to message #17160] Thu, 18 March 2004 16:40 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
In the templ directory, there are about 14 files owned by http and I don't have permission to write, but iemail.tmpl is not among them:
-rwxrwxrwx 1 webmstr nobody 3893 Mar 18 09:58 iemail.tmpl*
So, I should try to re-run the upgrade scritpt, I'm kind worried it won't recoganize my user name then I have to re-import the fud23_usrs table.

If the SQL upgrading has been complete, it shouldn't happen, right?

Should I ask the root to change all the template files owned by http to 777 before I run upgrade.php again? Thanks!
Re: upgrade problem [message #17165 is a reply to message #17161] Thu, 18 March 2004 17:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If SQL upgrade is complete, no more SQL upgrade commands will be executed.

-rwxrwxrwx 1 webmstr nobody 3893 Mar 18 09:58 iemail.tmpl*

should be sufficient permissions unless you have safe_mode enabled.
Re: upgrade problem [message #17166 is a reply to message #17165] Thu, 18 March 2004 17:31 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
It stopped again:

Compiling theme default
Undefined template: "dmsg_num_wrap" inside "drawmsg.inc.t"

-rwxrwxrwx 1 webmstr nobody 18218 Mar 8 09:37 drawmsg.tmpl*

It's good it doens't repeat the SQL commands!
Re: upgrade problem [message #17168 is a reply to message #17166] Thu, 18 March 2004 17:31 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Can you check what files are being modified and which are not by the upgrade script?
Re: upgrade problem [message #17170 is a reply to message #17168] Thu, 18 March 2004 17:37 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Actually, none of them have been modified by the script. Although the permissino is 777 from fdata down.
Re: upgrade problem [message #17174 is a reply to message #17170] Thu, 18 March 2004 17:56 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Does the upgrade script output any error message or are there any error messages in your PHP's error log (if you log php errors). Also is safe_mode enabled on your system?
Re: upgrade problem [message #17176 is a reply to message #17000] Thu, 18 March 2004 18:10 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Don't see any errors from upgrade.php, here's the messages (minus the SQL statements I printed out):

Checking if SQL permissions to perform the upgrade are avaliable
Disable the forum
Forum is now disabled
Beginning the file upgrade process
Begining to decompress the archive
Finished decompressing the archive
File Upgrade Complete
Any changed files were backed up to: "/webpages/forum/fdata/errors/.backup/"
SQL Upgrades Complete
Adding GLOBAL Variables
Compiling theme default
Undefined template: "dmsg_num_wrap" inside "drawmsg.inc.t"

In server log, there are many PHP Notices:

PHP Notice: Undefined variable: path in /webpages/forum/upgrade.php on line 1271

and warnings:

PHP Warning: getimagesize(/webpages/forum/im
ages/custom_avatars/180699): failed to open stream: No such file or directory in
/webpages/forum/upgrade.php on line 1266
Re: upgrade problem [message #17181 is a reply to message #17176] Thu, 18 March 2004 19:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm assuming that there are no error, then it would seem that the archive decompression process 'thinks' it can skip upgrading those files, while in reality it shouldn't.

Go into the upgrade_decompress_archive() function inside upgrade.php and try adding "echo" lines liberaly to see what's going on.
Re: upgrade problem [message #17183 is a reply to message #17181] Thu, 18 March 2004 19:41 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
Code to print message in function upgrade_decompress_archive():

if (@file_exists($path)) {
if (md5_file($path) == $meta_data[4]) {
// file did not change
echo "UDA: file not change " . $path . $meta_data[4] . " continue<br>";
continue;
}

Sample messages, it seems all files were considered as "no change":

UDA: file not change /webpages/forum/fdata/src/smtp.inc.tc64902aa789abf1d4c3f571d3ce61147 continue
UDA: file not change /webpages/forum/fdata/src/spell.inc.t38bb3ab59f52631e74f04c3ddfa6ad1f continue
UDA: file not change /webpages/forum/fdata/src/split_th.php.t0c8a7138a0e76efbaa6d3a8327803d25 continue
UDA: file not change /webpages/forum/fdata/src/ssu.inc.t590d4fa74109715e7cc69d556cbd2eb4 continue
UDA: file not change /webpages/forum/fdata/src/stats.inc.t65075781a36d95e5bd3ba0c15398de1b continue
UDA: file not change /webpages/forum/fdata/src/subscribed.php.tdfe0f51ade8717b541bead0beb2ea5aa continue
Re: upgrade problem [message #17185 is a reply to message #17183] Thu, 18 March 2004 19:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did it actually get into the tmpl/ directory?
Re: upgrade problem [message #17200 is a reply to message #17185] Fri, 19 March 2004 16:29 Go to previous messageGo to next message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
From the messages I got, it only goes into fdata/cache, include, scripts, sql and src etc., and src was the last directory it visisted under fdata from the function pgrade_decompress_archive().
Re: upgrade problem [message #17201 is a reply to message #17200] Fri, 19 March 2004 17:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
aha... so it does not get into the tmpl/ directory, which is why your templates were left unmodified...

Do me a favor, in the upgrade script, right below the
$path = str_replace('//', '/', $path);
line add:

echo $path . "::" . implode('//', $meta_data) . "\n";

Then save all of the script's output to a file and send it to me.
Re: upgrade problem [message #17203 is a reply to message #17000] Fri, 19 March 2004 17:23 Go to previous messageGo to previous message
zhangming is currently offline  zhangming   United States
Messages: 24
Registered: March 2004
Karma: 0
Junior Member
See attached.
  • Attachment: out.txt
    (Size: 9.72KB, Downloaded 644 times)
Pages (2): [1  2    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: install.php causes no action.
Next Topic: Installation Problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 11:59:32 GMT 2024

Total time taken to generate the page: 0.02477 seconds