[PHP-users 22195]Re: file_get_contentsによるhttpsアクセスが失敗する

Hanzo hayato @ hayato.atso-net.jp
2004年 6月 13日 (日) 18:06:45 JST


早速のご回答ありがとうございます。


>>Google で検索してみると、http://www.manucorp.com/archives/php-bugs/200405/msg00000.php
>>という記述も発見できました。
>
>その記述を読んで辿っていくと、対策は、
>
>(1)PHP5なら解決されているからPHP5を使う
>(2)PHP4をOpenSSLサポート付きで静的コンパイルする
> (つまりphp_openssl.dllの後付けではダメということ)
>(3)http://ftp.proventum.net/pub/php/win32/misc/openssl/
> からphp4ts.dllを持っていってそれを使う
>
>のどれかですが、(3)のURLはアクセス不可能な様子なので
>できるのは(1)か(2)ですね。
>

PHP5なら動くと書いてあったので、PHP5を使おうとしましたが、
install.txt に
  Apache 2.0.x  (experimental)
って書いてあったのでビビッて使う勇気がありません。
でも、PHP5の方が解決が早そうなので勇気を出して使ってみようと思います。


>下記はざっくり直訳。
>
>
>http://www.manucorp.com/archives/php-bugs/200405/msg00000.php
>
>>It seems that HTTPS wrapper doesn't work under Windows.
>どうやらHTTPSラッパーがWindowsではうまく動かない。
>
>>In PHP4 the https:// (and ftps://) wrapper is ONLY enabled when OpenSSL
>>support is compiled in STATICLY.  This issue has been resolved in PHP5
>>such that OpenSSL can be used in either mode successfully.
>PHP4(訳注:のWindows版)での https:// (と ftps://)のラッパーが
>有効になるのは、OpenSSLサポートを静的コンパイルしたときだけだ。
>この問題は、PHP5では解決されていてどちらのモードもうまく行く。
>
>>Take a look at http://www.php.net/wrappers (especially user comments)
>>for an UNsupported PHP4 workaround.
>これ見て。http://www.php.net/wrappers (特にユーザコメントの部分)に、
>PHP4での非公式な回避策がある。
>
>

すみません。 見落としておりました。


>http://www.php.net/wrappers
>
>>To get the https wrapper working on Windows, you need to replace 
>>your php4ts.dll with the one provided at 
>>http://ftp.proventum.net/pub/php/win32/misc/openssl/. This is instead 
>>of using the php_openssl.dll, so be sure to comment this extension in 
>>your php.ini. 
>httpsラッパーをWindowsでうまく動かすためには、php4ts.dllを
>http://ftp.proventum.net/pub/php/win32/misc/openssl/ で供給されている
>ものに置き換えろ。これはphp_openssl.dllを使うことの替わりになるから、
>php.iniのこのエクステンション(訳注:php_openssl.dll)の設定はコメント
>にしろ。
>

宇野さんからのご指摘どおりアクセスできませんでした。
となると、WindowsからではPHP5という選択肢が妥当という事ですね。


ありがとうございました。

-----------------------------------
Hanzo





PHP-users メーリングリストの案内