PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 Impossibile aprire Richiesta HTTP Stream con fopen o fsockopen Funzioni

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 come il modulo di scripting, un errore di comunicazione HTTP possono verificarsi all'interno di script PHP che sono l'analisi e la gestione tramite il server web.

The errors that generated by PHP include: Gli errori che hanno generato dal PHP includono:

PHP Warning: fopen(http://www.example.com): failed to open stream: HTTP request failed! PHP Warning: fopen (http://www.example.com): non è riuscito ad aprire il flusso: richiesta HTTP non riuscita!
fsockopen(): unable to connect to … fsockopen (): Impossibile connettersi al ...
file_get_contents(): failed to open stream: HTTP request failed! file_get_contents (): non è riuscito ad aprire il flusso: richiesta HTTP non riuscita!
PHP Warning: main(): Failed opening ‘http://www.example.com/index.html’ for inclusion … PHP Warning: main (): Failed apertura 'http://www.example.com/index.html' per l'inclusione ...
PHP Warning: include(/usr/local/index.php): failed to open stream: No such file or directory in … PHP Warning: include (/ usr / local / index.php): non è riuscito ad aprire il flusso: No such file o la directory in ...

To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. Per risolvere il problema, assicurarsi che allow_url_fopen è abilitato in php.ini file di configurazione. The line should look like this: La linea dovrebbe essere simile a questo:

allow_url_fopen = On Il 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: A seconda del vostro sistema OS e configurazione, php.ini si trova a vari varie località, come in Apache directory bin di sistema di Windows o / usr / local / etc in FreeBSD Apache installazione, se non si specifica o il punto di php.ini in un'altra directory.

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 l'errore ancora succedere e la script PHP ancora in grado di connettersi al server remoto esterno e quindi in grado di scaricare gli aggiornamenti o recuperare i file, controllare l'impostazione user_agent in 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. Per impostazione predefinita impostare il php.ini user_agent a "PHP", che significa che è lo script che tentano di accedere al server web. Some web servers will refuse and don’t allow script to access and receive the date from the server. Alcuni server web si rifiutano e non consentono di script di accesso e di ricevere la data dal 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. Quindi, impostando la user_agent a quella di un browser web, PHP lasciare che il server web sapere che tipo di browser web riceverà la data, e quindi in grado di aprire il flusso di connessione HTTP.

The user_agent can be set to any kind of browser strings, for example of Internet Explorer: Il user_agent può essere impostato per ogni tipo di browser stringhe, ad esempio, di 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: Questa è una macchina tradotto pagina che è fornito "così come sono" senza garanzia. Machine translation may be difficult to understand. La traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale in inglese whenever possible. ogniqualvolta ciò sia possibile.

Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e contribuire a My Digital Life Forums La mia vita digitale forum .



One Response to “PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions” Una risposta a "PHP 5 Impossibile aprire Richiesta HTTP Stream con fopen o fsockopen Funzioni"

  1. totoro Totoro
    October 6th, 2008 05:33 6a ottobre, 2008 05:33
    1

    thank you, I solved my problem. la ringrazio, ho risolto il mio problema.
    by default, on openbsd allow_url_fopen = off Per impostazione predefinita, su OpenBSD allow_url_fopen = off

Leave a Reply Lascia un Commento

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> È possibile utilizzare questi tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Iscriviti senza commentare


Custom Search

New Articles Nuovi articoli

Incoming Search Terms for the Article Cerca in entrata Termini per l'articolo

failed to open stream: HTTP request failed! non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- fsockopen php.ini fsockopen php.ini - -- failed to open stream: HTTP request failed non è riuscito ad aprire il flusso: richiesta HTTP non riuscita - -- enable fsockopen consentire fsockopen - -- file_get_contents failed to open stream file_get_contents non è riuscito ad aprire il flusso - -- fsockopen php5 fsockopen php5 - -- file_get_contents php.ini file_get_contents php.ini - -- php HttpRequest php HttpRequest - -- failed to open stream: HTTP request failed! non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- httprequest php httprequest php - -- php open stream php aprire il flusso - -- php.ini fsockopen php.ini fsockopen - -- fsockopen php fsockopen php - -- failed to open stream: HTTP request failed! non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! in in - -- enable file_get_contents consentire file_get_contents - -- php5 fopen php5 fopen - -- fsockopen() php.ini fsockopen () php.ini - -- file_get_contents failed to open stream: HTTP request failed! file_get_contents non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- php.ini user_agent php.ini user_agent - -- php http request php richiesta HTTP - -- php5 http request php5 richiesta HTTP - -- file_get_contents HTTP request failed file_get_contents richiesta HTTP non riuscita - -- fopen failed to open stream: HTTP request failed fopen non è riuscito ad aprire il flusso: richiesta HTTP non riuscita - -- php fsockopen php.ini php fsockopen php.ini - -- fsockopen in php fsockopen in PHP - -- http request php php richiesta HTTP - -- php enable file_get_contents php consentire file_get_contents - -- php enable fsockopen php consentire fsockopen - -- fopen HTTP request failed fopen richiesta HTTP non riuscita - -- php ini fsockopen(): on php ini fsockopen (): su - -- apache fsockopen apache fsockopen - -- warning fopen(http:// failed to open stream no such avvertimento fopen (http:// non è riuscito ad aprire il flusso assenza di tali - -- apache fopen apache fopen - -- det php ini to allow fsockopen Det php ini per consentire fsockopen - -- php.ini fopen php.ini fopen - -- enable fsockopen php consentire fsockopen php - -- php open http php aperto http - -- fsockopen enable fsockopen consentire - -- php5 failed to open stream: HTTP request failed! PHP5 non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- php5 file_get_contents failed to open stream: HTTP request failed! php5 file_get_contents non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- php5 httprequest php5 httprequest - -- file_get_contents "failed to open stream" file_get_contents "non è riuscito ad aprire il flusso" - -- php fsockopen php fsockopen - -- php fsocketopen http php fsocketopen http - -- failed to open stream: HTTP request failed! non è riuscito ad aprire il flusso: richiesta HTTP non riuscita! - -- enable fsockopen() consentire fsockopen () - -- how to enable fsockopen() come attivare fsockopen () - -- how to enable file_get_contents come attivare file_get_contents - -- http request in php richiesta HTTP in php - -- unable to open https Impossibile aprire la pagina https - --