エラーメッセージ
Caught Exception: Unable to establish connection to host mws.amazonservices.jp Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? |
このエラーは、Client.phpで定義されているMarketplaceWebServiceProducts_Clientクラスの_httpPost()メソッドで出力されています。
具体的には、_httpPost()メソッドのfsockopenで例外が発生しています。
if ($socket = @fsockopen($scheme . $url['host'], $port, $errno, $errstr, 10)) { |
理由は、phpの環境がSSLに対応できていないからです。
対処法はOSによって異なります。
Windowsの場合は、phpインストールフォルダに有るphp.iniを編集する必要があります。
変更前
;extension=php_openssl.dll |
↓
修正後
extension=php_openssl.dll |
Linux等、Unix系の場合は、インストール時のconfigureで”–with-openssl”オプションをつけます。
./configure --with-openssl ... |
関連記事
コメントを残す