|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6385 is a reply to message #6378] |
Wed, 09 October 2002 13:19 |
Ilia
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 #11732 is a reply to message #11729] |
Tue, 15 July 2003 19:58 |
Ilia
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 #11739 is a reply to message #11738] |
Tue, 15 July 2003 22:19 |
Ilia
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 #11771 is a reply to message #11769] |
Wed, 16 July 2003 18:30 |
Ilia
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 |
Micha37
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.
|
|
|
|
|
|
|
|
|