Hello and thanks for looking at this.
Cron Jobs didn't execute this morning because they send emails and I didn't get them. Running Centos 7 at GoDaddy.
Here's the cron command...
/usr/local/bin/ea-php56 /home/rbigroup/public_html/cron/cron-test.php >/dev/null 2>&1
When testing the script in the browser, works fine. However when I remove the MySql in the script, the Cron works fine.
I'm totally baffled an flustered. Any help is super appreciated! Thanks for your time!
Here's the php code...
<?php require $_SERVER['DOCUMENT_ROOT']."/Connections/connect.php"; ?><?php include "cron-recipients.php"; ?>
<?php
echo $_SERVER['DOCUMENT_ROOT'];
$date = date('Y-m-d',$date_start);
echo $date."<br>";
mysqli_select_db($db);
$insertSQL = sprintf("INSERT INTO test_table (text_field,`date_field`) VALUES ('Hello','$date')");
echo $insertSQL."<br>";
$Result1 = mysqli_query($db,$insertSQL) or die(mysqli_error($db));
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: noreply@rbirestaurantgroup.com' . "\r\n";
$subject = "Confirming Cron-Test Is Working on PPie Server";
$to = $RECIPIENT_SET1; //attach emails to the TO field
//$to = 'apsubmit@secureserver.net';
$message = '<html>
<head>
<title>Cron Report</title>
</head>
<body><h2>Cron Test</h2>
Your test works.
</body>
</html>';
mail($to, $subject, $message, $headers);
echo "Cron Tester Complete"."<br>";
echo $to;
?>