Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Upgrade problems.....

Quote Reply
Upgrade problems.....
Upgraded from 1.1.1 to 1.1.3. Everything seemed to be working fine but all of a sudden got the error

A fatal error has occurred:
Can't call method "fetchrow" on an undefined value at /www/davidd/cgi-bin/forum/admin/GForum/Category.pm line 322.


Please enable debugging in setup for more details.





GT::SQL::error = Failed to execute query: 'SELECT forum_id_fk,COUNT(*) FROM gforum_Post USE INDEX (p_rfmp) WHERE ( ( ( forum_id_fk = ? AND post_time > ? ) OR ( forum_id_fk = ? AND post_time > ? ) OR ( forum_id_fk = ? AND post_time > ? ) OR ( forum_id_fk = ? AND post_time > ? ) OR ( forum_id_fk = ? AND post_time > ? ) OR ( forum_id_fk = ? AND post_time > ? ) ) AND user_id_fk = ? AND post_root_id = ? )
GROUP BY forum_id_fk' Reason: You have an error in your SQL syntax near 'USE INDEX (p_rfmp) WHERE ( ( ( forum_id_fk = '5' AND post_time > 1015431765 ) O' at line 1

Everything was working fine with 1.1.1 - Any ideas, I have read some of the other bug reports but none seem too similar...
Quote Reply
Re: [David_D] Upgrade problems..... In reply to
Just realised that I only get this error when I log on with the admin acount...I can reply to private messages and log on that way but not via the front page using gforum.cgi? . I can still access the admin page as well..???? The other part of the above error after debugging which I accidently left out was:

Please enable debugging in setup for more details.

Stack Trace
======================================
GForum (29262): GForum::Category::_calc_new called at /www/davidd/cgi-bin/forum/admin/GForum/Category.pm line 69 with arguments
(ARRAY(0x84ba2fc)).
GForum (29262): GForum::Category::list called at /www/davidd/cgi-bin/forum/admin/GForum.pm line 292 with arguments
(GForum::Category, cat_list, HASH(0x83e2894)).
GForum (29262): GForum::_plg_do_func_2 called at /www/davidd/cgi-bin/forum/admin/GForum.pm line 240 with arguments
(cat_list).
GForum (29262): GForum::__ANON__ called at /www/davidd/cgi-bin/forum/admin/GT/Plugins.pm line 88 with arguments
(cat_list).
GForum (29262): GT::Plugins::dispatch called at /www/davidd/cgi-bin/forum/admin/GForum.pm line 240 with arguments
(GT::Plugins, /www/davidd/cgi-bin/forum/admin/Plugins/GForum, do_cat_list, CODE(0x8317b24), cat_list).
GForum (29262): GForum::_plg_do_func called at /www/davidd/cgi-bin/forum/admin/GForum.pm line 231 with arguments
(cat_list).
GForum (29262): GForum::__ANON__ called at /www/davidd/cgi-bin/forum/admin/GT/Plugins.pm line 88 with arguments
(cat_list).
GForum (29262): GT::Plugins::dispatch called at /www/davidd/cgi-bin/forum/admin/GForum.pm line 231 with arguments
(GT::Plugins, /www/davidd/cgi-bin/forum/admin/Plugins/GForum, do_func, CODE(0x8315184), cat_list).
GForum (29262): GForum::do_func called at /www/davidd/cgi-bin/forum/gforum.cgi line 101 with arguments
(cat_list).
GForum (29262): main::main called at /www/davidd/cgi-bin/forum/admin/GT/Plugins.pm line 88 with no arguments.
GForum (29262): GT::Plugins::dispatch called at /www/davidd/cgi-bin/forum/gforum.cgi line 23 with arguments
(GT::Plugins, /www/davidd/cgi-bin/forum/admin/Plugins/GForum, main, CODE(0x80cd6d0)).

Last edited by:

David_D: Mar 26, 2002, 6:51 PM
Quote Reply
Re: [David_D] Upgrade problems..... In reply to
Can you e-mail me a username/password to your admin panel, and I'll take a look (jason@gossamer-threads.com). It seems not to like the 'USE INDEX' part - are you using MySQL? (I hope so - that shouldn't appear under anything else).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [David_D] Upgrade problems..... In reply to
Hi David,

I tracked this down, and it turns out to be a problem with older versions of MySQL. 1.1.3 (and 1.1.2) have a redesigned "new post" calculation. Unfortunately, MySQL "optimizes" the query in such a way that they slow down significantly unless we add a MySQL directive to use a certain index (other databases do not exhibit this problem). The error, however, was caused by the fact that this MySQL directive was not present in older versions of MySQL (those before 3.23.12, to be specific). I've fixed this on your copy, however I also recommend that, if possible, you upgrade MySQL to the latest version (3.23.49a, as of this writing). It isn't strictly necessary, but the latest has many bug fixes and optimizations so that you may notice a difference - especially as your forum grows.

If anyone else encounters the problem, the attached admin/GForum/Category.pm will correct the error.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Upgrade problems..... In reply to
Many many thanks once again. I've upgraded MySQL on the work server & will speak to my ISP re: the other... Thanks
Quote Reply
Re: [Jagerman] Upgrade problems..... In reply to
Actually, I'm getting the same error, and i just went and installed the fix, but it's not working out for me...

I'm running Mysql 3.23, also have Links SQL 2.1 installed.

Am I missing something else?