[fixed] SQL Error 1064 in functions_post.php

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
merlinmann
Registered User
Posts: 5
Joined: Thu Apr 24, 2003 5:09 pm

[fixed] SQL Error 1064 in functions_post.php

Post by merlinmann » Thu Apr 24, 2003 5:46 pm

If user is not logged-in and posts, they get the following error:

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ' 1051204973, 7, 0, 0, 0)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('test', , 1051204973, 7, 0, 0, 0)

Line : 256
File : /path/to/phpbb/includes/functions_post.php 
Based on searching here it seems to be related to a MOD, but I'm pretty sure we're not running any mods.

I had recently upgraded from 2.0.3 to 2.0.4 using the "changed files." I'm open to a full re-install. Do we think that might help?

Thanks in advance!
Last edited by merlinmann on Fri Apr 25, 2003 1:21 am, edited 1 time in total.

merlinmann
Registered User
Posts: 5
Joined: Thu Apr 24, 2003 5:09 pm

Fixed?

Post by merlinmann » Thu Apr 24, 2003 6:09 pm

Hmm. It would seem that this brilliant piece of work might have fixed it.

Am I imagining things?

merlinmann
Registered User
Posts: 5
Joined: Thu Apr 24, 2003 5:09 pm

Post by merlinmann » Thu Apr 24, 2003 8:19 pm

Yep. I was imagining things. :-)

Any ideas what this might be related to or how I might fix it?

Thanks.

merlinmann
Registered User
Posts: 5
Joined: Thu Apr 24, 2003 5:09 pm

at the risk of talking to myself...

Post by merlinmann » Thu Apr 24, 2003 11:22 pm

I wonder if this has to do with the MySQL database not getting updated.

I've noticed, for example, that "Guests" never show up in the "who's on" area, although they are on the admin page.

I'm at a loss.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

talking to yourself...never

Post by A_Jelly_Doughnut » Fri Apr 25, 2003 12:36 am

Well, no because Who's online is not related to the database, except for "Most Users ever online".
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

merlinmann
Registered User
Posts: 5
Joined: Thu Apr 24, 2003 5:09 pm

w00t!

Post by merlinmann » Fri Apr 25, 2003 1:07 am

Pretty sure this did it:

http://phpbb.com/phpBB/viewtopic.php?t= ... sting+1064


So for people keyword-searching this problem downstream, I was having a problem with guest/anonymous/unregistered posting in which the SQL Error 1064 shown above would appear. This problem was apparently occurring because there was no "anonymous" user defined in the phpbb_users (or foo_users or just users) table.

I ran the code suggested in the other post (and repeated below) in phpmyadmin. This created the needed anonymous user, and now everybody's happy.

Hope this helps someone else. :-)

Code: Select all

INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);

Locked

Return to “2.0.x Support Forum”