TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 336
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 245
  • Total: 245

Comments can't be submitted for articles

Started by splattercaster, March 28, 2008, 03:26:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

splattercaster

Hi,

I hope someone can help me solve this problem. I've scanned the forum and can't find any posts relating to this error.

I have discovered that it isn't possible to submit a comment to any of the articles on my site. After clicking 'send' the site times out after some time and the browser comes back with a white screen and this message:

Quote
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I have also had this error once (the rest of the time is the cgi error):

Quote
Field 'subtype' doesn't have a default value
File: C:\Webroot_UKDK\Sources\TPmodules.php
Line: 213

This is the code from TPmodules.php lines 211,212,213:
Quote
         // insert the comment
         db_query("INSERT INTO {$tp_prefix}variables (value1,value2,value3,type,value4,value5)
                     VALUES('$title','$comment','$ID_MEMBER','article_comment','$time',$article)", __FILE__, __LINE__);

I'm using SMF 1.1.4 and TP 0.9.8 I'm also using the alienation theme which has been modified quite a bit, although the file TPmodules.php hasn't been altered from the original.

Can anyone shed any light on this fault, is there a problem with the sql code above or does my database have a gremlin?

Thanks,
Tim

IchBin

Does the same thing happen in the default theme? Can you give us a test account so we can see and try it?

splattercaster

Hi,

Thanks for the reply, yes the same thing happens with the default theme.

I have sent you a pm IchBin with the information you need.

Tim

splattercaster

OK, I've managed to fix this myself. I decided there must be something wrong with the sql table structure or field attributes because the php code etc was identical to another SMF/TP site that I admin and that worked fine. I tried comparing the 2 sites sql tables but they are running different versions of mysql and it was difficult to establish what needed changeing.
Therefore I used logic to alter the fields circled in red, in the 'smf_tp_variables' table, to allow null values and hey presto it now works.
If anyone else has this problem here are the fields I adjusted, they used to be set as 'No' for Null and 'blank' for Default. I changed these to 'Yes' and 'NULL'.


bloc

Thanks, splattercaster, this was very enlightening. What PHP/MYsql version are you running?

splattercaster

Hi Bloc,

I use:
PHP Version 5.2.3
MySQL 5.0.45

I think this subtype error is a php v5+ and/or mysql 5+ error, I've had it before, check my previous posts about article problems - I've managed to fix problems in the past with sql database tweaking because TP php code cant 'talk' to database. I've seen plenty of posts now where you quote 'yes there are problems with php5+/mysql5+ that will be looked at for future versions'
I understand this and will live with it, not all versions of everything can be catered for. I'm a software engineer so know the score.

TP is a great tool guys - good luck with the bug squashing and I look forward to the next release  :2funny:

o/

This website is proudly hosted on Crocweb Cloud Website Hosting.