SMF Shop
SMFShop => General SMFShop Discussion => Topic started by: Daniel15 on June 27, 2006, 05:45:40 pm
-
Moved to the Wiki... Please see http://www.dansoftaustralia.net/smfshop_wiki/
-
It should add interest on a daily basis? Because its been a month that I fixed (finally) the file by creating my own empty interest_log.htm... and so far... nothing...
This is what my screen looks like:
(http://i71.photobucket.com/albums/i160/khaotikdezirez/yuck.jpg)
And this is the... http://www.khaotikdezirez.com/interest_log.htm
-
Hmmm... It looks like there is a problem with running PHP in a cron job.
To fix this, create a file in your forum's directory. Give it a random name, like interest12312312.php. Place the following into it:
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: dointerest.php
// The file to add interest to member's bank
//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005
include("/home/[username]/public_html/forum/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");
}
?>
Then, change the cron command to:
wget -O - -q http://www.khaotikdezirez.com/forum/[filename].php
That should work for you :)
-
I installed the Cron Job the way you mentioned; but there doesn't seem to be interest generating - I looked for interest_log.htm but there was none there so I created one... I'm going to wait 24 hours to see if it works but should it generate interest WITHOUT the file?
-
I installed the Cron Job the way you mentioned; but there doesn't seem to be interest generating - I looked for interest_log.htm but there was none there so I created one... I'm going to wait 24 hours to see if it works but should it generate interest WITHOUT the file?
When the cron job runs, it creates the interest_log.htm file. After it has run, check that file. It should say "Interest added at " followed by the date and time :).
-
Nup, nothing...
I created the log file myself as it wasn't appearing and it says 'no input file specified'
-
Nup, nothing...
I created the log file myself as it wasn't appearing and it says 'no input file specified'
That sounds like a PHP problem to me... "No input file specified" is a common sign that PHP is misconfigured on the server.
Try getting rid of the -q from the command line, and see if that solves it.
-
Well it added:
Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html
to the file and I set the interest to rise every 5 minutes to see if there was any effect.
Is it working better though? I mean, will it start adding interest every 5 minutes after 12 hours?
-
Well I did it like you say but it gave everyone max points how do i fix this
This is the command and i still dont have the interest_log.htm
/usr/bin/php -q /home/texasb/public_html/Sources/shop/dointerest.php > /home/texasb/public_html/interest_log.htm
-
Well it added:
Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html
to the file and I set the interest to rise every 5 minutes to see if there was any effect.
Is it working better though? I mean, will it start adding interest every 5 minutes after 12 hours?
I would like a bit of assistance here. I've waited patiently for ages.
-
Doesn't work for me. Not having CPanel or any way of setting up a cron job on the server I used www.cronjobs.org but still nothing.
I rather suspect that it's due to there being no SSI.php file in my /forum directory. Why isn't it there and where would I find it?
** edit - ok, found SSI.php in the original distribution. Don't know why it didn't copy over but it's there now. Interest still doesn't appear to work.
-
my forum is installed directly to the public_html. I have this enterd as a cron job but interest is not calculating. Cant figure out why. its been 3 days since I put the command.
/usr/bin/php -q /home/albert/public_html/Sources/shop/dointerest.php > /home/albert/public_html/interest_log.htm
-
Solved.
I created the htm file and loaded it to my forum root and that was it. It worked last night :)
-
Well it added:
Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html
No Imput File Specified
to the file and I set the interest to rise every 5 minutes to see if there was any effect.
Is it working better though? I mean, will it start adding interest every 5 minutes after 12 hours?
I would like a bit of assistance here. I've waited patiently for ages.
cough. It's been months now, still not working.
-
Hello all,
I cant get the interest to work.
I am using SMFSHOP 3.0
I have made all what you have said in this topic and the interest_log file was created automatically but I found this message in it:
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(): Failed opening '../../SSI.php' for inclusion (include_path='.:/usr/local/lib/php') in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Fatal error: Call to undefined function: db_query() in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 20
anybody can help???
CuTe_MaN
-
Hello all,
I cant get the interest to work.
I am using SMFSHOP 3.0
I have made all what you have said in this topic and the interest_log file was created automatically but I found this message in it:
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(../../SSI.php): failed to open stream: No such file or directory in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Warning: main(): Failed opening '../../SSI.php' for inclusion (include_path='.:/usr/local/lib/php') in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 17
Fatal error: Call to undefined function: db_query() in /hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php on line 20
anybody can help???
CuTe_MaN
Open up your do interest file
/hsphere/local/home/rsabouni/samasyria.net/smf/Sources/shop/dointerest.php
on line 17 find
../../SSI.php
and replace with
/hsphere/local/home/rsabouni/samasyria.net/smf/SSI.php
-
I think that there is a problem with the intrest
I have assigned 1% per day and now users are getting more than that
I have added 100 credits to my bank account and after 2 days I have 182 credits thats impossible
can u help me please?
CuTe_MaN