PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 No se puede abrir la solicitud HTTP Stream con fopen o fsockopen Funciones
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. Con Apache/2.xx o Apache/2.2.x web, con PHP5 como el módulo de secuencias de comandos, una comunicación HTTP error puede ocurrir dentro de los scripts PHP que sean y analizar el funcionamiento a través del servidor web.
The errors that generated by PHP include: Los errores que generan por PHP son:
PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHP Warning: fopen (http://www.example.com): no se puede abrir stream: HTTP solicitud no!
fsockopen(): unable to connect to … fsockopen (): no puedo conectarme con…
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents (): no se puede abrir stream: HTTP solicitud no!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHP Warning: main (): Error de apertura "http://www.example.com/index.html" para su inclusión…
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHP Warning: include (/ usr / local / index.php): no se puede abrir stream: No existe el archivo o directorio en…
To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. Para resolver el problema, asegúrese de que allow_url_fopen esté habilitado en php.ini archivo de configuración. The line should look like this: La línea debe ser similar a este:
allow_url_fopen = On allow_url_fopen = A
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: Dependiendo de su sistema OS y configuración, el php.ini está ubicado en diversos variada ubicación, como en Apache para directorio bin del sistema de Windows o / usr / local / etc en FreeBSD instalación de Apache, si no se especifica o punto a php.ini en otro directorio.
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. Si el error ocurra y el scripts PHP sigue sin poder conectarse a servidores remotos externos y, por tanto, no se puede descargar actualizaciones o recuperar los ficheros, comprobar los user_agent puesta en 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. Por defecto, php.ini user_agent el conjunto de "PHP" lo que significa que es el guión que intentan acceder al servidor web. Some web servers will refuse and don’t allow script to access and receive the date from the server. Algunos servidores web se negará y no permiten el acceso a la secuencia de comandos y recibir la fecha del 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. Así, mediante el establecimiento de la user_agent a la de un navegador web, PHP permitirá que el servidor web sabe que tipo de navegador web recibirá la fecha y, por tanto, capaz de abrir el flujo de conexión HTTP.
The user_agent can be set to any kind of browser strings, for example of Internet Explorer: El user_agent se puede ajustar a cualquier tipo de navegador de cadenas, por ejemplo de 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: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- Making phpBB2 working with PHP5 Hacer phpBB2 trabajar con PHP5
- PHP Parse Error: syntax error, unexpected $end PHP Parse error: error de sintaxis, $ final inesperado
- gmmktime Error in WordPress and MagpieRSS gmmktime Error en WordPress y MagpieRSS
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP La correcta manera de generar hash MD5 para XCache Contraseña Administración con md5sum o PHP
- PHP Scripts open_basedir Restriction in Effect Error Scripts PHP open_basedir restricción en efecto error
- Aerielle Launches New i2i Stream Wireless Music-Sharing Device Aerielle lanza un nuevo i2i arroyo de música inalámbrica de participación en el dispositivo
- Meaning of TVAnts Buffer Progress Bar Colors Significado de amortiguación TVAnts barra de progreso colores
- Unable to Delete Photo Folders No es posible eliminar las carpetas de fotos
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Uso de PHP-MySQL las conexiones persistentes a correr blog de WordPress
- Access and Stream Your Videos, Musics, Photos, TV and Other Medias Remotely with Orb Acceso y Stream tus vídeos, música, fotos, TV y Otros Medios de comunicación remota con Orb






