PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5へのストリームをHTTPリクエストを開くことができませんfopen関数またはにfsockopen

With Apache/2.xx or Apache/2.2.x webserver, with PHP5 as the scripting module, a HTTP communication error may occur within the PHP scripts that are parsing and running via the web server. apache/2.xxまたはapache/2.2.xウェブサーバーには、 PHP5のスクリプトとしてモジュールの場合は、 HTTP通信エラーが発生するには、 PHPスクリプトを実行中の解析とは、ウェブサーバーを経由している。

The errors that generated by PHP include:のエラーが発生することによって生成さPHPの含める:

PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHPの警告: fopen ( http://www.example.com ) :ストリームのオープンに失敗しました: HTTPリクエストに失敗しました!
fsockopen(): unable to connect to …にfsockopen ( ) :できませんでしたに接続するには…
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents ( )の:ストリームのオープンに失敗しました: HTTPリクエストに失敗しました!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHPの警告:メイン( ) :オープンに失敗しました' http://www.example.com/index.html 'を封入…
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHPの警告:含まれて( / usr /ローカル/ index.phpを) :ストリームのオープンに失敗しました:そのようなファイルまたはディレクトリが…

To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file.問題を解決するには、 php.iniでallow_url_fopenを有効に確認して設定ファイルです。 The line should look like this:その行は次のようになります:

allow_url_fopen = On allow_url_fopen =上

Note: Depending on your system OS and configuration, the PHP.INI is located at various varied location, such as in Apache bin directory for Windows system or /usr/local/etc in FreeBSD Apache installation, if you don’t specify or point to PHP.INI in another directory.注:お使いのシステムに応じてOSや設定の場合は、 php.iniの様々な様々な場所に位置は、 Apacheのbinディレクトリのようにfor Windowsのシステムまたは/ usr /ローカル/等のFreeBSDのApacheのインストール、またはポイントを指定しない場合はするには、 php.iniを別のディレクトリにコピーします。

If the error still happen and the PHP scripts still unable to connect to remote external servers and thus unable to download updates or retrieve files, check the user_agent setting in PHP.ini.エラーが発生する場合は、まだできませんでした。起こるとは、 PHPスクリプトを外部に接続するには、リモートサーバ、および取得するための更新プログラムまたはファイルをダウンロードできませんでした、 php.iniの設定を確認してのuser_agentです。

By default php.ini set the user_agent to “PHP” which signifies that it’s the script that try to access the web server. php.iniの設定をデフォルトのuser_agentの" PHP "を意味することは、スクリプトでは、 Webサーバーにアクセスしようとします。 Some web servers will refuse and don’t allow script to access and receive the date from the server.拒否すると、いくつかのウェブサーバーは、スクリプトにアクセスして許可されていないの日付は、サーバーから受信します。 So, by setting the user_agent to that of a web browser, PHP will let the web server know which kind of web browser will receive the date, and thus able to open the HTTP connection stream.そのため、を設定して、ウェブブラウザのuser_agentして、 PHPはWebサーバーを知って、あなたはどんな種類のウェブブラウザを受け取るの日付、およびそのためのHTTP接続を開くことができましたストリームに出力します。

The user_agent can be set to any kind of browser strings, for example of Internet Explorer:ののuser_agentは、どんな種類のブラウザに設定して文字列を、例えばインターネットエクスプローラ:

user_agent=”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)”のuser_agent = " mozilla/4.0 (互換性; msie 6.0 ;のWindows NT 5.0 ) "

IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. 重要:あなたが読んで、機械翻訳ページで提供"現状有姿"を保証します。 Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible.とは異なり、人間の翻訳、機械翻訳の文法を理解していない、意味、構文、慣用句の自然言語は、このように頻繁に不正確な生産と低品質のテキストの上では誤解を招くとは理解し難いものです。 Thus, please refer toしたがって、参照してください。 original English articleオリジナルの英語記事索引 whenever possible.いつ可能です。

MDL blog postings now continue at今すぐブログ投稿を続けるmdl Tip and Trick ヒントとトリック , and readers are welcome to joinし、読者は歓迎に参加する My Digital Life Forums 私のデジタルライフフォーラム .です。


