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

Home » FUDforum Development » Bug Reports » Prepared statement already exists
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Prepared statement already exists [message #22399] Tue, 01 February 2005 14:52 Go to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
I hope someone has some insight into this one. Ever since upgrading PostgreSQL to 7.4.6 (I upgraded to make searching functional), users have been getting the following error when posting:

*Warning*: pg_query(): Query failed: ERROR: prepared statement
"fud25_srch_ins" already exists in */home/usr/httpd/virtual/tanga/WilsoNet/theme/Retro/post.php* on line *2737*

*Warning*: pg_query(): Query failed: ERROR: prepared statement
"fud25_srch_sel" already exists in */home/usr/httpd/virtual/tanga/WilsoNet/theme/Retro/post.php* on line *2738*

*Warning*: Cannot modify header information - headers already sent by (output started at /home/usr/httpd/virtual/tanga/WilsoNet/theme/Retro/post.php:2737) in */home/usr/httpd/virtual/tanga/WilsoNet/theme/Retro/post.php* on line *3983*
Re: Prepared statement already exists [message #22401 is a reply to message #22399] Tue, 01 February 2005 15:25 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
What version of the forum are you using?

FUDforum Core Developer
Re: Prepared statement already exists [message #22413 is a reply to message #22401] Tue, 01 February 2005 22:01 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
2.6.9.

Sorry I didn't reply earlier. I was expecting email notification.
Re: Prepared statement already exists [message #22415 is a reply to message #22413] Tue, 01 February 2005 23:08 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
Are you using persistent connections?

FUDforum Core Developer
Re: Prepared statement already exists [message #22425 is a reply to message #22415] Wed, 02 February 2005 19:22 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
It appears so.
Re: Prepared statement already exists [message #22426 is a reply to message #22425] Thu, 03 February 2005 00:13 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
Fixed in CVS.

This patch should take care of the problem:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=3288


FUDforum Core Developer
Re: Prepared statement already exists [message #22447 is a reply to message #22426] Thu, 03 February 2005 15:53 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
Okay. I installed the new version and still get the same error.

By the way, the cvs.prohost.org DNS address doesn't seem to be fully propogated for some reason. I had to add a manual entry to my system's hosts file in order to download the file, but when I brought the page up at my workplace, it resolved just fine.
Re: Prepared statement already exists [message #22448 is a reply to message #22447] Thu, 03 February 2005 15:55 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
Will I have to stop and start the database after putting in the change?
Re: Prepared statement already exists [message #22449 is a reply to message #22448] Thu, 03 February 2005 16:02 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, just apply the patch and rebuild the templates to push the change live.

FUDforum Core Developer
Re: Prepared statement already exists [message #22452 is a reply to message #22449] Thu, 03 February 2005 16:52 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
Okay. I did 'Rebuild All Themes' and then after I tried optimizing them I got the following errors (and get them when I attempt to rebuild the themes now):

SELECT s.id AS sid, s.ses_id, s.data, s.returnto, s.sys_id, t.id AS theme_id, t.lang, t.name AS theme_name, t.locale, t.theme, t.pspell_lang, t.theme_opt, u.alias, u.posts_ppg, u.time_zone, u.sig, u.last_visit, u.last_read, u.cat_collapse_status, u.users_opt, u.ignore_list, u.ignore_list, u.buddy_list, u.id, u.group_leader_list, u.email, u.login, u.sq FROM fud25_ses s INNER JOIN fud25_users u ON u.id=(CASE WHEN s.user_id>2000000000 THEN 1 ELSE s.user_id END) INNER JOIN fud25_themes t ON t.id=u.theme WHERE s.ses_id='fe0e9c845856ee57f02dfc2d8d2a6442'

query count: 1 time taken: 0.009732

Affected rows: 0

total sql time: 0.009732


Warning: Cannot modify header information - headers already sent by (output started at /home/usra/jwilson/fudforum_data/include/theme/default/db.inc:2) in /home/usra/jwilson/fudforum_data/include/theme/default/users.inc on line 2

Warning: Cannot modify header information - headers already sent by (output started at /home/usra/jwilson/fudforum_data/include/theme/default/db.inc:2) in /home/usra/jwilson/fudforum_data/include/theme/default/users.inc on line 2

Warning: Cannot modify header information - headers already sent by (output started at /home/usra/jwilson/fudforum_data/include/theme/default/db.inc:2) in /home/usra/jwilson/fudforum_data/include/theme/default/users.inc on line 2

UPDATE fud25_users SET last_visit=1107449433 WHERE id=2

query count: 2 time taken: 0.048545

Affected rows: 1

total sql time: 0.058277

SELECT theme, lang, name FROM fud25_themes

query count: 3 time taken: 0.002673

Affected rows: 0

total sql time: 0.06095
Re: Prepared statement already exists [message #22454 is a reply to message #22452] Thu, 03 February 2005 19:03 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
What forum version are you using?
What PHP version are you using?


FUDforum Core Developer
Re: Prepared statement already exists [message #22455 is a reply to message #22454] Thu, 03 February 2005 19:37 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
FudForum 2.6.9
PHP 4.3.10
Re: Prepared statement already exists [message #22458 is a reply to message #22455] Thu, 03 February 2005 22:01 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
Don't run the theme optimizer, it causes problems on some PHP installations. I am trying to trackdown the reason, but so far cannot replicate on my own system.

It seems that in some cases the language parser screws up when there is a conditional function declaration on the same line.


FUDforum Core Developer
Re: Prepared statement already exists [message #22460 is a reply to message #22458] Thu, 03 February 2005 22:50 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
I've already run it. I hope it hasn't messed anything up. Rebuilding the themes doesn't seem to have fixed the problem, either.
Re: Prepared statement already exists [message #22461 is a reply to message #22460] Fri, 04 February 2005 00: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
Which problem are you still experiencing?

FUDforum Core Developer
Re: Prepared statement already exists [message #22463 is a reply to message #22461] Fri, 04 February 2005 00:30 Go to previous messageGo to next message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
The original prepared statement error still occurs when posting.
Re: Prepared statement already exists [message #22464 is a reply to message #22463] Fri, 04 February 2005 00:39 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 try restarting the PostgreSQL server so that all persistent connections with live version of the prepared statment go away.

FUDforum Core Developer
Re: Prepared statement already exists [message #22473 is a reply to message #22464] Fri, 04 February 2005 15:11 Go to previous message
Tangaloor is currently offline  Tangaloor   United States
Messages: 20
Registered: October 2004
Location: Minneapolis, MN
Karma: 0
Junior Member
Okay. I believe that fixed it. Thanks! Very Happy
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Forum Delete
Next Topic: Forum Crash?
Goto Forum:
  

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

Current Time: Sun Nov 10 01:27:37 GMT 2024

Total time taken to generate the page: 0.04711 seconds