Hello and thanks again for the replys.
After playing around in cPanel I finally got some action. Although I did set the cron script to 777, I will now be changing that for security as mentioned by MrPhil. I also had to set the Cron Job to run every hour for it to work, but its still not actually working.
I used the Cron Job feature in cPanel and selected Standard mode. I then entered the time accordingly.
My problem now is the Cron Job seems to be trying to execute comments in the php file.
This is what I received by email:
/home/USER/public_html/DIRECTORY/_cron/gold.php: line 1: ?php: No such file or directory
/home/USER/public_html/DIRECTORY/_cron/gold.php: line 2: syntax error near unexpected token `C'
/home/USER/public_html/DIRECTORY/_cron/gold.php: line 2: `/* (C) ABK-Soft Ltd., 2004-2006'
It never mentioned if the Cron Job has been executed or if it has failed, but I am assuming it has failed.
Here is the exact Cron Job I am trying to run:
<?php
/* (C) ABK-Soft Ltd., 2004-2006
IMPORTANT: This is a commercial software product
and any kind of using it must agree to the ABK-Soft
Ltd. license agreement.
It can be found at http://abk-soft.com/license.doc
This notice may not be removed from the source code. */
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "_include" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "main.php");
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "_include" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "options.php");
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "_include" . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "lib.php");
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "_include" . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "db.php");
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "_include" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "db.php");
error_reporting(2047);
ini_set("display_errors", 1);
DB::connect();
$subject = DB::result("SELECT subject FROM email_auto WHERE note='end_gold'");
$text = DB::result("SELECT text FROM email_auto WHERE note='end_gold'");
DB::query('SELECT * FROM user WHERE gold_days=1');
while ($row = DB::fetch_row()) {
$subject = str_replace("{title}", $g['main']['title'], $subject);
$text = str_replace("{title}", $g['main']['title'], $text);
$text = str_replace("{name}", $row['name'], $text);
send_mail($row['mail'], $g['main']['info_mail'], $subject, $text);
}
DB::execute("UPDATE user SET gold_days=(gold_days-1), last_visit=last_visit WHERE gold_days>0;");
DB::close();
This script is from a very popular and professional vendor, I have contacted them but they say the problem is with my host.
Any ideas or will I open a ticket?