cron info sent a weird email
I got this email from cron info of my server.
"`client_errors' has different size in shared object, consider re-linking"
what is this ?
this cron job is just a simple email script
this is the script
include("../admin/connect.php");
require("../class.phpmailer.php");
$from = "Me@me.com";
$fromnam开发者_Python百科e = "Me";
$mail = new PHPMailer(true); //New instance, with exceptions enabled
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 587; // set the SMTP server port
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->Username = "********"; // SMTP server username
$mail->Password = "********"; // SMTP server password
$mail->SMTPSecure = "tls"; // sets the prefix to the server
$mail->IsSendmail(); // tell the class to use Sendmail
$mail->From = $from;
$mail->FromName = $fromname;
$mail->Subject = "Hi";
$edate = date("Y-m-d");
$query = "SELECT * FROM `set` WHERE expire = '$edate'";
$result = MYSQL_QUERY($query);
while ($row = mysql_fetch_array ($result))
{
$body .= "<pr>Hello<br /><br />";
$body .= "Hope everything is ok,<br />";
$text_body = "To view the message, please use an HTML compatible email viewer!";
$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->AddAddress($row['email']);
$mail->Send();
$mail->ClearAddresses();
}
thanks
Something you are running expects a variable (structure or array, probably) to have a particular size N. Unfortunately, the shared library providing the value of that variable has a different size M. The request to 're-link' is perhaps a little naïve; it probably means recompile and relink using the new headers, etc.
So, some program used in your script needs to be rebuilt.
In light of the amended question:
I think it could be a problem. One thing to worry about is whether the PHP that is run by cron has the correct environment - cron does not set very much environment. It could be executing one PHP but trying to load a library from another, or something weird like that.
My standard advice for running cron jobs is always to run a shell script, which sets the environment if necessary before running the 'real' task. This also makes it easier to debug.
{
...environment setting...
env # debug only
pwd # debug only
date # debug only
...exec the real program...
} >/tmp/log.$$ 2>&1
精彩评论