I have an odd issue
We are in the midst of moving our site from on-premise servers (PHP 5.3) to Amazon EC2 cloud (PHP 7.0), both running apache
I have a php function that calls file_get_contents, which i then decode json for into a variable to do some processing
$klein->respond('POST', '/tracker/[i:id]', function ($request, $response, $service, $app) {
$json = file_get_contents('test-url/eds.php?uid='.$request->param('id'));
$result = json_decode($json);
...
On premises, this function works fine, In the Ec2 instance however, I am receiving a 504 gateway error.
here is the oddity, this works fine on the EC2 instance if I substitute the url for the on-premise site...no 504 error occurs
$json = file_get_contents('on-premise/eds.php?uid='.$request->param('id'));;
I tried replacing the file_get_contents with curl, and also had my ini_set to allow_url_fopen, neither remidied the situation, I'm beginning to think something larger is at play here
any help is greatly appreciated