Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 08:35 am EST
Geeklog Forums
Problems with Daily Digest
Status: offline
thushara
Forum User
Newbie
Registered: 03/16/04
Posts: 9
Hi! I've got a problem with my Daily Digest execution, I appreciate any help/advice on this! I followed the instructions in the FAQ here on the site to execute a Daily Digest for my site.
Everything went well, and i got the first digest to myself (a big file that had all my stories in it) but when i checked my email for the cron job confirmation - there was this error message:
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in
/home/thushara/plugins/stats/functions.inc on line 341
I'm not sure what this means as I've limited knowledge in php and mySQL. Could someone please help me decipher this? Thank you so much!
Everything went well, and i got the first digest to myself (a big file that had all my stories in it) but when i checked my email for the cron job confirmation - there was this error message:
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in
/home/thushara/plugins/stats/functions.inc on line 341
I'm not sure what this means as I've limited knowledge in php and mySQL. Could someone please help me decipher this? Thank you so much!
18
24
Quote
Status: offline
thushara
Forum User
Newbie
Registered: 03/16/04
Posts: 9
Thanks for the quick reply!
I read through the article and so far, I think I get what's going on. It seems the solution according to the article is the following:
"Looking at emailgeeklogstories, it just calls a function in lib-common.php. Try excluding lib-common.php from the page exclusion option and see if that fixes it."
I'm a little confused by the last sentence. Where am I supposed to exclude lib-common.php from? I'm not sure where the page exclusion option is. Please help. Thanks so much!
I read through the article and so far, I think I get what's going on. It seems the solution according to the article is the following:
"Looking at emailgeeklogstories, it just calls a function in lib-common.php. Try excluding lib-common.php from the page exclusion option and see if that fixes it."
I'm a little confused by the last sentence. Where am I supposed to exclude lib-common.php from? I'm not sure where the page exclusion option is. Please help. Thanks so much!
19
23
Quote
Status: offline
thushara
Forum User
Newbie
Registered: 03/16/04
Posts: 9
Thanks, Gekow. I did as you said and put in lib.common.php in the pages that should be excluded by the stats plugin. However, I still get the same error message.
Maybe it's something I'm doing wrong? I entered the name as "lib.common.php" (except without the inverted commas) as you specified. Is this right?
Also, I'm using the cron job facility from my cpanel. I noticed that if I entered the command as 30 2 * * * /home/thushara/emailgeeklogstories - I receive an email giving me this:
Usage: php [options] [-f] <file> [args...]
php [options] -r <code> [args...]
php [options] [-- args...]
-a Run interactively
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>.
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-r <code> Run PHP <code> without using script tags <?..?>
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
args... Arguments passed to script. Use -- args when first argument
starts with - or script is read from stdin
But, if I enter the command as 30 2 * * * php -q -f /home/thushara/emailgeeklogstories, I get the error message as specified in my first post - the one that says the address is not a valid IPv4 or IPv6 address...
Other than those settings in the cronjob thing I made, my path to lib-common.php in the "emailgeeklogstories" file is saved as /home/thushara/public_html/lib-common.php
And the config.php - I have already set it to 1 (yes) for the emailgeeklogstories feature.
Is there anything else I'm doing wrong that I haven't noticed but is glaringly clear for others to make out? There's got to be something I'm doing wrong! If only I could find it...
I appreciate any suggestions and advice! Please help! Thanks so much!
Maybe it's something I'm doing wrong? I entered the name as "lib.common.php" (except without the inverted commas) as you specified. Is this right?
Also, I'm using the cron job facility from my cpanel. I noticed that if I entered the command as 30 2 * * * /home/thushara/emailgeeklogstories - I receive an email giving me this:
Usage: php [options] [-f] <file> [args...]
php [options] -r <code> [args...]
php [options] [-- args...]
-a Run interactively
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>.
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-r <code> Run PHP <code> without using script tags <?..?>
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
args... Arguments passed to script. Use -- args when first argument
starts with - or script is read from stdin
But, if I enter the command as 30 2 * * * php -q -f /home/thushara/emailgeeklogstories, I get the error message as specified in my first post - the one that says the address is not a valid IPv4 or IPv6 address...
Other than those settings in the cronjob thing I made, my path to lib-common.php in the "emailgeeklogstories" file is saved as /home/thushara/public_html/lib-common.php
And the config.php - I have already set it to 1 (yes) for the emailgeeklogstories feature.
Is there anything else I'm doing wrong that I haven't noticed but is glaringly clear for others to make out? There's got to be something I'm doing wrong! If only I could find it...
I appreciate any suggestions and advice! Please help! Thanks so much!
15
23
Quote
Status: offline
steves
Forum User
Newbie
Registered: 03/18/04
Posts: 3
I've got the same problem with the
"Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in..." error.
I've tried excluding lib-common.php and emailgeeklogstories but neither helps.
Any suggestions?
thanks,
Steve
--
Steve
"Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in..." error.
I've tried excluding lib-common.php and emailgeeklogstories but neither helps.
Any suggestions?
thanks,
Steve
--
Steve
17
21
Quote
Status: offline
thushara
Forum User
Newbie
Registered: 03/16/04
Posts: 9
Hey Steve,
I still haven't solved the problem with the Daily digest either! Are you using a cpanel interface for the cronjob too? Btw, what version of Geeklog are you using ? Mine's GL ver.1.3.8-1sr4.
I also tried to exclude the following files from the visitor stats - lib.common.php (as Gekow suggested) and I added in lib-common.php and also emailgeeklogstories. But, unfortunately, it's not working! Still get the same error...
Maybe someone here could help us out. Is there any other ways to do this?
I still haven't solved the problem with the Daily digest either! Are you using a cpanel interface for the cronjob too? Btw, what version of Geeklog are you using ? Mine's GL ver.1.3.8-1sr4.
I also tried to exclude the following files from the visitor stats - lib.common.php (as Gekow suggested) and I added in lib-common.php and also emailgeeklogstories. But, unfortunately, it's not working! Still get the same error...
Maybe someone here could help us out. Is there any other ways to do this?
20
23
Quote
Status: offline
steves
Forum User
Newbie
Registered: 03/18/04
Posts: 3
Thushara-
I do have cpanel, I haven't tried to run it from there yet. I'll let you know what happens.
I'm on (1.3.8-1sr4) too.
If I can't get help on this I may just remove stats, while I really would like them I think the digest is more important to me.
Steve
--
Steve
I do have cpanel, I haven't tried to run it from there yet. I'll let you know what happens.
I'm on (1.3.8-1sr4) too.
If I can't get help on this I may just remove stats, while I really would like them I think the digest is more important to me.
Steve
--
Steve
40
21
Quote
Status: offline
steves
Forum User
Newbie
Registered: 03/18/04
Posts: 3
OK, I had no trouble with running it from cron.
I found this on the digest faq:
Your server may be configured not to allow php scripts.
Steve
--
Steve
I found this on the digest faq:
What you need is cron and the ability to call PHP scripts from a cronjob (if you don't have cron / cronjobs, you can still use this feature by installing the Manual Digest plugin).
Your server may be configured not to allow php scripts.
Steve
--
Steve
21
23
Quote
well, the good news is that my Daily Digest is working now! And all thanks to rawdata! I emailed rawdata and he/she replied explaining how to get rid of the error message.
Here's the explanation & once again, loadsa thanks & mad props to rawdata!
And it did help! So, steves, hope you get your daily digest working too!
Here's the explanation & once again, loadsa thanks & mad props to rawdata!
The function gethostbyaddr takes the IP of a visitor (ie his remote
address)
and looks up the corresponding hostname. This works fine when a page
request is made by someone located outside your server. The daily
digest
though runs right on your server so there is no associated remote
address to
grab. When the script gets to the above line of code, it spits out a
warning message saying the address is not a valid IP which it isn't --
it's
totally blank.
To silence the warning, you can prepend an @ to gethostbyaddr:
. "', host='" . @gethostbyaddr($REMOTE_ADDR)
This will make an entry into your stats table every time the digest is
run.
If you don't want an entry, then you can change this line (around 356)
located right above the entire SQL statement from:
} else {
to:
} elseif (isset($REMOTE_ADDR)) {
You can try excluding the files lib-common.php and emailgeeklogstories
in
the stats plugin. If you still get warnings, then one of these minor
changes I described should stop it. The digest itself should continue
operating fine with or without this warning. It only sends a digest
out
though when new stories are published between cron job runnings.
Hope this helps.
address)
and looks up the corresponding hostname. This works fine when a page
request is made by someone located outside your server. The daily
digest
though runs right on your server so there is no associated remote
address to
grab. When the script gets to the above line of code, it spits out a
warning message saying the address is not a valid IP which it isn't --
it's
totally blank.
To silence the warning, you can prepend an @ to gethostbyaddr:
. "', host='" . @gethostbyaddr($REMOTE_ADDR)
This will make an entry into your stats table every time the digest is
run.
If you don't want an entry, then you can change this line (around 356)
located right above the entire SQL statement from:
} else {
to:
} elseif (isset($REMOTE_ADDR)) {
You can try excluding the files lib-common.php and emailgeeklogstories
in
the stats plugin. If you still get warnings, then one of these minor
changes I described should stop it. The digest itself should continue
operating fine with or without this warning. It only sends a digest
out
though when new stories are published between cron job runnings.
Hope this helps.
And it did help! So, steves, hope you get your daily digest working too!
16
28
Quote
Status: offline
jwoodstock
Forum User
Newbie
Registered: 03/18/04
Posts: 2
When I run the shell script I get:
Fatal error: Call to a member function on a non-object in /usr/home/woody/web/geeklog-1.3.9/public_html/lib-common.php on line 3260
Any clues?
Fatal error: Call to a member function on a non-object in /usr/home/woody/web/geeklog-1.3.9/public_html/lib-common.php on line 3260
Any clues?
25
24
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It has something to do with using the PEAR classes.
Do emails work on your site? And which method are you using ('mail', 'smtp', or 'sendmail')?
The Daily Digest script may run in a slightly different environment than your Geeklog site, as it's being called from a cronjob and not from your webserver. Try switching to another method for sending mail or talk to your hosting service and see if they can do anything here.
bye, Dirk
Do emails work on your site? And which method are you using ('mail', 'smtp', or 'sendmail')?
The Daily Digest script may run in a slightly different environment than your Geeklog site, as it's being called from a cronjob and not from your webserver. Try switching to another method for sending mail or talk to your hosting service and see if they can do anything here.
bye, Dirk
24
25
Quote
Status: offline
jwoodstock
Forum User
Newbie
Registered: 03/18/04
Posts: 2
I am using 'mail'
I noticed if I turned off the emails coming from "Moderator" the problem stopped.. I'm guessing it was related to a bad email address..
Not sure if that make sense, but it seemed to work after that change.
Thanks for the quick response.. You've got a great product.. Keep up the great job..
I noticed if I turned off the emails coming from "Moderator" the problem stopped.. I'm guessing it was related to a bad email address..
Not sure if that make sense, but it seemed to work after that change.
Thanks for the quick response.. You've got a great product.. Keep up the great job..
18
19
Quote
All times are EST. The time is now 08:35 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content