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

Home » FUDforum » How To » Error running nntp.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Error running nntp.php [message #32967] Mon, 07 August 2006 14:57 Go to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
I am trying to integrate FUDforum into my existing ) newsgroups. FUDforum is hosted (by ICDSoft) and I run my own NNTP server at home. FUDforum itself is working well, and I understand (or at least I hope I do) NNTP.

I have yet to get nntp.php to make contact with my server. When it runs from Cron (or, to be precise psuedo-cron, which works OK for other things), it appears to complete correctly; i.e. no errors are logged either in the FUDforum admin errors screen or in psuedo-cron.log. However, nothing happens at my end - not even an "Access denied"
I have checked and rechecked that I've entered the right details.

If I try to run it directly, I get the error:
Fatal error: Call to a member function on a non-object in /(path to)/nntp.php on line 93

At my host's suggestion, I changed the first line of nntp.php to #!/usr/local/bin/php4.cli.
System details.
PHP Version 4.4.3-dev
PHP Version 5.1.4
MySQL 4.0.27

Any ideas?




--
Bill Hayles
El Inglés Loco
Re: Error running nntp.php [message #32972 is a reply to message #32967] Mon, 07 August 2006 17:40 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 version of the forum are you running? On lline 93 I see $nntp->release_lock($lock); call. Your error implies that $nntp somehow is NOT an object, which seems impossible...

FUDforum Core Developer
Re: Error running nntp.php [message #32981 is a reply to message #32972] Mon, 07 August 2006 19:43 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
Ilia wrote on Mon, 07 August 2006 19:40

What version of the forum are you running? On lline 93 I see $nntp->release_lock($lock); call. Your error implies that $nntp somehow is NOT an object, which seems impossible...


I'm using FUDforum 2.7.5

I make line 93
$lock = $nntp->get_lock();

the line you quoted is line 95



(Added later). I edited my nntp.php slightly at the suggestion of my host's support team, which is why I was two lines out. I replaced it with the original. The error remains, but at line 91.



--
Bill Hayles
El Inglés Loco

[Updated on: Mon, 07 August 2006 20:02]

Report message to a moderator

Re: Error running nntp.php [message #32998 is a reply to message #32981] Tue, 08 August 2006 15:10 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
Can you add var_dump($nntp); before the $nntp->release_lock($lock); line and let me know what it returns.

FUDforum Core Developer
Re: Error running nntp.php [message #33002 is a reply to message #32998] Tue, 08 August 2006 17:41 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
Ilia wrote on Tue, 08 August 2006 17:10

Can you add var_dump($nntp); before the $nntp->release_lock($lock); line and let me know what it returns.



It never gets executed, because the script chokes on the $lock = $nntp->get_lock(); line and doesn't go any further.
Putting it before that line returns NULL.

Thanks for trying to help.


--
Bill Hayles
El Inglés Loco
Re: Error running nntp.php [message #33008 is a reply to message #33002] Tue, 08 August 2006 20:33 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
Can you try adding var_dump(__METHOD__, $this, __LINE__); at the start and end of every method inside include/nntp.inc?
I cannot see anything that would destroy $nntp :/


FUDforum Core Developer
Re: Error running nntp.php [message #33032 is a reply to message #33008] Wed, 09 August 2006 08:11 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
Ilia wrote on Tue, 08 August 2006 22:33

Can you try adding var_dump(__METHOD__, $this, __LINE__); at the start and end of every method inside include/nntp.inc?
I cannot see anything that would destroy $nntp :/


I did that, with interesting results. I still saw nothing except the "Call to a member function on a non-object line". After rechecking that the modified nntp.inc really WAS in the /include directory, and having the same result several times, I wondered if nntp.inc was actually being called. So I renamed it, expecting that nntp.php would complain it couldn't find it, but no. Still exactly the same response. So I can only conclude that nntp.php is ending before it ever calls nntp.inc.

I hope this makes more sense to you than it does to me!


--
Bill Hayles
El Inglés Loco

[Updated on: Wed, 09 August 2006 08:11]

Report message to a moderator

Re: Error running nntp.php [message #33033 is a reply to message #33032] Wed, 09 August 2006 08:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Why don't you add a couple of "echo" lines to the script so you can trace its execution path.

Start by adding this just after line 14:

echo "Fist statement executed...";
Re: Error running nntp.php [message #33035 is a reply to message #33033] Wed, 09 August 2006 08:58 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
naudefj wrote on Wed, 09 August 2006 10:18

Why don't you add a couple of "echo" lines to the script so you can trace its execution path.

Start by adding this just after line 14:

echo "Fist statement executed...";



Good idea! I'll do it when I get time and report back.

Once again, thanks to everybody who's trying to help me.


--
Bill Hayles
El Inglés Loco
Re: Error running nntp.php [message #33045 is a reply to message #32967] Wed, 09 August 2006 15:36 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
OK, folks, I got this one sorted. It was whilst I was adding all the "echo" statements that I saw it.

The comments lines at the start of the script weren't properly terminated. The end line was simply / instead of **/. I must have done this myself, somehow.

Why that caused the error it did, we'll probably never know, but putting it right has resulted in the script running properly (at least from a command line; I'll worry about a cron script later.)

BTW, my copy of nntp.php is now so altered, that I'd appreciate a download of the original to start again. Is there an easy way of doing this?

Once again, thanks to everybody who has helped. It's appreciated


--
Bill Hayles
El Inglés Loco
Re: Error running nntp.php [message #33047 is a reply to message #33045] Wed, 09 August 2006 17:13 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 can get the original from web cvs
http://cvs.prohost.org/c/index.cgi/FUDforum/getfile/install/forum_data/scri pts/nntp.php?v=1.30


FUDforum Core Developer
Re: Error running nntp.php [message #33048 is a reply to message #33047] Wed, 09 August 2006 17:45 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
Great source of data and information. Thanks for the link.


--
Bill Hayles
El Inglés Loco
Re: Error running nntp.php [message #186980 is a reply to message #33048] Sun, 11 October 2015 12:51 Go to previous message
ulrith is currently offline  ulrith   Latvia
Messages: 15
Registered: September 2015
Karma: 0
Junior Member
Hi!

I do not see any $nntp->release_lock($lock); call in my current 3.0.6 version of the forum at all.
Also I've noticed that the file FUDforum/errors/.nntp/localhost-alt.group.lock is not removed after script nntp.php ends.

Initially I've set nntp.php script call in the root crontab, which was bad idea as I realized.
Now it is in the forum user's crontab.

But I could not manage to send the messages to the newsgroup still.

Could you please give me some advice?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How configure FUDFORUM for starting language as set browser
Next Topic: Having Problem With Type
Goto Forum:
  

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

Current Time: Sun Nov 24 00:31:40 GMT 2024

Total time taken to generate the page: 0.03126 seconds