Posted on: 01/24/03 01:06am
By: Cregar
I have my site up and running great but I can't get the emailgeeklogstories script to work.
I get a email stating:
/bin/sh: emailgeeklogstories: command not found
I have tried the suggestion of removing the line of text from the emailgeeklogstories file and running thru my browser as a php file. The script works fine. But when I run it through cron I get the error above.
Thank for any help.
emailgeeklogstories
Posted on: 01/24/03 10:40am
By: Dirk
Did you specify the complete path to the emailgeeklogstories script? Did you set the executable flags?
bye, Dirk
emailgeeklogstories
Posted on: 01/24/03 10:48am
By: Cregar
The path is fine. All I did was set the permissions (through FTP) to be
755. Is that what you mean by excutable?
emailgeeklogstories
Posted on: 01/24/03 10:51am
By: Tony
This sounds like a basic *nix issue. Just type this:
./emailgeeklogstories---The reason people blame things on previous generations is that there's only one other choice.
emailgeeklogstories
Posted on: 01/24/03 11:13am
By: Cregar
Ok Tony,
Changing the cron line like you suggested give me this now:
./emailgeeklogstories: ?php : No such file or directory
./emailgeeklogstories: line 7: syntax error near unexpected token
`include('/XXXX/XXXXX/public_html/lib-common.php')'
./emailgeeklogstories: line 7:
`include('/XXXXX/XXXX/public_html/lib-common.php'); '
Any Ideas???
---
--
"Get Geeked"
Cregar
emailgeeklogstories
Posted on: 01/24/03 12:15pm
By: Dirk
You originally wrote that you removed the first line from the emailgeeklogstories script. Did you put it back in?
bye, Dirk
emailgeeklogstories
Posted on: 01/24/03 12:59pm
By: Cregar
Yep, after testing the script in my browser with the .php extension I took
the .php extension off and added #!/usr/local/bin/php -q back
in.
The path in my cron command is set as:
./emailgeeklogstories
I set the permissions through ftp as 755
Thanks again for any
help provided.
---
--
"Get Geeked"
Cregar
emailgeeklogstories
Posted on: 01/24/03 01:16pm
By: micahmj11
Not understanding much about unix, and being new to php, I too had difficulty getting emailgeeklogstories working. But i finally got it to work. Im not sure if your situation is the same as mine, but I had to type php before the path in the cron job. it looks like this:
php /PATH/TO/emailgeeklogstories.php
and the contents of emailgeeklogstories.php is:
#!/usr/local/bin/php -q
<?php
#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).
require_once ("/PATH/TO/lib-common.php"
;
COM_emailUserTopics();
?>
The addition of the "php" in the cron tab is what finally made it work for me.
hope this helps.
Micah
emailgeeklogstories
Posted on: 01/24/03 01:19pm
By: Cregar
Does the emailgeeklogstories file to be in the public_html directory? Right now its outside the public_html directory.<br><br>
config.php<br>
emailgeeklogstories<br>
public_html<br>
etc<br>
<br>I wish I could get this working
-----
"Get Geeked"
Cregar
emailgeeklogstories
Posted on: 01/24/03 01:26pm
By: Cregar
set it up as you suggested and got this error:<br><br>
I Failed loading /usr/local/Zend/lib/ZendOptimizer.so: /usr/local/Zend/lib/ZendOptimizer.so: cannot open shared object file: No such file or directory<br>
X-Powered-By: PHP/4.2.3
Set-Cookie: LastVisit=1043432640; expires=Sat, 24-Jan-04 18:24:00 GMT; path=/ <br>
Set-Cookie: LastVisitTemp=deleted; expires=Thu, 24-Jan-02 18:23:59 GMT; path=/; domain=http://www.janischfamily.com <br>
Content-type: text/html <br>
-----
"Get Geeked"
Cregar
emailgeeklogstories
Posted on: 01/24/03 06:27pm
By: Dirk
If you put it inside your public_html, everyone can call it up at any time. You surely don't want that ...
bye, Dirk