PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 Neschopný až k Nechránený HTTP požiadavky Stream s fopen alebo fsockopen Funkcia
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. S Apache/2.xx alebo Apache/2.2.x webserver s PHP5 je skriptovací modul, HTTP komunikáciu chybe môže dôjsť v PHP skripty, ktoré sú analýzy a beží cez web server.
The errors that generated by PHP include: Chyby, ktoré vzniknú PHP patria:
PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! Warning: fopen (http://www.example.com): failed to open stream: HTTP request failed!
fsockopen(): unable to connect to … fsockopen (): Nedá sa pripojiť k ...
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents (): failed to open stream: HTTP request failed!
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 … Warning: include (/ usr / local / index.php): failed to open stream: Žiadny takýto súbor alebo adresár v ...
To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. Ak chcete vyriešiť problém, aby allow_url_fopen je povolená v konfiguračnom súbore php.ini. The line should look like this: Riadok by mal vyzerať takto:
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. Poznámka: V závislosti na systéme OS a konfigurácia php.ini sa nachádza v rôznych rôznych umiestnení, napríklad v adresári bin Apache pre systém Windows alebo / usr / local / etc vo FreeBSD inštaláciu Apache, ak nezmeníte ani bod na php.ini v inom adresári.
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. Ak sa chyba stále štát a PHP skripty stále nemôže pripojiť k vzdialeným externé servery a tak neschopný až na zavádzanie aktualizovať či sťahovanie súborov, či user_agent nastavenia v 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. V predvolenom nastavení php.ini user_agent na "PHP", ktorý znamená, že je skript, ktorý pokuse o prístup na webový server. Some web servers will refuse and don't allow script to access and receive the date from the server. Niektoré webové servery odmietne a neumožňujú skript pre prístup a prijímať dáta zo servera. 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. Takže nastavením user_agent ako u webového prehliadača, či bude PHP web server vedieť, aký druh internetového prehliadača dostane deň, a tak mohol otvoriť spojenie HTTP prúdu.
The user_agent can be set to any kind of browser strings, for example of Internet Explorer: User_agent možno nastaviť na akýkoľvek druh prehliadača reťazcov, napríklad 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 : The page is machine translated and provided "as is" without warranty. Upozornenie: stránka je stroje preložené a za predpokladu, "ako je" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Nájdete na original English article originál Anglicky artikl whenever possible. ak je to možné.
Related Articles Súvisiace články
- Request URL /server-status or 404 Page Not Found Apache Error URL požiadavky / server-status alebo 404 Page Not Found Rýchlo Dlh
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Spustenie Apache HTTPD v štychu Vďaka Delostrelectvo Nechránený alebo Nie Takýto mod_bwlimited, mod_log_bytes alebo mod_bandwidth Archív
- FreeBSD Apache HTTP Accept Filter Error Volňásek Rýchlo HTTP Prijať filtrom Dlh
- Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error Neschopný až k Nechránený Tvrdý alebo USB Bleskové svetlo Cesta s Windows Scripting Host nemôže nájsť súbor skriptu autorun.vbs Dlh
- cPanel Unable or Cannot Start or Restart POP3 Mail Service cPanel Neschopný či Delostrelectvo štarte alebo reštarte POP3 Mail Service
- Unable to Retrieve Channels Listing from TVants Servers Nepodarilo sa získať Kanále Výpis z TVAnts Servery
- Aerielle Launches New i2i Stream Wireless Music-Sharing Device Aerielle raketu Nový i2i Prúd Bezdrôtový Hudba-zdieľanie zariadení
- Unable to Connect to Internet in Virtual PC with NAT Shared Networking NAT on Windows XP Guest Nedá sa pripojiť k internetu vo Virtual PC s NAT Zdieľané Networking NAT v systéme Windows XP Guest
- Access and Stream Your Videos, Musics, Photos, TV and Other Medias Remotely with Orb Prístup a Prúd Tvoj video, Musics, Fotografie, televízia a ďalšie Medias Daleký s Orb
- How to Set VLC Player as Media Server to Stream Media Files in Digital Home Ako nastaviť VLC Media Player ako server pre streamovanie médií Súbory v digitálnu domácnosť










































March 28th, 2009 00:40 28.března 2009 00:40
It did not work for me… It didn'ti work for me ...
February 25th, 2009 15:05 25. februára 2009 15:05
Thank you a lot for info. Děkuji moc za info.
Things with Veci sa
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)"
helped pomohol
November 30th, 2008 03:22 30.novembra 2008 03:22
I solved the problem too. I solved the problem too. Default parameter on Sme Server 7.3 allow_url_fopen = Off .. Predvolené parameter Sme Server 7.3 allow_url_fopen = Off .. Thank you Ďakujeme vám
November 14th, 2008 20:51 14.listopadu 2008 20:51
Or you can use curl as described here: Alebo môžete využiť stočit, ako je popísané tu: http://toic.org/2008/10/08/fetching-remote-content-with-curl/#more-52 http://toic.org/2008/10/08/fetching-remote-content-with-curl/ # more-52
October 6th, 2008 05:33 6.októbra 2008 05:33
thank you, I solved my problem. Ďakujem, som vyriešil môj problém.
by default, on openbsd allow_url_fopen = off v predvolenom nastavení na openbsd allow_url_fopen = off