Importing Newsgroup and Mailinglist Problem [message #6106] |
Wed, 02 October 2002 09:14 |
Micha37
Messages: 77 Registered: October 2002
Karma: 0
|
Member |
|
|
Hi there,
I have installed FUDforum 2.3.1 and everything is working very fine, except two things:
1)Importing Newsgroup
I created an empty forum and setup the Newsgroup Manager refering to this empt forum. I installed the cronjob according to your suggestion. Anyway, the script does not import the news to this group even if its just a few messages (4). Could this be caused by the script execution limit (10sec), which is set by my Provider (Puretec in Germany).
Does anybody have a suggestion.
2)Importing mails from a mailing list
Reading the documentation, I could not figure out, how to setup FUDForum to import a mailing list. Actually I could connect a forum to a mailing lists and forum post are transfered to the designated adresse. Anyway, I have not found a way to import mails from the mailing list into the forum.
I am happy about any advise.
Thanks in advance for your feedback and best regards
Michael Bertsch
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6109 is a reply to message #6106] |
Wed, 02 October 2002 12:24 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If the script is unable to even import a 'few' messages it is unlikely the problem is the execution time limit. You can always try running the script manually rather then cron and then you'll see if any errors occur on screen. If you do no encounter any errors on screen, check inside errors/.nntp/. There probably is an 'error_log' file in there, which contains error messages that prevented the NNTP data from being imported.
As for setting up Mailing List importer, how are you trying to get the message to the forum's improt script? Are you using procmail or some other mechanism?
FUDforum Core Developer
|
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6113 is a reply to message #6112] |
Wed, 02 October 2002 13:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, you could write a small script (or use an existing one) to fetch emails from whatever source and pipe them to the forum's mailling list import script.
The import script needs the entire message (with headers) to be piped to it via stdout, as for who is doing the piping it does not matter.
FUDforum Core Developer
|
|
|
|
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6141 is a reply to message #6139] |
Thu, 03 October 2002 12:34 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Okie.
To get full rights to the file, using the forum's file manager chmod nntp.php to 777.
Once you do that open the file nd edit the 1st line, which contains #!/usr/local/bin/php, so that line relfect the correct path of your command line php executable.
FUDforum Core Developer
|
|
|
|
|
|
|
|
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6166 is a reply to message #6162] |
Fri, 04 October 2002 14:30 |
Micha37
Messages: 77 Registered: October 2002
Karma: 0
|
Member |
|
|
Hi,
in the meantime I checked with my shell access and again got the error message:
X-Powered-By: PHP/4.1.1
Content-type: text/html
<br>
<b>Fatal error</b>: Call to undefined function: get_host() in <b>/homepages/33/d18397619/htdocs/forumfiles/include/theme/default/im sg_edt.inc</b> on line <b>42</b><br>
bash: syntax error near unexpected token `get_host()'
Seems I have a real unusual problem here.
Best regards
[Updated on: Fri, 04 October 2002 14:39] Report message to a moderator
|
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6190 is a reply to message #6177] |
Sat, 05 October 2002 13:19 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Can you try the following script please:
#!/path/to/your/php -q
<?
var_dump($HTTP_SERVER_VARS['argv']);
?>
and the run the script like this: ./script_name 1 2 3
P.S. Don't forget to chmod the script 755.
FUDforum Core Developer
|
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6194 is a reply to message #6192] |
Sat, 05 October 2002 15:24 |
Micha37
Messages: 77 Registered: October 2002
Karma: 0
|
Member |
|
|
Hi,
you may be right, that I do not have access to that binary, but how comes that all the other scripts are working. It seems that there is only a specific function, which is not supported.
I tried the script in a modified way:
<?
var_dump($HTTP_SERVER_VARS['arvg[1]']);
var_dump($HTTP_SERVER_VARS['arvg[2]']);
var_dump($HTTP_SERVER_VARS['arvg[3]']);
?>
You can see it under the link:
http://www.diabetes-kids.de/forumfiles/scripts/xx.php
When calling this script via my browser, it gives me:
NULL NULL NULL
When calling it from my Shell console (Putty), it gives me an error message like:
/homepages/33/d18397619/htdocs/forumfiles/scripts/xx.php
: No such file or directoryocs/forumfiles/scripts/xx.php: ?
/homepages/33/d18397619/htdocs/forumfiles/scripts/xx.php: line 2: syntax error near unexpected token `var_dump($HTTP_SERVER_VARS['arvg[1]'])'
/homepages/33/d18397619/htdocs/forumfiles/scripts/xx.php: line 2: `var_dump($HTT'_SERVER_VARS['arvg[1]']);
Anyway, if that does not tell something to you, I will have to give up.
Sorry for taking so much of your time and thanks for your great effort to help me.
Best regards
Michael
[Updated on: Sat, 05 October 2002 15:26] Report message to a moderator
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6195 is a reply to message #6194] |
Sat, 05 October 2002 15:37 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Your script is not correct, hence the errors, you should be doing:
var_dump($HTTP_SERVER_VARS['argv']);
The individual elements can be accessed via $HTTP_SERVER_VARS['argv'][0] and so on...
FUDforum Core Developer
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6198 is a reply to message #6197] |
Sat, 05 October 2002 16:23 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
This means that register_argv_argc is off, otherwise $HTTP_SERVER_VARS['arvg'] would be an array with a single element, that could be shown as: $HTTP_SERVER_VARS['arvg'][0].
FUDforum Core Developer
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6203 is a reply to message #6200] |
Sat, 05 October 2002 17:02 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, it is clearly not working, since _SERVER["argv"] is empty.
BTW, you (your isp?) are using PHP 4.1.1 which has KNOWN remote exploits that are easily exploitable via various utilies on the net. I would strongly advice an immidiate upgrade.
FUDforum Core Developer
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6206 is a reply to message #6204] |
Sat, 05 October 2002 17:35 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, as I've said you are using an old PHP version that includes many bugs including security fauls. Make this known to your provider and have them upgrade, otherwise not only will you experience bugs in your application but you stand a good chance at someone deleting/hijacking your data.
FUDforum Core Developer
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6281 is a reply to message #6270] |
Mon, 07 October 2002 14:20 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, there is a solution, however it would require you to have shell access. It would involve downloading PHP sources and compiling a PHP version just for you inside your account and using that to execute those scripts.
Another solution is to hack up the nntp.php script and hardcode the data normally passed (import rule id) via the commandline inside the script itself.
If you are planning to import more then 1 newsgroup then simply make copies of the hacked up nntp.php script, each geared towards importing data from a particular news group.
FUDforum Core Developer
|
|
|
|
Re: Importing Newsgroup and Mailinglist Problem [message #6364 is a reply to message #6357] |
Tue, 08 October 2002 21:32 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
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.
FUDforum Core Developer
|
|
|
|
|