PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 não foi possível abrir a solicitação HTTP Stream fopen ou fsockopen Funções
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. Com Apache/2.xx ou Apache/2.2.x webserver, com PHP5 como a scripting módulo, uma comunicação HTTP erro pode ocorrer dentro do PHP scripts que são analisar e executar através do servidor web.
The errors that generated by PHP include: Os erros que geraram a PHP incluem:
PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHP Warning: fopen (http://www.example.com): Falha ao abrir stream: HTTP pedido falhou!
fsockopen(): unable to connect to … fsockopen (): incapaz de se conectar a…
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents (): Falha ao abrir stream: HTTP pedido falhou!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHP Warning: main (): Falha na abertura dos http://www.example.com/index.html "para a inclusão…
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHP Warning: incluir (/ usr / local / index.php): Falha ao abrir stream: Arquivo ou diretório não encontrado em…
To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. Para resolver o problema, garantir que allow_url_fopen está ativado no php.ini arquivo de configuração. The line should look like this: A linha deve ser semelhante a este:
allow_url_fopen = On Em 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. Nota: Dependendo do seu sistema OS e configuração, o php.ini está localizado em vários variado local, tal como o Apache no diretório bin para o sistema Windows ou / usr / local / etc no FreeBSD Apache instalação, se você não especificar ou ponto a php.ini em outro diretório.
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. Se o erro continuar a acontecer e PHP scripts ainda incapaz de se conectar a servidores remotos externos e, portanto, incapaz de transferir actualizações ou recuperar arquivos, verifique a configuração do 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. Por padrão php.ini user_agent para definir o "PHP", que significa que ele é o script que tentam acessar o servidor web. Some web servers will refuse and don’t allow script to access and receive the date from the server. Alguns servidores da Web irá recusar e não permitir que o script para acessar e receber a data a partir do servidor. 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. Assim, através da fixação das user_agent ao de um navegador da Web, o PHP deixará o servidor web saber que tipo de navegador irá receber a data e, portanto, capaz de abrir a conexão HTTP riacho.
The user_agent can be set to any kind of browser strings, for example of Internet Explorer: O user_agent pode ser configurado para qualquer tipo de navegador strings, por exemplo, do Internet Explorer:
user_agent=”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)” user_agent = "Mozilla/4.0 (compatible; MSIE 6,0; Windows NT 5.0)"
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- Making phpBB2 working with PHP5 Tornar phpBB2 trabalhar com PHP5
- PHP Parse Error: syntax error, unexpected $end PHP Parse Error: syntax error, inesperada $ final
- gmmktime Error in WordPress and MagpieRSS gmmktime Erro em WordPress e MagpieRSS
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP A boa forma de gerar hash MD5 para XCache Administração Senha com md5sum ou PHP
- PHP Scripts open_basedir Restriction in Effect Error PHP scripts open_basedir restrição em vigor erro
- Aerielle Launches New i2i Stream Wireless Music-Sharing Device Aerielle lança nova música i2i fluxo de partilha de dispositivo sem fio
- Meaning of TVAnts Buffer Progress Bar Colors Significado das cores barra de progresso TVAnts tampão
- Unable to Delete Photo Folders Não foi possível excluir a foto pastas
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Usando o MySQL-PHP conexões persistentes para correr WordPress blog
- Access and Stream Your Videos, Musics, Photos, TV and Other Medias Remotely with Orb Acesso e Stream seus vídeos, Musics, Fotos, TV e Outras Medias remotamente com o Orb















