1
Modifications / Re: SMF Lottery Mod
« on: January 04, 2008, 01:11:52 pm »
I haven't been able to get the cron job to run. The lottery center indicates no draws have taken place yet. I have the crom job set to run every Thursday at 11:30 PM, and I've edited the LotteryDraw.php file to allow for a period of 7 days between draws. It just doesn't run. When I try to access the file with my browser to run it that way I get an internal server error. I have the interest for the bank working, and I've made sure the path is the same for both jobs. I really don't know much at all about cron jobs, so I'm at a loss. I even tried chmod 777 on the lotterydraw file. Can anyone give me any ideas? I love this mod and my users are buying up tickets left and right, but I've got to get the draw working.
Thanks in advance for any help anyone can offer.
UPDATE: I got it to work by choosing every weekday instead of a specific day of the week, and changing the time between draws to 24 hours. I don't want a daily draw, though, I only want a weekly draw. And I don't even care what day of the week it happens on, just that it only happens once a week. If I leave it at every weekday, and change the time between draws to 7 days, will that allow it to run weekly?
UPDATE #2: Now that the lottery draw has run once, none of my regular members can use their tickets. They are able to buy them fine, they go into their inventory and choose their numbers but when they click to use the item, they get this:
When I look in the forum's error log, this is the error that shows up:
Here is line 113-117 of my lottery.php file:
I don't get any errors using my admin account, I am able to use the tickets without issue. I'm lost. I can't figure out why the table name would be incorrect for one user group and not another. I haven't changed anything in any of the files except the time between draws. Using SMF 1.1.4, shop 3.0 (build 12) and lottery mod 1.0.1. Any ideas?
Bandit
Thanks in advance for any help anyone can offer.
UPDATE: I got it to work by choosing every weekday instead of a specific day of the week, and changing the time between draws to 24 hours. I don't want a daily draw, though, I only want a weekly draw. And I don't even care what day of the week it happens on, just that it only happens once a week. If I leave it at every weekday, and change the time between draws to 7 days, will that allow it to run weekly?
UPDATE #2: Now that the lottery draw has run once, none of my regular members can use their tickets. They are able to buy them fine, they go into their inventory and choose their numbers but when they click to use the item, they get this:
Quote
"Database Error Please try again. If you come back to this error screen, report the error to an administrator."
When I look in the forum's error log, this is the error that shows up:
Code: [Select]
test Today at 08:54:23 PM
74.77.24.187 8ffbf09aa0698d68c39dfa13e9636742
http://www.lacrosse-network.com/forum/index.php?option=com_smf&Itemid=26&action=shop;do=inv3;id=199
Database Error: Incorrect table name ''
File: /home/xxxxxx/public_html/lacrosse-network/forum/Sources/shop/items/Lottery.php
Line: 115
Here is line 113-117 of my lottery.php file:
Code: [Select]
$result = db_query("SELECT `MemberTicketID` FROM `{$db_prefix}shop_lottery` WHERE
`ID_MEMBER` = '$ID_MEMBER' AND
`ID_TICKET` > $lastTicket",__FILE__,__LINE__);
if (mysql_num_rows($result) == $item_info[1])
{
I don't get any errors using my admin account, I am able to use the tickets without issue. I'm lost. I can't figure out why the table name would be incorrect for one user group and not another. I haven't changed anything in any of the files except the time between draws. Using SMF 1.1.4, shop 3.0 (build 12) and lottery mod 1.0.1. Any ideas?
Bandit