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

Home » General » FUDforum in eGroupWare » Cannot download attachments in fudforum after mysql upgrade
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Cannot download attachments in fudforum after mysql upgrade [message #29120] Wed, 30 November 2005 20:09 Go to next message
Crib is currently offline  Crib   United States
Messages: 2
Registered: November 2005
Location: Bloomington, Indiana
Karma: 0
Junior Member
It appears that after upgrading mysql to version 4.1.14 (which is current for Gentoo), users are now not able to download attachments from fudforum, due to a mysql syntax error. I have verified that the files are being uploaded, and the posts reflects a link to the attachment, but when one attempts to download the attachment, the following error message is generated:

(/var/www/localhost/htdocs/egroupware/fudforum/2456323713/in dex.php:131
/var/www/localhost/htdocs/egroupware/fudforum/2456323713/ind ex.php:197
/var/www/localhost/htdocs/egroupware/fudforum/2456323713/the me/default/getfile.php:115
/var/www/localhost/htdocs/egroupware/fudforum/2456323713/ind ex.php:412
) 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod ON mod.forum_id=t.forum_id AND mod.user_id=3 LEFT JOIN phpgw_fud_mime mm ' at line 7
Query: SELECT mm.mime_hdr, a.original_name, a.location, m.id, mod.id, ((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) & 2) > 0 FROM phpgw_fud_attach a INNER JOIN phpgw_fud_msg m ON a.message_id=m.id AND a.attach_opt=0 INNER JOIN phpgw_fud_thread t ON m.thread_id=t.id INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=t.forum_id LEFT JOIN phpgw_fud_mod mod ON mod.forum_id=t.forum_id AND mod.user_id=3 LEFT JOIN phpgw_fud_mime mm ON mm.id=a.mime_type LEFT JOIN phpgw_fud_group_cache g2 ON g2.user_id=3 AND g2.resource_id=t.forum_id WHERE a.id=2
Server Version: 4.1.14
[Referring Page] https://xxx.xxx.xxx.xxx/egroupware/fudforum/2456323713/index .php?t=msg&th=13&start=0&

I have verified that a reference to the file exists in mysql, and also that the uploaded file exists in the file system. It seems that the problem is that egroupware is not doing the query in a syntax that mysql likes. Unfortunately, I am short on mysql syntax. Please help!

Also, I'm running egroupware version 1.0.0.009

Thanks so much if you can help!

-Trent
Re: Cannot download attachments in fudforum after mysql upgrade [message #29141 is a reply to message #29120] Thu, 01 December 2005 15:49 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
Modify the code not to use the "mod" alias, change it to "md".

FUDforum Core Developer
Re: Cannot download attachments in fudforum after mysql upgrade [message #29151 is a reply to message #29141] Thu, 01 December 2005 23:11 Go to previous message
Crib is currently offline  Crib   United States
Messages: 2
Registered: November 2005
Location: Bloomington, Indiana
Karma: 0
Junior Member
Thanks very much for the quick response Ilia. I was able to fix the issue today. The file I modified was:

egroupware/fudforum/xxxxxxxxx/theme/default/getfile.php

-Trent
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Création de sous-catégorie et/ou sous forum (Creation of subcategory and/or subforum)
Next Topic: Most Current Release in eGroupWare?
Goto Forum:
  

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

Current Time: Sun Nov 03 13:11:08 GMT 2024

Total time taken to generate the page: 0.07720 seconds