PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 удалось открыть запрос HTTP, Stream с 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. Чтобы решить проблему, чтобы allow_url_fopen включена в php.ini файл конфигурации. The line should look like this: Строка должна выглядеть следующим образом:

allow_url_fopen = On allow_url_fopen = on

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. Примечание: В зависимости от вашей системы и конфигурации ОС, находится php.ini на различных разнообразные места, как, например, в Apache бен каталог для системы 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 скрипты-прежнему не удается подключиться к удаленному внешних серверов и, следовательно, не могут загружать обновления и извлекать файлы, проверять user_agent настройки в php.ini.

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", которая означает, что сценарий, которые стараются получить доступ к веб-серверу. 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 позволит веб-серверу знать, какие веб-браузер будет получать дату, и, таким образом, может открыть HTTP соединение поток.

The user_agent can be set to any kind of browser strings, for example of Internet Explorer: User_agent можно установить в любой строки браузера, например Internet Explorer:

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 : This is a machine translated page which is provided "as is" without warranty. ВАЖНО: Это машина переведена страница, на которой предоставляется "как есть" без гарантий. Machine translation may be difficult to understand. Машинный перевод может быть трудным для понимания. Please refer to Обратитесь к original English article Английский оригинал статьи whenever possible. когда это возможно.

Share and contribute or get technical support and help at Доля и вклад или получить техническую поддержку и помощь в 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=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <-дель-datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Подписка без комментариев


Custom Search

New Articles Новые статьи

Incoming Search Terms for the Article Входящий Условия поиска для статьи

failed to open stream: HTTP request failed! не удалось открыть поток: HTTP запрос! - -- failed to open stream: HTTP request failed не удалось открыть поток: HTTP запрос - -- fsockopen php.ini fsockopen php.ini - -- enable fsockopen чтобы fsockopen - -- file_get_contents failed to open stream file_get_contents не удалось открыть поток - -- failed to open stream: HTTP request failed! не удалось открыть поток: HTTP запрос! - -- file_get_contents php.ini file_get_contents php.ini - -- php http request php запроса - -- how to enable fsockopen как включить fsockopen - -- fsockopen php php fsockopen - -- php.ini fsockopen php.ini fsockopen - -- fsockopen enable fsockopen позволить - -- fsockopen PHP5 fsockopen PHP5 - -- php httprequest php httprequest - -- file_get_contents failed to open stream: HTTP request failed! file_get_contents не удалось открыть поток: HTTP запрос! - -- php5 fopen php5 fopen - -- fopen http request failed fopen http запрос - -- php enable fsockopen php позволить fsockopen - -- php open stream php открыть поток - -- fopen failed to open stream: HTTP request failed! fopen не удалось открыть поток: HTTP запрос! - -- php.ini fsock php.ini fsock - -- httprequest php httprequest php - -- fopen php.ini fopen php.ini - -- failed to open stream: HTTP request failed! не удалось открыть поток: HTTP запрос! - -- failed to open stream HTTP request failed не удалось открыть поток HTTP запрос - -- "failed to open stream: HTTP request failed" "не удалось открыть поток: HTTP запрос" - -- failed to open stream: HTTP request failed! не удалось открыть поток: HTTP запрос! in в - -- fsockopen+php.ini fsockopen + php.ini - -- php.ini fopen php.ini fopen - -- fopen failed to open stream HTTP request failed fopen не удалось открыть поток HTTP запрос - -- fsockopen php ini php fsockopen ини - -- php5 fsockopen php5 fsockopen - -- php HTTP request failed php HTTP запрос - -- PHP open http stream PHP открытый поток http - -- fsockopen() enable fsockopen () позволило - -- fsockopen in php fsockopen в php - -- php file_get_contents HTTP request failed php file_get_contents HTTP запрос - -- failed to open stream file_get_contents не удалось открыть поток file_get_contents - -- "failed to open stream: HTTP request failed!" "не удалось открыть поток: HTTP запрос!" - -- enable fsockopen in php fsockopen, чтобы в php - -- fopen failed to open stream: HTTP request failed fopen не удалось открыть поток: HTTP запрос - -- php open http php открыть http - -- php fsockopen site index php fsockopen индекс сайта - -- file_get_contents php ini file_get_contents php ини - -- http request php запроса php - -- file_get_contents HTTP request failed! file_get_contents HTTP запрос! - -- php [function.fopen]: failed to open stream: HTTP request failed! php [function.fopen]: не удалось открыть поток: HTTP запрос! - -- file_get_contents failed open stream file_get_contents не открыть поток - -- enable file_get_contents чтобы file_get_contents - -- fsockopen php http fsockopen php http - --