We just moved to a new server to get tls 1.2. New server required php 5.6. For the most part my code works. A couple exceptions. I have two SOAP API processes from different vendors. One works fine, the other returns this:
Error: A847E54F5AEA4E798rt0.c.ie.o5DF59@4p7098Fs1lFf4v892c4m returned no data
The middle section of this is a token from the API which is used to catch the stream of data in the response. Problem is after receiving the token, the rest of the response is empty. Here is the relevant code which is based on this Five9's API: How to pull reports using SOAP API and Basic Authentication
$runReportResult = $client->runReport($runReportParam);
if(isset($runReportResult->return)){
$runReportData = $runReportResult->return;
$isReportRunningParam["identifier"] = $runReportData;
$isReportRunningParam["timeout"] = 10;
$isReportRunningResult = $client->isReportRunning($isReportRunningParam);
if(empty($isReportRunningResult->return)){
$getReportResultParam["identifier"] = $runReportData;
$getReportResult = $client->getReportResult($getReportResultParam);
if(isset($getReportResult->return->records)){
$getReportResultData = $getReportResult->return->records;
// data processing stuff removed for clarity
} else {
echo "Error: " . $runReportData . " returned no data";
}
} else {
echo "Error: " . $runReportData . " exceeded the report runtime limit";
}
} else {
echo "Error: " . $runReportParam["reportName"] . " wasn't found";
}
This line is getting consistently thrown on the new server.
echo "Error: " . $runReportData . " returned no data";
$runReportData is the token value which changes, so I am getting a response, but the real data is not making it. It has to be a server issue of some sort, just need a little help tracking it down.
The answer is maddening and leads to another question.
The server is set to Chicago time. The php script is using UTC as revealed with the following:
echo date('Y-m-d H:i:s', time());
so in effect I was asking for a report in the future when no data was available.
New question, why does php use UTC and not server time? In the ini file it was set to UTC!
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "UCT"
Hope this helps someone save some time someday!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With