vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Usenet gateway (https://vborg.vbsupport.ru/showthread.php?t=7100)

fastforward 06-27-2001 05:38 PM

Hmmm.. this sounds like a tricky one :(

If you are getting the headers correctly, then we know it's talking to the INN server correctly and understands how to retrieve header information by message number.

The next thing the script does is to run those headers through the spam filter and if it decides it's an article we want, it requests the body from the news server using the message number and the 'body()' method from perl NNTP module. Assuming you have no replacements set, this must be the bit that is failing to retrieve the article from the server.

Why it's failing, I have no idea. Have you got another news server you can try. That way you can determine if it's an INN specific thing. You might want to make sure you have the latest NNTP module from CPAN aswell.

chrome 06-27-2001 05:54 PM

Quote:

Originally posted by fastforward
Hmmm.. this sounds like a tricky one :(

...

Why it's failing, I have no idea. Have you got another news server you can try. That way you can determine if it's an INN specific thing. You might want to make sure you have the latest NNTP module from CPAN aswell.

Yeah, I installed perl 5.6.1 and all the modules fresh, as a precaution. Unfortunately that machine can't get out to the net easily, so it doesn't really have access to another news server I can test against.

Thats not a major problem though. I was simply wondering if anyone had bumped into this one before.. I'm going to hack some debugging into your code and see what it *thinks* it's inserting into the DB =). A look at the database would probably be helpful, too.

BTW, have you thought about using a newsfeed instead of a poll method to populate the database? I wrote a perl script (still have it if you want it) that plugged into an INN server and pushed postings into a mysql database. It's spawned by INN when it starts, and INN pushes it an id of every message that INN gets sent (whether by an external feed, or a client) and then the script uses an INN supplied command to turn that id into a path to the physical location of the posting. The script reads it into an NNTP::Article structure and gets all the headers/body and dumps it into relevant fields in a MySQL database.

It's a bit broken atm, no checking for SQL statements in the body/headers etc :eek: but it works.

I was originally going to turn it into a vB clone, but then I found your hack. :D Much nicer to get vB to do all the hard work thats already been done, eh?

fastforward 06-27-2001 06:07 PM

Quote:

Originally posted by chrome
BTW, have you thought about using a newsfeed instead of a poll method to populate the database? I wrote a perl script (still have it if you want it) that plugged into an INN server and pushed postings into a mysql database. It's spawned by INN when it starts, and INN pushes it an id of every message that INN gets sent (whether by an external feed, or a client) and then the script uses an INN supplied command to turn that id into a path to the physical location of the posting. The script reads it into an NNTP::Article structure and gets all the headers/body and dumps it into relevant fields in a MySQL database.
The reason I did it this way was that most people don't have either a full newsfeed or their own news server. Most of us are using a personal news account such as Supernews. There are issues of missing posts and problems with different character sets that could probably be handled more easily if the news server was dumping things raw into a database for us to process later so I would be very interested in your script if you'd like to share it :)

chrome 06-27-2001 07:05 PM

Quote:

Originally posted by fastforward

The reason I did it this way was that most people don't have either a full newsfeed or their own news server. Most of us are using a personal news account such as Supernews. There are issues of missing posts and problems with different character sets that could probably be handled more easily if the news server was dumping things raw into a database for us to process later so I would be very interested in your script if you'd like to share it :)

http://www.stupendous.net/news2mysql-0.1.tar.gz

I hope you find it useful.

I notice that you don't use News::Article for parsing of the articles? You'd probably find you would have better luck using that to handle all the character set issues and to avoid using home-grown regex's. I'm sure it uses regex's internally (not bothered to look) but why reinvent the wheel, eh?

How do Supernews feel about you polling their servers every 30 minutes? :)

chrome 06-28-2001 08:28 AM

Hrm...

The postings are definately in the database, and your newnews.pl is definately pulling out the body fine, its just that vB is not displaying it at all. Very strange :confused:

Feh.

Do you know if there is any debugging I can turn on in vB that will show extended information about the postings when viewing threads? its almost as if the posting isn't being associated with the thread properly.

In fact I described my problem incorrectly. The threads are being created but individual posts are not showing up in the threads - it's not the body of the message at all - Doh...

chrome 06-28-2001 08:57 AM

For some reason newnews.pl isn't assigning a threadid to any of the posts that it inserts into the DB. More investigation needed I think =)

fastforward 06-28-2001 02:34 PM

Quote:

Originally posted by chrome
For some reason newnews.pl isn't assigning a threadid to any of the posts that it inserts into the DB. More investigation needed I think =)
Your DBI or DBD module is out of date. Read back a few pages and you will see other references to this. Older versions of these modules do handle the mysql_insertid() function correctly.

webhost 06-28-2001 02:55 PM

Here's is a news server that I found.

ccnews.thu.edu.tw

Joey

chrome 06-28-2001 03:50 PM

Quote:

Originally posted by fastforward

Your DBI or DBD module is out of date. Read back a few pages and you will see other references to this. Older versions of these modules do handle the mysql_insertid() function correctly.

DBI-1.18
Msql-Mysql-modules-1.2216
perl 5.6.1

those are the latest afaics

What versions are you using to develop with?

fastforward 06-28-2001 04:46 PM

Quote:

Originally posted by chrome


DBI-1.18
Msql-Mysql-modules-1.2216
perl 5.6.1

those are the latest afaics

What versions are you using to develop with?

I'm using those versions.

The problem you are seeing is due to something not handling the mysql_insertid() function.

Others had the same problem and solved it by upgrading their modules. Perhaps it's a MySQL issue. I'm not sure as I have never encountered the problem.


All times are GMT. The time now is 03:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01766 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete