Posted on: 11/14/02 10:31pm
By: micahmj11
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
email stories
Posted on: 11/15/02 12:41am
By: Dirk
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
email stories
Posted on: 11/15/02 04:32am
By: cchiapusio
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