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

Home » FUDforum Development » Bug Reports » Error trying to mark messages read
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Error trying to mark messages read [message #18557] Thu, 27 May 2004 15:22 Go to previous message
darkness is currently offline  darkness   United States
Messages: 7
Registered: May 2004
Karma:
Junior Member
When clicking "mark all unread messages read" at the bottom of a list of threads within a forum, I get the following error:

Warning: pg_query(): Query failed: ERROR: parser: parse error at or near "SELECT" at character 108 . in /srv/www/forums.caliginous.net/root/index.php on line 141

Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /srv/www/forums.caliginous.net/root/index.php on line 47


The URL within the browser at this time is http://forums.caliginous.net/index.php?t=markread&rid=4&S=3aafadef3 5e99aa0a59326e3cb5f5e41&id=4&SQ=2a1e33f4b7b8d20f8a35050e62ce561d. I've attached the output phpinfo phpinfo() on my machine. Using FUDforum 2.6.3 with the "db_li() missing second argument" warning patched out per http://fudforum.org/forum/index.php?t=msg&th=3795&start=0&. (Note that error sounds the same as mine but that user's error message didn't get close to my own.)

This error occurs sporadically, really. Sometimes I can log in and click it and get an error, one time I had to click twice, etc. The same error occurs when clicking "Show [...] Unread Messages" at the top of the interface. Again, it's not consistently reproducible, but you usually only have to click around two or three times before it happens.

When I attempted to troubleshoot this error when I click "Show [...] Unread Messages" I printed $q in q() before the call to pg_query(). I saw several SQL statements apparently concatenated; I'm guessing these are actually separated by null characters, then pg_query() splits on these null characters and sends each statement to the server individually. (What I don't understand is how the statements all got stuffed into $q.) Anyway, I don't know how this code works, nor PHP, so maybe I'm not observing what I think I'm observing. I did slap strace on the postmaster process and found this to be the offending statement:

UPDATE fud26_1_read SET user_id=4, thread_id=id, msg_id=last_post_id,
last_view=1085633859 WHERE user_id=4 SELECT id, last_post_id FROM fud26_1_thread WHERE forum_id=4


It looks to me like the SQL statements got concatenated together without an intervening null character. After this is received by PostgreSQL, it tosses back "ERROR: parser: parse error at or near \"SELECT\" at character 108".

Thanks in advance, let me know if I can provide any other information.
  • Attachment: info.zip
    (Size: 7.22KB, Downloaded 801 times)


darky
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2.6.2 Find User link broken
Next Topic: 3 phantom visitors
Goto Forum:
  

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

Current Time: Mon Nov 25 23:16:45 GMT 2024

Total time taken to generate the page: 0.04196 seconds