SMF Shop
SMFShop => Installation Problems => Topic started by: ProwlingTiger on April 30, 2007, 01:49:13 am
-
Can someone help me configure the cron job without cpanel?
-
what are you using instead of cpanel?
screen shot of your cron area?
your webhost?
-
DreamHost....screenshot: http://img341.imageshack.us/img341/1411/cronjobag3.png (http://img341.imageshack.us/img341/1411/cronjobag3.png)
-
example of running a php in cron for dreamhost
/dh/cgi-system/php5.cgi /home/youruser/yourdomain.com/path-to-php5-script.php
just alter the /home/youruser/yourdomain.com/path-to-php5-script.php to the dointerest.php
and put it in command to run
-
My user as in my shell ftp user?
-
My user as in my shell ftp user?
if you go into your smf forums admin->server settings
under sources directory
just use whats in there and add "\shop\dointerest.php"
for example your cron would now be
/dh/cgi-system/php5.cgi /home/youruser/yourdomain.com/Sources/shop/dointerest.php
-
Okay so I dont replace the part where it says /youruser ? I just leave it alone? Or, do I use my forum user?
-
Okay so I dont replace the part where it says /youruser ? I just leave it alone? Or, do I use my forum user?
just take a look, you should be able to tell
the source directory text area should start with /home... and so forth
-
Eh I getcha!
-
ProwlingTiger, did you solve this issue? Did the cron job end up working?
-
Unfortunately, no....
-
Try contacting your host for support. Tell them you'd like to run Sources/shop/dointerest.php as a daily cronjob, and they should be able to help you :).
-
Ok thank you!
-
Hihi..i followed the instructions given, but it doesn't seem to work cos there's no increase in the money put in the bank.. =(
-
Yeah...I dont know why it doesnt work. I put in a support ticket to my host. Maybe I should just call em up...
-
Yeah...I dont know why it doesnt work. I put in a support ticket to my host. Maybe I should just call em up...
maybe this one might work instead
* * * * * /dh/cgi-system/php.cgi /home/youruser/yourdomain.com/path-to-php4-script.php
Hihi..i followed the instructions given, but it doesn't seem to work cos there's no increase in the money put in the bank.. =(
this is for dreamhost users only.
http://www.daniel15.com/forum/index.php/topic,193.0.html
for how to setup the cron on other hosts
-
Could it be that the code is wrong? Cos it seems a little different from the code provided by Daniel =)
-
I contacted DreamHost. They told me something about not being able to run PHP scripts in that manner...or something.
Here's the script they gave me to try:
lynx -dump http://zephyrgaming.com/forums/Sources/shop/dointerest.php
-
Thanks a lot! I shall try the code too =)
-
I didnt get it to work. You?
-
I didnt get it to work. You?
Me too..it doesn't work.. T_____T
-
Well I was then told to add something like /user/bin...but that didnt work either.
-
I contacted DreamHost. They told me something about not being able to run PHP scripts in that manner...or something.
Here's the script they gave me to try:
lynx -dump http://zephyrgaming.com/forums/Sources/shop/dointerest.php
OK, If you need to run it like that, you need the script in the Bank interest without cron job? Read this! (http://www.daniel15.com/forum/index.php/topic,31.0.html) topic. Save that script with a random name (as detailed in that topic), test it out (by going to http://zephyrgaming.com/forums/whatever_it_is_called.php), and once it's confirmed as working, use the URL to it in the cron job.
-
Okay, I shall see if it works!
-
Okay, Im about ready to just give this interest thing up.
Heres my cron job:
/usr/bin/lynx -dump=20
http://www/forums/filename.php
And the file code:
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.net/ |
\**********************************************/
//File: dointerest.php
// The file to add interest to member's bank
//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005
include("/home/.***/www/forums/SSI.php");
$interest_rate = $modSettings['shopInterest'] / 100;
db_query("UPDATE {$db_prefix}members
SET moneyBank = moneyBank + (moneyBank*{$interest_rate})", __FILE__, __LINE__);
echo "Interest added at ".date("d/m/Y h:i:s A");
?>