[RC] NewsSync 1.5.0

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.
scottct1
Registered User
Posts: 12
Joined: Sat Sep 06, 2003 2:51 pm
Location: Connecticut
Contact:

Post by scottct1 »

Other then the double quotes (A user quotes a user who quoted someone else) mess everything is running fine (knock on wood) :)

My users LOVE this mod.
Scott
SatelliteGuys.US
modaco
Registered User
Posts: 120
Joined: Wed Dec 04, 2002 12:21 pm

Post by modaco »

Any news on this mod going Final?

:D

P
circusnews
Registered User
Posts: 4
Joined: Mon Aug 25, 2003 3:24 am

Fatal error: Cannot redeclare go_newssync()

Post by circusnews »

I am playing with NewsSync on a test server (files.stevensantos.com/phpBB2/). I would eventually like to run this mod on my PHPNuke sute (www.circusnews.com), but I wanted to get a feel for it first.

I am using:
- a clean install of phpBB2 2.0.4
- NewsSync for phpBB 1.5.0 RC6
- PHP version: 4.3.4

I have enabled psuedo cron in the common.php file.

Now, I get the following error when ever I try and access any of the management options:

Code: Select all

Fatal error: Cannot redeclare go_newssync() (previously declared in /hsphere/local/home/stevensa/files.stevensantos.com/phpBB2/newssync/inc/go-newssync.php:26) in /hsphere/local/home/stevensa/files.stevensantos.com/phpBB2/newssync/inc/go-newssync.php on line 26
Any ideas?
wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

Re: Fatal error: Cannot redeclare go_newssync()

Post by wineknow »

Hi this was an oversight.
Add the following to the inc/go-newssync.php right after the copyright notice.

Code: Select all

// make sure we do not define this twice in the newssync_admin area
if (function_exists("go_newssync")) {
	return;
}
this should do the trick.

I will add this to the final release for 1.5.0
-k
circusnews wrote: I am playing with NewsSync on a test server (files.stevensantos.com/phpBB2/). I would eventually like to run this mod on my PHPNuke sute (www.circusnews.com), but I wanted to get a feel for it first.

I am using:
- a clean install of phpBB2 2.0.4
- NewsSync for phpBB 1.5.0 RC6
- PHP version: 4.3.4

I have enabled psuedo cron in the common.php file.

Now, I get the following error when ever I try and access any of the management options:

Code: Select all

Fatal error: Cannot redeclare go_newssync() (previously declared in /hsphere/local/home/stevensa/files.stevensantos.com/phpBB2/newssync/inc/go-newssync.php:26) in /hsphere/local/home/stevensa/files.stevensantos.com/phpBB2/newssync/inc/go-newssync.php on line 26
Any ideas?
aklabsco
Registered User
Posts: 1
Joined: Thu Dec 18, 2003 2:54 pm

Post by aklabsco »

This code will add a link to polls in the nntp message body:

Code: Select all


sync_funcs.php, find:

$sql = "SELECT topic_first_post_id 

and replace it to

$sql = "SELECT topic_first_post_id, topic_vote  

(space char at the end of the line)                  

sync_funcs.php, find:

$body = html_to_text($body);

and replace it to:

$body = html_to_text($body);
$topicvote = $topic_data['topic_vote']; // !!!
if ($topicvote == 1) {
$body = "Poll: <insert your forum root url here>/viewtopic.php?t=" . $mytopicid . "\n\n" . $body;
}

User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

"NewsSync is currently not running"

Post by jarosciak »

Hi all,

I am spending so much time with this you can't imagine and I can't come up with any reasonable answer to this problem.

I had follow the pdf install file and everything is set up.
But, when I click the Status setting, it says "NewsSync is currently not running" so I click the run button which, after a few seconds yields, "NewsSync startup complete, click here to continue" which takes me back to the "NewsSync is currently not running" screen. No topics have been added to my forum where the usenet group is set up to be synched.

