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

Home » FUDforum Development » Bug Reports » version 3.0.2: Call to undefined function logaction (job using maillist.php )
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
version 3.0.2: Call to undefined function logaction [message #164003] Sun, 26 December 2010 08:01 Go to next message
Marianne is currently offline  Marianne   France
Messages: 13
Registered: December 2010
Karma: 0
Junior Member
Hello,

I have defined a job to launch mailling.php (name: maillist import)

When I call mailling.php in a command line, it works fine.

When I launch the job, I have these error:
Connected to mailbox {XXX:110/POP3/novalidate-cert}INBOX
Load message 2. Done. Delete message.
Fatal error: Call to undefined function logaction() in
/XXXX/FUDforum/include/theme/default/iemail.inc on line 75

The message is integrated but, the job is stopped. It is not launched again by itself, following the rules.

Here is the code
if (defined('forum_debug')) {
logaction(_uid, 'SEND EMAIL', 0, 'To=['. implode(',', (array)$to) .']<br />Subject=['. $subj .']<br />Headers=['. str_replace("\n", '<br />', htmlentities($header)) .']<br />Message=['. $body .']');
}


logaction is defined in FUDforum/include/theme/default/logaction.inc
Does iemail.inc miss an include ?
Or do I have misconfigured something ? the "debug forum" seting is set to off.

What can I do ?
Re: version 3.0.2: Call to undefined function logaction [message #164024 is a reply to message #164003] Wed, 29 December 2010 15:46 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
I'm not sure how to fix this yet.
For now, just comment out the identified code from the script and you'll be fine.
Re : Re: version 3.0.2: Call to undefined function logaction [message #164025 is a reply to message #164024] Wed, 29 December 2010 16:57 Go to previous messageGo to next message
Marianne is currently offline  Marianne   France
Messages: 13
Registered: December 2010
Karma: 0
Junior Member
naudefj a écrit le Wed, 29 December 2010 16:46
I'm not sure how to fix this yet.
For now, just comment out the identified code from the script and you'll be fine.


Yes, I have done that, and when I launch it by clicking on "run now", it runs well. When I launch it by command line, it runs well again.

But, the cron job does not work. I must click on the link.
And, no errors Sad

I have activated the debug but no information.
Re: Re : Re: version 3.0.2: Call to undefined function logaction [message #164027 is a reply to message #164025] Wed, 29 December 2010 18:02 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
Try to you run cron.php from command line to see if it gives errors.

PS: It's working fine on my system.
Re : Re: Re : Re: version 3.0.2: Call to undefined function logaction [message #164030 is a reply to message #164027] Wed, 29 December 2010 18:35 Go to previous messageGo to next message
Marianne is currently offline  Marianne   France
Messages: 13
Registered: December 2010
Karma: 0
Junior Member
naudefj a écrit le Wed, 29 December 2010 19:02
Try to you run cron.php from command line to see if it gives errors.

PS: It's working fine on my system.


I have launched cron.php by command line. It will work one time. But not again. There is no errors.
Re: Re : Re: Re : Re: version 3.0.2: Call to undefined function logaction [message #164034 is a reply to message #164030] Wed, 29 December 2010 21:29 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
No errors and no messages means there is nothing in the queue to run.

To convince yourself, add a couple of echo statements to make it more verbose.
Re : Re: Re : Re: Re : Re: version 3.0.2: Call to undefined function logaction [message #164036 is a reply to message #164034] Thu, 30 December 2010 06:21 Go to previous messageGo to next message
Marianne is currently offline  Marianne   France
Messages: 13
Registered: December 2010
Karma: 0
Junior Member
Hello,

naudefj a écrit le Wed, 29 December 2010 22:29
No errors and no messages means there is nothing in the queue to run.
To convince yourself, add a couple of echo statements to make it more verbose.


I have had a lot of echo, launch it by manuel command like that
/GOOD PATH/php /GOOD PATH/FUDforum/scripts/cron.php >>mlist.log 2>&1

And in mlist.log, I see often "no job, return" (echo added line 54 (test if (!$job) ...)), and sometimes echos that I have added after this test.

In the database, I have :
MEL@LISTE-DOMAIN * * * * * maillist.php 1 1293696960 1293696953 0 0

When there is no job detected, it returnes, so how can be it call again ?
and when there is job, the fonction plugin_call_hook is called. So, maybe, I must investigate this one to understand why cron.php is not called again and again.

In all cases, in my log file, there is only one call. The LAST_CRON_RUN date is updated only by the call and not after.

What do you suggest ?
Re: version 3.0.2: Call to undefined function logaction [message #164040 is a reply to message #164036] Thu, 30 December 2010 12:14 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
I still don't understand what's wrong.
You need to to run cron.php repeatedly.
Schedule it on your system for every 5 minutes or so.
It it finds an over due job, it will run it.
Otherwise it will do nothing.

PS: Use this version of cron.php (more verbose & fixes a minor bug).
http://fudforum.svn.sourceforge.net/viewvc/fudforum?view=revision&revis ion=5093
Re : Re: version 3.0.2: Call to undefined function logaction [message #164041 is a reply to message #164040] Thu, 30 December 2010 16:29 Go to previous messageGo to next message
Marianne is currently offline  Marianne   France
Messages: 13
Registered: December 2010
Karma: 0
Junior Member
Hello,

naudefj a écrit le Thu, 30 December 2010 13:14
I still don't understand what's wrong.
You need to to run cron.php repeatedly.
Schedule it on your system for every 5 minutes or so.
It it finds an over due job, it will run it.
Otherwise it will do nothing.


Ok, I have understood that it will replace the extern cron, by using timer or other functionalities like that.


Citation :
PS: Use this version of cron.php (more verbose & fixes a minor bug).
http://fudforum.svn.sourceforge.net/viewvc/fudforum?view=revision&revis ion=5093


Thank you, and also for your answer. I have improved the wiki page about the Job Administration System.
Re: version 3.0.2: Call to undefined function logaction [message #164399 is a reply to message #164003] Thu, 03 February 2011 23:38 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Marianne wrote on Sun, 26 December 2010 03:01

Fatal error: Call to undefined function logaction() in
/XXXX/FUDforum/include/theme/default/iemail.inc on line 75


I just had the same issue. Commenting it out is fixing it for now....

James.
Re: version 3.0.2: Call to undefined function logaction [message #164412 is a reply to message #164399] Fri, 04 February 2011 12:02 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Is there a way to make this fix permanent? Every time I rebuild my themes I have to go back and manually edit that file. Otherwise it will import nntp messages and then error out before it thinks it is complete and then try again. So I get the same message imported many, many times since it tries to nntp sync every 2 - 5 minutes.

James.
Re: version 3.0.2: Call to undefined function logaction [message #164414 is a reply to message #164412] Fri, 04 February 2011 12:12 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
That seems to have done it. Thank you.

Correction, that was for a different thread. This issue still remains..., at least a permanent fix.

[Updated on: Fri, 04 February 2011 12:14]

Report message to a moderator

Re: version 3.0.2: Call to undefined function logaction [message #164415 is a reply to message #164412] Fri, 04 February 2011 12:15 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
Let me try to understand this.
You get the same error, so you think it's the same issue?
However, yours is probably in nntp.inc and not in iemail.inc?
Re: version 3.0.2: Call to undefined function logaction [message #164417 is a reply to message #164415] Fri, 04 February 2011 12:19 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Actually, I've been editing iemail.inc.

I just created a message on a forum I'm pretty sure no one subscribes to and it worked fine with and without this change. So maybe it only happen messages that are subscribed to. So when I try to nntp sync it comes in fine but then it goes and tries to email to those who have subscribed, fails at that, and then fails out of the import only to do it again.

That's my theory anyways Smile
Re: version 3.0.2: Call to undefined function logaction [message #164418 is a reply to message #164417] Fri, 04 February 2011 12:27 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
Thanks for the explanation.
Fixed @ http://fudforum.svn.sourceforge.net/fudforum/?rev=5112&view=rev
Re: version 3.0.2: Call to undefined function logaction [message #164428 is a reply to message #164418] Fri, 04 February 2011 16:49 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Again, that URL doesn't work.
Re: version 3.0.2: Call to undefined function logaction [message #164433 is a reply to message #164428] Sat, 05 February 2011 03:47 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
Try this one:
https://sourceforge.net/apps/trac/fudforum/changeset/5112
Re: version 3.0.2: Call to undefined function logaction [message #164470 is a reply to message #164433] Tue, 08 February 2011 17:58 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I made the update and I thought it worked. But now I get a couple of problems when syncing nntp:

1)

PHP Notice: Use of undefined constant _uid - assumed '_uid' in /var/data/fudforum_data/include/theme/default/iemail.inc on line 78
<hr>(/var/data/fudforum_data/include/theme/default/db.inc:75<br />
/var/data/fudforum_data/include/theme/default/logaction.inc:15<br />
/var/data/fudforum_data/include/theme/default/iemail.inc:78<br />
/var/data/fudforum_data/include/theme/default/imsg_edt.inc:848<br />
/var/data/fudforum_data/include/theme/default/imsg_edt.inc:510<br />
/var/data/fudforum_data/scripts/nntp.php:282<br />
) 1054: Unknown column '_uid' in 'field list'<br />


2)


PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Fatal error: Call to undefined function convertPlural() in /var/data/fudforum_data/include/theme/default/imsg_edt.inc on line 714

I didn't see these issues before I made this change. But I've changed a few things in the last couple of days (applied patches you suggested).

I'll send the nntp groups via PM.

James.
Re: version 3.0.2: Call to undefined function logaction [message #164471 is a reply to message #164470] Tue, 08 February 2011 18:13 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I should add that the nntp messages are imported, then it fails in these two ways, and the next time the same message is imported again.

I just undid the changes at

http://sourceforge.net/apps/trac/fudforum/changeset/5112

and then rebuilt the themes. I then had to comment out line 75 of include/theme/default/iemail.inc

That fixed the one problem. Still left with

PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Fatal error: Call to undefined function convertPlural() in /var/data/fudforum_data/include/theme/default/imsg_edt.inc on line 714

I edited line 700 to

<tr><th colspan="3">'.$obj->poll_name.'<img src="blank.gif" alt="" height="1" width="10" style="white-space: nowrap" /><span class="small">[ '.$obj->total_votes.' votes ]</span></th></tr>

and line 716 to

<span class="SmallText">(Size: '.$sz.', Downloaded '.$v[3].' times)</span></td></tr>';

Then I still get the warning

PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225

but it works.

The .convertPlural issue I had before as well and I couldn't figure it out.

James.

James.
Re: version 3.0.2: Call to undefined function logaction [message #165205 is a reply to message #164471] Tue, 10 May 2011 11:06 Go to previous messageGo to next message
eclipsewebmaster is currently offline  eclipsewebmaster   Canada
Messages: 46
Registered: November 2009
Location: Ottawa, Ontario, Canada
Karma: 0
Member
I encountered the logaction and _uid bugs as well, and after examining vercheck.php I fixed them like this:

+++ FUDforum/scripts/nntp.php 10 May 2011 14:30:04 -0000
@@ -79,6 +79,7 @@
fud_use('isearch.inc');
fud_use('replace.inc');
fud_use('rev_fmt.inc');
+ fud_use('logaction.inc');
fud_use('iemail.inc');
fud_use('post_proc.inc');
fud_use('is_perms.inc');
@@ -92,6 +93,7 @@
fud_use('nntp.inc', true);
fud_use('mime_decode.inc', true);
fud_use('scripts_common.inc', true);
+ define('_uid', 1);
Re: version 3.0.2: Call to undefined function logaction [message #165206 is a reply to message #165205] Tue, 10 May 2011 16:06 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Looks like these changes are already committed:
http://fudforum.svn.sourceforge.net/viewvc/fudforum/trunk/install/forum_dat a/scripts/vercheck.php?view=markup
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NNTP Import Subject with Non-Ascii Characters
Next Topic: RSS & path_info
Goto Forum:
  

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

Current Time: Thu Nov 28 02:46:46 GMT 2024

Total time taken to generate the page: 0.02799 seconds