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

Home » FUDforum » How To » Importing Newsgroup and Mailinglist Problem
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Importing Newsgroup and Mailinglist Problem [message #6372 is a reply to message #6371] Wed, 09 October 2002 00:41 Go to previous messageGo to next message
valiant is currently offline  valiant   Switzerland
Messages: 80
Registered: September 2002
Location: Zurich
Karma: 0
Member
Actually, the script d/l only new articles.

Once the script has received all messages and you run it again it will abort after a few seconds as there are no new articles to get.
Re: Importing Newsgroup and Mailinglist Problem [message #6376 is a reply to message #6372] Wed, 09 October 2002 06:13 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Italy
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Vailant,

excatly this is the problem. My ISP has limited the script execution time to 10 sec. which is not enough to receive all 6000 messages. Accordingly I would need the information, how can I setup the script to import new messages from the beginning.

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #6378 is a reply to message #6376] Wed, 09 October 2002 11:01 Go to previous messageGo to next message
valiant is currently offline  valiant   Switzerland
Messages: 80
Registered: September 2002
Location: Zurich
Karma: 0
Member
10 seconds is a little bit too short. i guess you're not d/ling from a local newsserver. i hope, at least the webserver is not the slowest one.
what about calling your host and asking him for an excpetion?
6000 articels from a newsserver, puh. IMO protoss should alter the script so that you can chose the time limit for each session.
Re: Importing Newsgroup and Mailinglist Problem [message #6385 is a reply to message #6378] Wed, 09 October 2002 13:19 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
You cannot time the script itself reliably, the only other solution is to hack up the script to accept an article limit.

To do this add something like this to nntp.inc on line #425

if (($this->group_last-$this->group_first)>YOUR_LIMIT) {
$this->group_last = YOUR_LIMIT;
}


FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #6403 is a reply to message #6385] Wed, 09 October 2002 20:21 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

thanks for the great support.
I included the recommended hack into the nntp.inc at line #425 as below:

Quote:

if (($this->group_last-$this->group_first)> 20) {
$this->group_last = 20;
}


Result is, that only one post is imported at a time and always the same post.

Am I doing something wrong??

Best regards

Michael

Re: Importing Newsgroup and Mailinglist Problem [message #6405 is a reply to message #6403] Wed, 09 October 2002 20:37 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
Hm... I see the problem, my original hack was not quite right.

change:
$this->group_last = 20;

to
 $this->group_last = $this->group_first + 20;


FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #6407 is a reply to message #6405] Wed, 09 October 2002 21:09 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

thanks, now its importing some more mails, but not 20, as defined. Sometimes its 15, sometimes just 2 or 3, but at least no more double entries.

Also the threads are not brought together properly. All posts are shown as individual threads.

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #6408 is a reply to message #6407] Wed, 09 October 2002 21:22 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

now its working. I started to import into a newly forum and seems everything is working very fine.

BIG THANK YOU

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #6432 is a reply to message #6106] Thu, 10 October 2002 14:54 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

do you have an easy idea, how to prevent the nntp script from importing news with an header X-No-Archive: yes

Thanks for your advise.

Best regards
Re: Importing Newsgroup and Mailinglist Problem [message #6435 is a reply to message #6432] Thu, 10 October 2002 16:30 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
Modify the source code Smile

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #6439 is a reply to message #6435] Thu, 10 October 2002 18:52 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Very Happy Very Happy
Thanks for everthing

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #9043 is a reply to message #6106] Sat, 08 March 2003 23:56 Go to previous messageGo to next message
forrie is currently offline  forrie   United States
Messages: 47
Registered: August 2002
Location: Derry, NH
Karma: 0
Member
Slightly related question: I have a news spool of separate articles that a user has saved from some time ago. I'd like to import them all into FudForum, but not through NNTP (since I don't run NNTP here, and it's a long process to get it set up and imported) Smile . Is there a way to accomplish this?

Thanks.
Re: Importing Newsgroup and Mailinglist Problem [message #9098 is a reply to message #9043] Thu, 13 March 2003 14:41 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
Pipe the messages 1 by one via the maillist.php script.

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11727 is a reply to message #6364] Tue, 15 July 2003 14:07 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

even after the move to an exclusive 1und1 server and upgrading to 2.5.0, I am still facing troubles with the newsgroup script, same as in Oct. 2002.

Of course I know a way around the issue, as per our correspondence, however, may be you could consider another way in one of future releases, to solve the issue.

Best regards

Michael


Re: Importing Newsgroup and Mailinglist Problem [message #11728 is a reply to message #11727] Tue, 15 July 2003 17:24 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
Which problem in particular are you referring to?

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11729 is a reply to message #6364] Tue, 15 July 2003 17:59 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

its relating to the transfer of variables for the nntp script, where you have suggested the below idea, which is working very fine.

Best regards

Michael

prottoss wrote on Tue, 08 October 2002 23:32

You need to make a number of changes, fortunately they are all at the top of the script, so you won't need to dabble in the inner workings.
delete:
        if( $HTTP_SERVER_VARS['argc'] < 2 ) exit("Missing Forum ID Paramater\n");
        if( !is_numeric($HTTP_SERVER_VARS['argv'][1]) ) exit("Missing Forum ID Paramater\n");


delete:
        if( !isset($HTTP_SERVER_VARS['argv'][1]) || !is_numeric($HTTP_SERVER_VARS['argv'][1]) )
                exit("Missing Forum ID Paramater\n");


change:
chdir(dirname($HTTP_SERVER_VARS['argv'][0]));

TO:

chdir(__FULL_DIRECTORY_PATH_TO_SCRIPTS_DIR__);


change:
$nntp_adm->get($HTTP_SERVER_VARS['argv'][1]);

TO:

$nntp_adm->get(__RULE_ID__);


Obviously __FULL_DIRECTORY_PATH_TO_SCRIPTS_DIR__ and __RULE_ID__ should be changed to appropriate values.

Re: Importing Newsgroup and Mailinglist Problem [message #11732 is a reply to message #11729] Tue, 15 July 2003 19:58 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
Ah, your php installation is configure with register_argc_argv OFF. That is not an ideal setting for PHP and for command line php it should not be disabled. The fix you've implemented is a hack around the problem, but it really should not be used. The correct fix is to enable register_argc_argv.

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11738 is a reply to message #11732] Tue, 15 July 2003 22:14 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

thanks for the reply.
As you can see at http://217.160.162.169/phpinfo.php, my register_argc_argv setting is On.

Any other idea, what could be the root of my problem.

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #11739 is a reply to message #11738] Tue, 15 July 2003 22:19 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
Try the following script:
<?php
var_dump
($HTTP_SERVER_VARS['argv']);
?>


And pass a few arguments when you run the script. It should give you an array containing the arguments you've passed.


FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11740 is a reply to message #11739] Tue, 15 July 2003 22:36 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

have done it.
See http://217.160.162.169/test.php

When I call this script by my shell access like:
homepages/3/d81427973/htdocs/test.php 234

the result is :
bash: homepages/3/d81427973/htdocs/test.php: No such file or directory

I have done chmod 777 before.

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #11742 is a reply to message #11740] Tue, 15 July 2003 23:11 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
You are not running the script, php script is not an executable, you need to execute it like this:
php -q script.php arg1 arg2 ...


FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11765 is a reply to message #11742] Wed, 16 July 2003 18:06 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

sorry but I am not quite familiar to work on the Shell surface. Embarassed

Anyway, I tried the following commands:

1) php -q homepages/3/d81427973/htdocs/test.php 1
Result: bash: php: command not found

2) php -q test.php 1
Result: bash: php: command not found

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #11767 is a reply to message #11765] Wed, 16 July 2003 18:24 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
Looks like you don't have a php binary you can run via console (shell). I am guessing you are running the import script via the web?

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11769 is a reply to message #11767] Wed, 16 July 2003 18:28 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

thanks for the feedback.
When I modify the script as you suggested last year October, I can call it by a cron job via the console.

What is the methode to run the import script via the web browser??

Best regards

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #11771 is a reply to message #11769] Wed, 16 July 2003 18:30 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
There is no way to run via the web, well with the hack you had it would be possible, since the script does not actually get any parameters.
But I am wondering how are you able to run it via a cron if you do not have php binary.


FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11884 is a reply to message #11729] Mon, 21 July 2003 16:20 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

I have just found out that you have completely modified the nntp.php script from 2.3.8 to 2.5.0.

Could you please let me know the recommended hack, which you gave me for the 2.3.8 for the version 2.5.0 as well.

Thanks in advance and best regards

Michael

Micha37 wrote on Tue, 15 July 2003 19:59

Hi Prottoss,

its relating to the transfer of variables for the nntp script, where you have suggested the below idea, which is working very fine.

Best regards

Michael

prottoss wrote on Tue, 08 October 2002 23:32

You need to make a number of changes, fortunately they are all at the top of the script, so you won't need to dabble in the inner workings.
delete:
        if( $HTTP_SERVER_VARS['argc'] < 2 ) exit("Missing Forum ID Paramater\n");
        if( !is_numeric($HTTP_SERVER_VARS['argv'][1]) ) exit("Missing Forum ID Paramater\n");


delete:
        if( !isset($HTTP_SERVER_VARS['argv'][1]) || !is_numeric($HTTP_SERVER_VARS['argv'][1]) )
                exit("Missing Forum ID Paramater\n");


change:
chdir(dirname($HTTP_SERVER_VARS['argv'][0]));

TO:

chdir(__FULL_DIRECTORY_PATH_TO_SCRIPTS_DIR__);


change:
$nntp_adm->get($HTTP_SERVER_VARS['argv'][1]);

TO:

$nntp_adm->get(__RULE_ID__);


Obviously __FULL_DIRECTORY_PATH_TO_SCRIPTS_DIR__ and __RULE_ID__ should be changed to appropriate values.



Re: Importing Newsgroup and Mailinglist Problem [message #11887 is a reply to message #6106] Mon, 21 July 2003 19:31 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Prottoss,

forget it!!
Finally I found that I have been stupid and your script is working perfect.

SORRYY Embarassed

Michael
Re: Importing Newsgroup and Mailinglist Problem [message #11888 is a reply to message #11887] Mon, 21 July 2003 20:38 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
What was the problem?

FUDforum Core Developer
Re: Importing Newsgroup and Mailinglist Problem [message #11889 is a reply to message #11888] Mon, 21 July 2003 20:43 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
I simple used the wrong php directory in the script call.

Instead of /usr/local/bin/php4 /homepages/3/d81427973/htdocs/diabetesring/forumfiles/scripts/nntp.php 8 I just called php -f /homepages/3/d81427973/htdocs/diabetesring/forumfiles/scripts/nntp.php 8.

Anyway, now its working fine and it was just because I have no idea of the Shell commands.

Best regards and thanks for all

Michael

Re: Importing Newsgroup and Mailinglist Problem [message #11890 is a reply to message #11889] Mon, 21 July 2003 20:46 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Cool, glad to know that this was not a FUDforum problem and that you were able to resolve it.

FUDforum Core Developer
Pages (2): [ «    1  2]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: which files/files
Next Topic: categories and forums disappeared for guests :(
Goto Forum:
  

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

Current Time: Sun Nov 24 07:55:18 GMT 2024

Total time taken to generate the page: 0.03171 seconds