Page 1 of 1

Php/MySQL Error, hope someone can help :P.

Posted: Sat Jun 10, 2006 7:07 pm
by TheCrymsonLegends
First off the explination :). I recently, added a Mod for Phpbb from http://www.phpbb.com called "Event Registration". SINCE they do not support Nuke Evolution I am stuck with trying to port, so to speak, it myself. I have fixed most the error's except this one which doesn't seem to be directly pointed to the Mod in anyway. But the mod may be causing this, here is the error and code's which you will need to understand my problem :).

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 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 ' '', '', '44778594', '', '', '', '')' at line 1

INSERT INTO nuke_bbposts (post_id, topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ('', '', , '', '', '44778594', '', '', '', '')

Line : 509
File : functions_post.php
functions_post.php Lines 505 - 513

Code: Select all

505-        $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
506-        $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (post_id, topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ('$topic_id', '$forum_id', " . $userdata['user_id'] . ", '$post_username', '$current_time', '$user_ip', '$bbcode_on', '$html_on', '$smilies_on', '$attach_sig')" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = '$bbcode_on', enable_html = '$html_on', enable_smilies = '$smilies_on', enable_sig = '$attach_sig'" . $edited_sql . " WHERE post_id = '$post_id'";
507-        if (!$db->sql_query($sql))
508-        {
509-                message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
510-        }
511-
512-        if ($mode != 'editpost')
513-        {
For my "MYSQL" which it is refering here is what the table would look like if you were adding it to MySQL

Code: Select all

CREATE TABLE `nuke_bbposts` (
  `post_id` mediumint(8) unsigned NOT NULL auto_increment,
  `topic_id` mediumint(8) unsigned NOT NULL default '0',
  `forum_id` smallint(5) unsigned NOT NULL default '0',
  `poster_id` mediumint(8) NOT NULL default '0',
  `post_time` int(11) NOT NULL default '0',
  `poster_ip` varchar(8) NOT NULL default '',
  `post_username` varchar(25) default NULL,
  `enable_bbcode` tinyint(1) NOT NULL default '1',
  `enable_html` tinyint(1) NOT NULL default '0',
  `enable_smilies` tinyint(1) NOT NULL default '1',
  `enable_sig` tinyint(1) NOT NULL default '1',
  `post_edit_time` int(11) default NULL,
  `post_edit_count` smallint(5) unsigned NOT NULL default '0',
  `post_attachment` tinyint(1) NOT NULL default '0',
  `post_move` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`post_id`),
  KEY `forum_id` (`forum_id`),
  KEY `topic_id` (`topic_id`),
  KEY `poster_id` (`poster_id`),
  KEY `post_time` (`post_time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;


This is what entering a table should approximately look like :).

Code: Select all

1-INSERT INTO `nuke_bbposts` VALUES (13, 6, 9, 2, 1149916006, '44778594', '', 1, 1, 1, 0, NULL, 0, 0, 0);
2-INSERT INTO `nuke_bbposts` VALUES (12, 6, 9, 3, 1149817358, 'cb0a7950', '', 1, 1, 1, 1, NULL, 0, 0, 0);
3-INSERT INTO `nuke_bbposts` VALUES (11, 5, 19, 2, 1149598762, '42be7683', '', 1, 1, 1, 0, NULL, 0, 0, 0);
4-INSERT INTO `nuke_bbposts` VALUES (10, 4, 1, 2, 1149006545, '44bf104b', '', 1, 1, 1, 0, NULL, 0, 0, 0);


I was messing around with the functions_post.php adding certain MySQL things which wern't there on the original file but it was to no avail. I can't quite put my finger on what's causing this error. If you find it PLZ let me know, if it has nothing to do with this then also let me know. Thank you, I kinda need a quick reply because my site require's that to work before I can continue with anything else.

Oh and it is happening when I go to CREATE a post, not when I edit it which seems to confuse the piss out of me, but none the less the Error was on 509 which means it must be around that section. Thank you.



If you don't know what your doing, DO NOT attempt to help me, because I don't need my site all jacked up beyond repair. Please let those who have somewhat of an idea help, if you think you can contribute please do so, but do NOT attempt to support if your not familure with php. Those familure with phpbb this is the same thing, nothing is different with phpbb and the phpbb that comes with Nuke Evo except the MySQL and very few code changes for easier integration with Nuke Evo, thank you.

Posted: Sun Jun 11, 2006 8:08 am
by Freedom Fighter
I dont know what im talking about but is is obvious. Delete the mod????

sorry if this didnt help I was just reasuring you didnt forget that step.

Sorry i can be more help but I would back up the forum before you screw it up more.

Posted: Sun Jun 11, 2006 9:20 am
by TheCrymsonLegends
I got back-ups thats not the problem lol. Its some error where it's not incerting proper information into MySQL. I need this mod and it's a 45minute install. Would hate to just whip it out without trying all my options. :) I know there has to be a way to fix it, I just can't figure it out.

Posted: Mon Jun 12, 2006 4:32 pm
by tswpn
I'm sure the friendly guys over at http://www.phpbb.com would happily help you out. If you don't visit, you'll never know!

Posted: Mon Jun 12, 2006 6:27 pm
by TheCrymsonLegends
They don't offer support for Nuke Evolution or any type of Php Nuke modded with Phpbb. I have tried before. I have asked on a couple sites just thought maybe someone would know what the problem was lol.

Posted: Tue Jun 13, 2006 12:21 am
by Flipper3
TheCrymsonLegends wrote:They don't offer support for Nuke Evolution or any type of Php Nuke modded with Phpbb. I have tried before. I have asked on a couple sites just thought maybe someone would know what the problem was lol.
Have you tried http://www.nuke-evolution.com/modules.php?name=Forums ? They might help since they made it.

Posted: Tue Jun 13, 2006 2:12 am
by Freedom Fighter
yes go there and mayby try recreate the myslq in the same make up as the last and it should not mess up your fourm.

hello !

Posted: Sun Jun 18, 2006 11:26 am
by ducphanh
i am in Viet Nam i don't know english . PHP kho qua

Re: hello !

Posted: Sun Jun 18, 2006 4:59 pm
by TheCrymsonLegends
ducphanh wrote:i am in Viet Nam i don't know english . PHP kho qua
What the f*ck? Did you just spam in my post? You have issues, your account is going under spam investigation, you may not like the outcome if you have been spamming you don't know english. LEARN IT, that's all I can tell you.

Posted: Tue Jun 20, 2006 5:28 pm
by Freedom Fighter
you just spammed haha w/e

On topic: what mod are you trying to install i have some experriance with IPB, PHPbb2, Nuke(all), and E107 so let me know.