[DEV] NewsSync (Usenet -> phpBB Sync)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

if you don't have shell access

Post by wineknow » Fri Mar 07, 2003 4:18 pm

if you don't have shell access then you will find it difficult to setup a cron...your isp may have rules not allowing cron etc..

I don't confess to be a expert on the unix world -- so hopefully someone else can answer that...

how do you run a script if you don't have shell access?

also as for the questions

yes #1 does mean midnight.
yes #2 phpinfo would tell you the absolute path

-kevin
jlin wrote: if we dont have shell access can we just do this instead?
1) does 0 0 * * * mean every day at midnight?

2) do i find the path using phpinfo(), i.e. /home/mydomain/public_html/nntp/newssync.php

president
Registered User
Posts: 169
Joined: Thu Apr 04, 2002 11:31 pm

Post by president » Sat Mar 08, 2003 8:50 am

A lil trouble :(

from: http://minds.may.ie/~provost/phpBB2/

I've made sure the path to php is right.

./gosync
HTTP/1.0 0 X
Content-type: text/html

PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/imap.so' - ld.so.1: /usr/local/bin/php: fatal: /usr/lib/php4/imap.so: open failed: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/ldap.so' - ld.so.1: /usr/local/bin/php: fatal: /usr/lib/php4/ldap.so: open failed: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - ld.so.1: /usr/local/bin/php: fatal: /usr/lib/php4/mysql.so: open failed: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/snmp.so' - ld.so.1: /usr/local/bin/php: fatal: /usr/lib/php4/snmp.so: open failed: No such file or directory in Unknown on line 0

Warning: main(../extension.inc) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /home/minds/provost/public_html/phpBB2/newssync.php on line 48

Warning: main() [http://www.php.net/function.main]: Failed opening '../extension.inc' for inclusion (include_path='.:/usr/local/lib/siteManager') in /home/minds/provost/public_html/phpBB2/newssync.php on line 48

Warning: main(../common.) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /home/minds/provost/public_html/phpBB2/newssync.php on line 49

Warning: main() [http://www.php.net/function.main]: Failed opening '../common.' for inclusion (include_path='.:/usr/local/lib/siteManager') in /home/minds/provost/public_html/phpBB2/newssync.php on line 49

Warning: main(../includes/bbcode.) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /home/minds/provost/public_html/phpBB2/newssync.php on line 50

Warning: main() [http://www.php.net/function.main]: Failed opening '../includes/bbcode.' for inclusion (include_path='.:/usr/local/lib/siteManager') in /home/minds/provost/public_html/phpBB2/newssync.php on line 50
processing: minds.test

Warning: fopen(./data/output.log) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /home/minds/provost/public_html/phpBB2/inc/sync_funcs.php on line 17

Error: cannot output to log file with processing: minds.test
Warning: fopen(./data/spool/minds.test-info.txt) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 416

Warning: fgets(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 417
<!-- Database Error, rebuilding Database...-->

Warning: fgets(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 422

Warning: fclose(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 423

Warning: fopen(./data/spool/minds.test-info.txt) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 485

Warning: fputs(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 487

Warning: fputs(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 488

Warning: fclose(): supplied argument is not a valid stream resource in /home/minds/provost/public_html/phpBB2/inc/nntp_funcs.php on line 489
total nntp posts for minds.test is 69

Warning: fopen(./data/output.log) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /home/minds/provost/public_html/phpBB2/inc/sync_funcs.php on line 17

Error: cannot output to log file with total nntp posts for minds.test is 69
Fatal error: Call to a member function on a non-object in /home/minds/provost/public_html/phpBB2/inc/sync_funcs.php on line 580

wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

if you are getting errors

Post by wineknow » Sat Mar 08, 2003 2:19 pm

see next post...
Last edited by wineknow on Sun Mar 09, 2003 3:34 am, edited 1 time in total.

wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

newsync alpha 2

Post by wineknow » Sat Mar 08, 2003 8:38 pm

You can download another rev of newsync at

http://www.wineknow.com/downloads/newssync_a2.tar

lots of changes including
- got rid of the php.ini file stuff - it seems there is a function that does what I need - RTFM
- added a way to purge your newsgroup stuff
- few other things -- see CHANGELOG in above .tar file

let me know how things are working...

-kevin

president
Registered User
Posts: 169
Joined: Thu Apr 04, 2002 11:31 pm

Post by president » Mon Mar 10, 2003 2:17 pm

http://minds.may.ie/~provost/phpBB2/viewforum.php?f=2

that's it working.

will you be writing a "post from the phpbb to the newgroups" function soon?

cymru2000
Registered User
Posts: 33
Joined: Sat Apr 06, 2002 1:27 am
Location: London
Contact:

Post by cymru2000 » Mon Mar 10, 2003 6:55 pm

just thought i'd put my hand up :D

I have this running on my forum, taking news from two groups and my users seem to like them (they have't said they dont)

wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

newsync -> newbuild - beta1

Post by wineknow » Mon Mar 10, 2003 7:45 pm

- the usenet->phpBB->usenet mappings are now stored in the database (so don't forget to install the table)
- replies seem to work....NOTE: BE VERY VERY CAREFUL w/ this one -- play with it in alt.test (or a similar one FIRST)
- for replies I added the ability to enable replies on a newsgroup by newsgroup basis for testing purposes - see the INSTALL file

for any of you upgrading from an alpha
- delete the phpBB forum and re-create it
- remove the entire newssync directory (don't just tar over it)
- install the .sql table -- see INSTALL file for a little more details
- in other words delete all previous newsSync stuff

beta 1 is available at:
http://www.wineknow.com/downloads/newssync_b1.tar

let me know if you have problems...
-k

president
Registered User
Posts: 169
Joined: Thu Apr 04, 2002 11:31 pm

Post by president » Tue Mar 11, 2003 12:36 am

I've tried posting on the phpbb forum.

it syncs with the newsgroup perfectly :)

now, somthing perfect would be something built into the phpbb itself to auto update itself.

modaco
Registered User
Posts: 120
Joined: Wed Dec 04, 2002 12:21 pm

Post by modaco » Tue Mar 11, 2003 7:58 pm

This looks GREAT!

I have installed it tho, and it doesn't seem to work. :cry:

It appears to be falling overat the first '--newtopic' line (it then proceeds to spit out a whole load of HTML.

Any ideas?

I am running phpBB 2.0.3 (for various very good reasons), could this be the cause?

Thanks,

Paul

president
Registered User
Posts: 169
Joined: Thu Apr 04, 2002 11:31 pm

Post by president » Tue Mar 11, 2003 8:25 pm

modaco wrote: I am running phpBB 2.0.3 (for various very good reasons), could this be the cause?



yes, as no mods made here are required to support 2.0.3 as it can be hacked.

modaco
Registered User
Posts: 120
Joined: Wed Dec 04, 2002 12:21 pm

Post by modaco » Tue Mar 11, 2003 8:33 pm

D'oh!

Any ideas?

I think the post_id is one too low, so it's trying to create a dupe post?!?

P

wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

if you are having trouble crashing....

Post by wineknow » Tue Mar 11, 2003 9:33 pm

I have never tested it in 2.0.3, so if the schema is different then things may not work right....

Does anyone know?

Also, I need a better way to detect if the body of the usenet message is binary, if so, ditch it. Again, if anyone has any ideas of this that would be great....

-kevin

modaco
Registered User
Posts: 120
Joined: Wed Dec 04, 2002 12:21 pm

Post by modaco » Tue Mar 11, 2003 9:48 pm

Appears to be OK now, the problem was the routine that added it to the search database - i've commented that out, and it appears to work fine :-|

Odd...?

P

PS AWESOME MOD! :)

netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic » Tue Mar 11, 2003 9:55 pm

There was an extra parameter added to the add_search_words function in 2.0.4, here's a work around to make it work on earlier versions...

Code: Select all

    switch ($board_config['version'])
    {
        case '.0.0' : 
        case '.0.1' : 
        case '.0.2' : 
        case '.0.3' : 
            add_search_words($post_id, stripslashes($message), stripslashes($subject));
            break;
        
        default :
            add_search_words('', $post_id, stripslashes($message), stripslashes($subject));
            break;
    }
Defend the game:
Image

modaco
Registered User
Posts: 120
Joined: Wed Dec 04, 2002 12:21 pm

Post by modaco » Tue Mar 11, 2003 10:11 pm

Sweet, thanks!

Problem I am having now is that replies to the NG fail if there is no subject line set (which kinda makes sense I suppose).

It would be useful if, when there was no subject specified, the subject of the parent was used, with the prefix of "RE:".

This is particularly important, as a quick reply or default reply in phpBB leaves the subject blank.

Thanks for your help guys :)

P

Post Reply

Return to “[2.0.x] MODs in Development”