Leave a Reply残して返信

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント



Incoming Search Terms for the Article検索用語を受信するには

failed to open stream: HTTP request failed! ストリームのオープンに失敗しました: HTTPリクエストに失敗しました! - - failed to open stream: HTTP request failed ストリームのオープンに失敗しました: HTTPリクエストに失敗しました - - file_get_contents failed to open stream ストリームとfileのオープンに失敗しました - - fsockopen php にfsockopen PHPの - - fsockopen php.ini php.iniのにfsockopen - - enable fsockopen 有効にfsockopen - - "failed to open stream: HTTP request failed!" "ストリームのオープンに失敗しました: HTTPリクエストに失敗しました! " - - PHP enable fsockopen PHPの有効にfsockopen - - file_get_contents "failed to open stream" とfile "ストリームのオープンに失敗しました" - - fsockopen php5 PHP5のにfsockopen - - "failed to open stream" file_get_contents "ストリームのオープンに失敗しました"とfile - - fopen failed to open stream fopenストリームのオープンに失敗しました - - 'user_agent' in php.ini. 'のuser_agent ' php.iniのです。 - - apache fsockopen Apacheのにfsockopen - - fopen refuses to open external file fopenを拒否して外部ファイルを開きます - - enable fsockopen php PHPの有効にfsockopen - - fopen("http:// fopen (は" http:// - - failed to open stream: HTTP request failed! ストリームのオープンに失敗しました: HTTPリクエストに失敗しました! HTTP HTTPの - - fopen failed to open stream http request failed ストリームのオープンに失敗しましたfopen HTTPリクエストに失敗しました - - fsockopen() config http にfsockopen ( )の設定のHTTP - - fsockopen enable 有効にfsockopen - - php fsockopen php.ini php.iniのPHPのにfsockopen - - "failed to open stream" "http request failed" "ストリームのオープンに失敗しました" " HTTPリクエストに失敗しました" - - php open http request PHPのオープンHTTPリクエスト - - fopen HTTP request failed fopen HTTPリクエストに失敗しました - - php httpRequest PHPのhttp_request = - - failed to open stream: HTTP request failed! ストリームのオープンに失敗しました: HTTPリクエストに失敗しました! - - file_get_contents http request failed とfile HTTPリクエストに失敗しました - - fsockopen php access issue windows 2003 Windowsの2003年問題にfsockopen PHPのアクセス - - megaupload php script fsockopen megaupload PHPスクリプトにfsockopen - - php5 @fopen PHP5の@ fopen - - php fopen vista PHPのfopenビスタ - - fopen failed mozilla Mozillaのfopenに失敗しました - - fsockopen+php.ini+http request stream php.iniのにfsockopen + + HTTPリクエストのストリーム - - fsock php.ini php.iniのfsock - - php fopen failed to open stream: HTTP request failed! PHPのfopenストリームのオープンに失敗しました: HTTPリクエストに失敗しました! HTTP/1.0 HTTP/1.0の - - PHP HTTP request failed PHPのHTTPリクエストに失敗しました - - php 5 fopen failing PHP 5のfopen失敗 - - win2003 allow fsockopen win2003できるようにfsockopen - - wordpress php.ini fsockopen WordPressのphp.iniのにfsockopen - - file_get_contents( ): "failed to open stream:" HTTP request failed! file_get_contents ( )の中: "ストリームのオープンに失敗しました: " HTTPリクエストに失敗しました! - - file_get_contents enabled とfile有効になって - - fopen php5 PHP5のfopen - - fsockopen open site オープンサイトにfsockopen - - fsockopen open a site サイトをオープンするにfsockopen - - fsockopen php.ini php.iniのにfsockopen - - HTTP request local HTTPリクエストローカル - - php file_get_contents not working apache ApacheのPHPのとfileが機能しない - - php request like browser user_agent PHPのリクエストのようなブラウザのuser_agent - - php fsockopen and http PHPのにfsockopenとHTTP - -