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

UNO Shintaro uno @ venus.dti.ne.jp
2004年 6月 13日 (日) 17:23:31 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)ですね。

下記はざっくり直訳。


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)の設定はコメント
にしろ。

-- 
UNO Shintaro, 宇野 信太郎
mailto:uno @ venus.dti.ne.jp
http://www.venus.dti.ne.jp/~uno/


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