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 私のデジタルライフフォーラム .です。
Related Articles関連記事
- Making phpBB2 working with PHP5 PHP5の作業をメーカーphpbb2
- NSIS Error and Cannot or Unable to Open and Install Setup Installer (Excerpt) 、 NSISエラーが発生したりすることはできませんし、インストールのセットアップインストーラを開くことができません(抜粋)
- PHP Parse Error: syntax error, unexpected $end PHPのパースエラー:構文エラーが発生すると、予期しない$エンド
- gmmktime Error in WordPress and MagpieRSS gmmktimeにエラーが発生WordPressのとmagpierss
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP MD5ハッシュ値を生成するための適切な方法パスワードをmd5sumを投与xcacheやPHP
- Aerielle Launches New i2i Stream Wireless Music-Sharing Device aerielle発射i2iストリームワイヤレス音楽を共有する新しいデバイス
- PHP Scripts open_basedir Restriction in Effect Error PHPスクリプトエラーが発生open_basedirの制限に効果
- Meaning of TVAnts Buffer Progress Bar Colorsバッファの進捗状況を示すバーの色の意味をテレビの蟻
- Unable to Delete Photo Folders写真のフォルダを削除できませんでした。
- Using PHP-MySQL Persistent Connections to Run WordPress Blogを使用してのPHP - MySQLの持続的接続を実行するのWordPress Blog






























