[Sat Apr 25 04:18:46.660552 2015] [fastcgi:error] [pid 11271:tid 140464355243776] [client 95.87.236.146:63037] FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi-domain.cc" aborted: idle timeout (30 sec), referer: http://domain.cc/login/restore_session.php?redirect=yes
[Sat Apr 25 04:18:46.660673 2015] [fastcgi:error] [pid 11271:tid 140464355243776] [client 95.87.236.146:63037] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi-domain.cc", referer: http://domain.cc/login/restore_session.php?redirect=yes
I am getting these errors in my error.log file. This happens when I try to send an email with the mail() function:
$to = $ticket->email;
$subject = "X Support";
$message = "We have just answered your support ticket! Here is our message: \n\n-------------\n\n" . $text . "\n\n-------------\n\nIf you wish to reply, please visit http://domain.cc/support.php";
$headers = "From: [email protected]\r\n" .
"Reply-To: [email protected]\r\n" .
"X-Mailer: PHP/" . phpversion() . "\r\n";
$headers .= "CC: [email protected]\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$result = mail($to, $subject, $message, $headers);
I'm calling this code with AJAX and as a result when I click "Send Reply", the page just hangs and I get 500 error as a response after 30 seconds. The weird thing is that this code used to work fine for a few months.
EDIT: I forgot to mention - the emails get delivered anyway.
\r\n
afterphpversion()
. But I don't think that should cause an error, it just won't do the CC.