I have not yet edited the go-newssync file because I don't know how to find or use CRON.
NewsSync is currently not running

My go-newssync file:

#!/bin/sh
/usr/local/bin/php -q newssync.php $1 $2 $3

Someone already had this problem, but no one posted on how it was resolved.

Please help me with it. I am really lost.
wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

Re: "NewsSync is currently not running"

Post by wineknow »

the go-newssync file is a critical fine whether you are 'CRONing' or not.
it is what the "run newssync" button calls, so if it is wrong you are hooped.

the first thing I would do is make sure the go-newssync is correct.
what usually goes wrong is that the php executable is in a different place that the default.

if you can get command line access to the server type in "which php" and it should give you a path name, replace '/usr/local/bin/php', with what the which command returned. If you don't have command line access, then you will have to search for it...

if that is right, the go-newssync file MUST have permissions set correctly or things won't work either.

PM me for additional questions...
-k
jarosciak wrote: Hi all,

I am spending so much time with this you can't imagine and I can't come up with any reasonable answer to this problem.

I had follow the pdf install file and everything is set up.
But, when I click the Status setting, it says "NewsSync is currently not running" so I click the run button which, after a few seconds yields, "NewsSync startup complete, click here to continue" which takes me back to the "NewsSync is currently not running" screen. No topics have been added to my forum where the usenet group is set up to be synched.

I have not yet edited the go-newssync file because I don't know how to find or use CRON.
NewsSync is currently not running

My go-newssync file:

#!/bin/sh
/usr/local/bin/php -q newssync.php $1 $2 $3

Someone already had this problem, but no one posted on how it was resolved.

Please help me with it. I am really lost.
User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

Post by jarosciak »

Hi thank you for your answer.
If I hit newssync.php directly from the website it works fine... synchronizes without any problems.
I was able to find the right path to php and replaced it in go-newssync file.
But I am still getting the same error. Well kind of, because if I look at status while I am hitting newssync.php through internet explorer, it shows it works, but if it currently doesn't run from explorer and I just wanted to run it from management screen it wouldn't work. Same problem as last time.
I could keep it like this and run it from time to time manually, but, that is not the best solution, specially for two-way sync.
Hm...
Btw. do you know who made this scrip? I would kiss me. it's amazing piece of work.
wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

Post by wineknow »

The problem with running http://....../newssync.php is that this process needs to run automated (every hour or so) to continue to sync newsgroups. Also and more important, most default versions of php will only run a php file for 30 seconds when running it from a web browser... NewsSync, depending on the amount of stuff to sync, can take considerablly longer...

which is why it needs to be able to run from the command line.

[note: I am working on a way to do this without command line "crap" but as my free time is at a premium right now, it will take a while....]

-k

jarosciak wrote: Hi thank you for your answer.
If I hit newssync.php directly from the website it works fine... synchronizes without any problems.
I was able to find the right path to php and replaced it in go-newssync file.
But I am still getting the same error. Well kind of, because if I look at status while I am hitting newssync.php through internet explorer, it shows it works, but if it currently doesn't run from explorer and I just wanted to run it from management screen it wouldn't work. Same problem as last time.
I could keep it like this and run it from time to time manually, but, that is not the best solution, specially for two-way sync.
Hm...
Btw. do you know who made this scrip? I would kiss me. it's amazing piece of work.
User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

Post by jarosciak »

So now I am confused, looks like there is no way around this problem?
I don't want to run it every time.
If there is no solution I will have to write some windows based aplication which will every hour call web address with php file to synchronize it.
Jeez, I really don't want to go through this, but I love this script too much to let it go.Hm..
Can you try to give me some other sugestions?
User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

Another thing is driving me crazy

Post by jarosciak »

Yet, another thing drives me crazy. :)

When I go to run manually:

http://www.site.com/newsync/newssync.php

