PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 Unable to open HTTP-Request-Stream mit fopen oder fsockopen Funktionen
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. Mit Apache/2.xx oder Apache/2.2.x Webserver mit PHP5 als Scripting-Modul, ein HTTP-Kommunikation Fehler kann auftreten, innerhalb der PHP-Skripte, die Parsen und läuft über den Web-Server.
The errors that generated by PHP include: Die Fehler, die durch php include:
PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHP Warning: fopen (http://www.example.com): failed to open stream: HTTP-Anforderung fehlgeschlagen!
fsockopen(): unable to connect to … fsockopen (): Unable to connect to…
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents (): failed to open stream: HTTP-Anforderung fehlgeschlagen!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHP Warning: main (): Failed opening 'http://www.example.com/index.html' for inclusion…
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHP Warning: include (/ usr / local / index.php): failed to open stream: Datei oder das Verzeichnis auf…
To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. Um das Problem zu beheben, sicherzustellen, dass allow_url_fopen aktiviert ist in der php.ini Konfigurationsdatei. The line should look like this: Die Zeile sollte so aussehen:
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. Hinweis: Abhängig von Ihrem Betriebssystem und System-Konfiguration, die php.ini befindet sich in verschiedenen abwechslungsreichen Lage, wie in Apache bin-Verzeichnis für Windows-System oder / usr / local / etc in FreeBSD Apache-Installation, wenn Sie nicht angeben oder Nummer auf php.ini in einem anderen Verzeichnis.
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. Wenn der Fehler immer noch passieren, und die PHP-Skripte noch nicht in der Lage, eine Verbindung zu externen Remote-Servern und somit nicht in der Lage, Updates herunterzuladen oder Abrufen von Dateien, aktivieren Sie das Kontrollkästchen user_agent Einstellung in der 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. Standardmäßig php.ini die user_agent "PHP" das bedeutet, dass es das Skript, die versuchen den Zugang zum Web-Server. Some web servers will refuse and don’t allow script to access and receive the date from the server. Einige Web-Server verweigern und nicht erlauben es Skripts für den Zugriff auf und erhalten das Datum, ab dem 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. Also, indem Sie die user_agent, der einen Web-Browser, PHP lässt der Webserver wissen, welche Art von Web-Browser erhalten das Datum, und damit öffnen können die HTTP-Verbindung Stream.
The user_agent can be set to any kind of browser strings, for example of Internet Explorer: Die user_agent kann so eingestellt werden, dass jede Art von Browser-Strings, zum Beispiel der 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. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.
Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren .
Related Articles Verwandte Artikel
- Making phpBB2 working with PHP5 Making phpBB2 Arbeit mit PHP5
- PHP Parse Error: syntax error, unexpected $end PHP Parse error: syntax error, unexpected $ end
- gmmktime Error in WordPress and MagpieRSS gmmktime Fehler in WordPress und magpieRSS
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP Richtige Art und Weise zu erzeugen MD5-Hash für XCache Administration Passwort mit md5sum oder PHP
- PHP Scripts open_basedir Restriction in Effect Error PHP-Skripte open_basedir Beschränkung in der Tat Fehler
- Aerielle Launches New i2i Stream Wireless Music-Sharing Device Aerielle startet neue i2i-Stream Wireless Music-Sharing-Gerät
- Meaning of TVAnts Buffer Progress Bar Colors Meaning of TVANTS Puffer Fortschrittsbalken Farben
- Unable to Delete Photo Folders Unable to delete Foto-Ordner
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Die Verwendung von PHP-MySQL-persistente Verbindungen zu laufen WordPress Blog
- Access and Stream Your Videos, Musics, Photos, TV and Other Medias Remotely with Orb Access und Streaming von Videos, Musik, Fotos, TV und andere Medien der Ferne mit Orb








