Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 09:04 am EST
Geeklog Forums
email stories
Status: offline
micahmj11
Forum User
Junior
Registered: 10/11/02
Posts: 20
Ive asked this question before, but never got an answer. After putting the issue aside for a while, i am again trying to get the emailgeeklogstories code to work.
I set a cronjob to execute emailgeeklogstories.php. I get the following error:
/home/chiadd2/geeklog/emailgeeklogstories.php: ?php
: No such file or directory
/home/chiadd2/geeklog/emailgeeklogstories.php: line 7: syntax error near unexpected token `include('/home/chiadd2/public_html/lib-common.php')'
/home/chiadd2/geeklog/emailgeeklogstories.php: line 7: `include('/home/chiadd2/public_html/lib-common.php');
'
This is the contents of my emailgeeklogstories.php file:
<?php
#!/usr/local/bin/php -q
#This code snippet is responsible for emailing Geeklog stories to users
#for the topics they select. For this script to work you must have compiled
#php so it can also be used a shell scripting language. DO NOT change anything
#in this file. You should call this script from your crontab (man crontab).
include('/home/chiadd2/public_html/lib-common.php');
COM_emailUserTopics();
?>
the file's permission is set to be executable. What have I done wrong. Ive done lots of tinkering, but can't get it to work.
--Micah
8
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The error messages seem to indicate that it doesn't recognize the file as a PHP script. Are you sure you can execute PHP scripts from the command line on your setup?
If you have shell (ssh) access, try executing the script directly.
bye, Dirk
10
9
Quote
Status: offline
cchiapusio
Forum User
Newbie
Registered: 12/17/01
Posts: 2
There are two items you may have to adjust in emailgeeklogstories before it will begin to 'work'.
You must ensure the first line points to your php binary and you must make sure the include statement has the corect path to lib-common.php.
Now that emailgeeklogstories is in working order, you will now have to urge the dev team to fix bugid 573305 relating to user settings for topics to be emailed.
Chipper/EA
9
8
Quote
All times are EST. The time is now 09:04 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