I'm having an issue where my php function works when I call it from the server's command line, but not on the web page. It also works on the web page when I have it hosted locally through WAMP.
Any ideas what might be the issue?
function getCFTemplateSummary($CFUrl){
//init client
$client = new CloudFormationClient(array(
'profile' => 'default',
'region' => 'us-east-1',
'version' => '2010-05-15',
'http' => [ 'verify' => false ]
));
try {
$result = $client->getTemplateSummary(['TemplateURL' => $CFUrl]);
}catch(\Aws\CloudFormation\Exception\CloudFormationException $e){
echo $e->getMessage();
}catch(\Aws\Exception\AwsException $e){
echo $e->getMessage();
}
echo "<pre>";
print_r($result);
echo "inside the function";
echo "</pre>";
return $result;
}
I was able to trace down the issue to this by trial and error commenting ...but not sure how to proceed debugging as I don't see any error messages.
$result = $client->getTemplateSummary(['TemplateURL' => $CFUrl]);