That indicates that something really is wrong with the 'mysql_insertid' function call or for some reason it's returning null.
Remove the IGNORE word from the SQL in line 303 so that it reads:
Code:
db_execute ("INSERT INTO thread (title,lastpost,forumid,postusername,lastposter,dateline,msgid,visible,open) VALUES ($subject,$dtm,$forumid,$poster,$poster,$dtm,$msgid,'1','1')");
and add the following debug line right after line 304 that reads $threadid = $dbh->{'mysql_insertid'};
Code:
print "DEBUG: threadid for msgid $msgid is $threadid\n";
Now if the SQL doesn't fail we know it is the 'mysql_insertid' function at fault. If the SQL fails then show me the error message as you did before.
The other thought I have is maybe your news server doesn't fully support the 'xhdr' function. This is unlikely but it would cause any header it couldn't find to be null.
What provider are you using? To check if this the problem I can give you temporary access to a test DNEWS server I have at home. It will be slow though as I only have 256K upload speed. Let me know your IP and I'll add access for testing.
regards.