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

Home » FUDforum Development » Bug Reports » SQL error in nntp.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
SQL error in nntp.php [message #27338] Mon, 05 September 2005 12:12 Go to next message
KVentz is currently offline  KVentz   Russian Federation
Messages: 65
Registered: November 2002
Location: Moscow, Russia
Karma: 0
Member
When trying to run nntp.php with wrong parameter (news group number that not exists) it returns an SQL error:

%/usr/local/bin/php -q /hosting/provider/root/forum/scripts/nntp.php 32
(/hosting/provider/root/forum/include/theme/default/db.inc:74<br />
/hosting/provider/root/forum/include/theme/default/db.inc:174<br />
/hosting/provider/root/forum/scripts/nntp.php:80<br />
) 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 '' at line 1<br />
Query: SELECT id, forum_opt, message_threshold, (max_attach_size * 1024) AS max_attach_size, max_file_attachments FROM fud2_forum WHERE id=<br />
Server Version: 4.1.0-alpha-log<br />

Maybe better "Invalid group number" error?
Re: SQL error in nntp.php [message #27362 is a reply to message #27338] Tue, 06 September 2005 01: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
Such a check already exists in the code (in later versions), what input did you supply?

FUDforum Core Developer
Re: SQL error in nntp.php [message #27366 is a reply to message #27362] Tue, 06 September 2005 01:46 Go to previous messageGo to next message
KVentz is currently offline  KVentz   Russian Federation
Messages: 65
Registered: November 2002
Location: Moscow, Russia
Karma: 0
Member
Ilia писал(а) Втр, 06 Сентября 2005 05:01

Such a check already exists in the code (in later versions), what input did you supply?


Just a number:

%/usr/local/bin/php -q /hosting/provider/root/forum/scripts/nntp.php 32

I don't have a newsgroup with this number, last was #31.
Re: SQL error in nntp.php [message #27367 is a reply to message #27366] Tue, 06 September 2005 02:05 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS, here is the patch:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7300


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PATH_INFO styled links error
Next Topic: can not create (v. 2.7.2)
Goto Forum:
  

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

Current Time: Sat Nov 30 03:56:49 GMT 2024

Total time taken to generate the page: 0.02758 seconds