Error in amazon AWS PHP sdk after upgrading PHP to 5.6.40

0

I have a script that recovers info about EC2 instances. after upgrading PHP (to 5.6.40 x86) this script stopped working. I need to launch this script via an HTTP request

Windows Server 2008 with IIS 7.5

  • if I launch my script within IIS (so with fast-cgi php) I've got a server error 500 but the same script, in the same position, if I launch it via CLI runs fine
  • If I comment the extension=php_curl.dll the script runs fine (accordingly to Amazon in this case "the SDK uses the PHP stream wrapper")

I need curl for other things and scripts so commenting this line is not an option.

  • my other scripts, via php-fast-cgi, that are not using aws-sdk but use curl work fine

  • aws-sdk is the latest version and the compatibility-test.php tell me that I'm ok

my test.php file is this

<?php

date_default_timezone_set('UTC') or die("errore");

require '/inc/aws/aws-autoloader.php';

$client = new Aws\Ec2\Ec2Client(array(
    'region' => 'eu-west-1',
    'version' => 'latest'
    ));



$instances = $client->describeInstances(array(
            'Filters' => array(
                      array(
                    'Name' => 'ip-address',
                    'Values' => array('x.x.x.x'),
                          ),
                         )  
            ));

var_dump($instances);

the windows event viewer show this error

Faulting application name: php-cgi.exe, version: 5.6.40.0, time stamp: 0x5c36803f
Faulting module name: php5ts.dll, version: 5.6.40.0, time stamp: 0x5c36852b
Exception code: 0xc0000005
Fault offset: 0x00384b8e
Faulting process id: 0x1090
Faulting application start time: 0x01d530d631693d95
Faulting application path: C:\PHP\php-cgi.exe
Faulting module path: C:\PHP\php5ts.dll
Report Id: 700d7e85-9cc9-11e9-aa02-0685ffcd94c0
php
amazon-web-services
php-curl
asked on Stack Overflow Jul 2, 2019 by Phil • edited Jul 2, 2019 by Sayed Mohd Ali

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0