it gives me this:
!NewsSync is currently running!
NewsSync for phpBB 1.5.0 RC6
© Copyright 2003 Cooler Climate | www.coolerclimate.com
Warning: NewsSync is already running: stopped


Now, I go to php management screen and I can't stop it. I press stop and nothing happenes. It gives me again the same error.
'Refresh' gives me the samething.
'Force Restart' does nothing. Same error.

Well, number of messages in topics is not changed for last 10 minutes, since I started to have this problem. So now I am really confused.

What should I do? How do I stop the script?
wineknow
Registered User
Posts: 299
Joined: Tue Mar 04, 2003 5:20 pm
Location: Calgary, Alberta, Canada
Contact:

Re: Another thing is driving me crazy

Post by wineknow »

This is because of exactly what I said previously. The php file is trying to run longer than the 30 seconds and php is terminating it...

http://www.site.com/~dotnetboards.com/n ... hp?force=1
should do the trick --

BUT BECAUSE of the early termination, there is a pretty good chance that things are going to get screwed up. For example if you launch word and kill it before it is finished loading and do that again and again, bad things would happen...in newssync's case the data could get messed up.
jarosciak wrote: Yet, another thing drives me crazy. :)

When I go to run manually:
http://www.site.com/~dotnetboards.com/n ... wssync.php

it gives me this:
!NewsSync is currently running!
NewsSync for phpBB 1.5.0 RC6
© Copyright 2003 Cooler Climate | www.coolerclimate.com
Warning: NewsSync is already running: stopped


Now, I go to php management screen and I can't stop it. I press stop and nothing happenes. It gives me again the same error.
'Refresh' gives me the samething.
'Force Restart' does nothing. Same error.

Well, number of messages in topics is not changed for last 10 minutes, since I started to have this problem. So now I am really confused.

What should I do? How do I stop the script?
User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

Post by jarosciak »

Thank you so much. This worked. I hope nothing gets screwed up.
Thank you once again.
sandman229
Registered User
Posts: 47
Joined: Wed Oct 08, 2003 6:09 pm
Location: Victorville, Ca.
Contact:

Post by sandman229 »

jarosciak wrote: Hi thank you for your answer.
If I hit newssync.php directly from the website it works fine... synchronizes without any problems.
I was able to find the right path to php and replaced it in go-newssync file.
But I am still getting the same error. Well kind of, because if I look at status while I am hitting newssync.php through internet explorer, it shows it works, but if it currently doesn't run from explorer and I just wanted to run it from management screen it wouldn't work. Same problem as last time.
I could keep it like this and run it from time to time manually, but, that is not the best solution, specially for two-way sync.
Hm...
Btw. do you know who made this scrip? I would kiss me. it's amazing piece of work.


My mewssync is on a host provider and I do not know where php is. However, my provider told me that it is a module with apache. Anyway, I run the newssync by way of a windows scheduler only once a night with a bat file, and in this bat file there is only one line:

start http://mydomainname/blah-blah/more blah-blah/newssync.php %1 %2

and that its. It runs just fine. occasionally i do get an error like the above or I get a connect error and the admin newssync says its running and its really not. The next night it seems to clear. I have had no problems even with these errors. I don't pull newsgroups from a big news server but I pull the message base from a BBS which has a nntp server. Works great. Most of the time when you hit for status and it shows that it is running, its really not running. Most host have a over all Max time limit for files can be running. My host says its 10 minutes but I had noticed hitting for status after 4 hour and it says its still running is telling me that there is something set in mysql that is telling you that it is running. Anyway, I ignore it and the next time its run, it clear. No problem so far and I have been running it for about month now....
User avatar
jarosciak
Registered User
Posts: 107
Joined: Thu Dec 18, 2003 4:37 pm
Location: Toronto, Canada
Contact:

Post by jarosciak »

sandman229, that is a great news. I'll write myself similar bat file and that is the simpliest solution I think.
Anyways, thanks for getting back to me.
Have a gret night all of you.
Joe
Post Reply

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