SearchSearch   

Not the common "failed to open stream: HTTP request failed..

 
   Webmaster Forums (Home) -> PHP RSS
Next:  Continuous Form  
Author Message
xieliwei

External


Since: Aug 10, 2007
Posts: 4



(Msg. 1) Posted: Fri Aug 10, 2007 3:12 pm
Post subject: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: comp>lang>php (more info?)

I have a freshly installed openSuSe 10.2 with PHP4 from
http://download.opensuse.org/repositories/home:/michal-m:/php4/openSUSE_10.2/
(openSuSe abandoned PHP4 since version 10, but I have customers who
need php4 support)

The version strings are as follows:
# uname -a
Linux server2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
i686 athlon i386 GNU/Linux

# php -v
PHP 4.4.0 (cli) (built: Jun 1 2007 08:43:26)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

# httpd2 -v
Server version: Apache/2.2.3
Server built: Nov 25 2006 18:25:39

The problem here is that URL fopen does not seem to be open, despite
allow_url_fopen set as On in php.ini and phpinfo() reflecting it.

A simple fopen("http://www.example.com", r) returns the error "failed
to open stream: HTTP request failed!" in BOTH PHP-in-apache and PHP-
cli.

I have checked my network configuration, nameservers and gateway
settings are set up properly, I can also ping and visit the URL i'm
trying to open.

Been looking around for a week now, seen no solution, unless it
slipped by me.
Back to top
Rik

External


Since: Aug 08, 2006
Posts: 876



(Msg. 2) Posted: Fri Aug 10, 2007 6:23 pm
Post subject: Re: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: per prev. post (more info?)

On Fri, 10 Aug 2007 17:12:57 +0200, <xieliwei.DeleteThis@gmail.com> wrote:

> I have a freshly installed openSuSe 10.2 with PHP4 from
> http://download.opensuse.org/repositories/home:/michal-m:/php4/openSUSE_10.2/
> (openSuSe abandoned PHP4 since version 10, but I have customers who
> need php4 support)
>
> The version strings are as follows:
> # uname -a
> Linux server2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
> i686 athlon i386 GNU/Linux
>
> # php -v
> PHP 4.4.0 (cli) (built: Jun 1 2007 08:43:26)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> # httpd2 -v
> Server version: Apache/2.2.3
> Server built: Nov 25 2006 18:25:39
>
> The problem here is that URL fopen does not seem to be open, despite
> allow_url_fopen set as On in php.ini and phpinfo() reflecting it.
>
> A simple fopen("http://www.example.com", r) returns the error "failed
> to open stream: HTTP request failed!" in BOTH PHP-in-apache and PHP-
> cli.


Hmmmz, have you tried an fsockopen() instead of an fopen(), and if so,
does that give the same problems or not?
--
Rik Wasmus
Back to top
xieliwei

External


Since: Aug 10, 2007
Posts: 4



(Msg. 3) Posted: Sat Aug 11, 2007 3:43 pm
Post subject: Re: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: per prev. post (more info?)

On Aug 11, 12:23 am, Rik <luiheidsgoe....DeleteThis@hotmail.com> wrote:
> On Fri, 10 Aug 2007 17:12:57 +0200, <xieli....DeleteThis@gmail.com> wrote:
> > I have a freshly installed openSuSe 10.2 with PHP4 from
> >http://download.opensuse.org/repositories/home:/michal-m:/php4/openSU...
> > (openSuSe abandoned PHP4 since version 10, but I have customers who
> > need php4 support)
>
> > The version strings are as follows:
> > # uname -a
> > Linux server2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
> > i686 athlon i386 GNU/Linux
>
> > # php -v
> > PHP 4.4.0 (cli) (built: Jun 1 2007 08:43:26)
> > Copyright (c) 1997-2004 The PHP Group
> > Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> > # httpd2 -v
> > Server version: Apache/2.2.3
> > Server built: Nov 25 2006 18:25:39
>
> > The problem here is that URL fopen does not seem to be open, despite
> > allow_url_fopen set as On in php.ini and phpinfo() reflecting it.
>
> > A simple fopen("http://www.example.com", r) returns the error "failed
> > to open stream: HTTP request failed!" in BOTH PHP-in-apache and PHP-
> > cli.
>
> Hmmmz, have you tried an fsockopen() instead of an fopen(), and if so,
> does that give the same problems or not?
> --
> Rik Wasmus

I currently have some other problems on the server, so it isn't
convenient to test it. However, if I remember correctly, that didn't
work either.
Back to top
xieliwei

External


Since: Aug 10, 2007
Posts: 4



(Msg. 4) Posted: Sun Aug 12, 2007 12:59 am
Post subject: Re: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: per prev. post (more info?)

On Aug 11, 11:43 pm, xieli....DeleteThis@gmail.com wrote:
> On Aug 11, 12:23 am, Rik <luiheidsgoe....DeleteThis@hotmail.com> wrote:
>
>
>
> > On Fri, 10 Aug 2007 17:12:57 +0200, <xieli....DeleteThis@gmail.com> wrote:
> > > I have a freshly installed openSuSe 10.2 with PHP4 from
> > >http://download.opensuse.org/repositories/home:/michal-m:/php4/openSU...
> > > (openSuSe abandoned PHP4 since version 10, but I have customers who
> > > need php4 support)
>
> > > The version strings are as follows:
> > > # uname -a
> > > Linux server2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
> > > i686 athlon i386 GNU/Linux
>
> > > # php -v
> > > PHP 4.4.0 (cli) (built: Jun 1 2007 08:43:26)
> > > Copyright (c) 1997-2004 The PHP Group
> > > Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> > > # httpd2 -v
> > > Server version: Apache/2.2.3
> > > Server built: Nov 25 2006 18:25:39
>
> > > The problem here is that URL fopen does not seem to be open, despite
> > > allow_url_fopen set as On in php.ini and phpinfo() reflecting it.
>
> > > A simple fopen("http://www.example.com", r) returns the error "failed
> > > to open stream: HTTP request failed!" in BOTH PHP-in-apache and PHP-
> > > cli.
>
> > Hmmmz, have you tried an fsockopen() instead of an fopen(), and if so,
> > does that give the same problems or not?
> > --
> > Rik Wasmus
>
> I currently have some other problems on the server, so it isn't
> convenient to test it. However, if I remember correctly, that didn't
> work either.

Whoops, guess I was wrong. fsockopen() works well, so I guess my HTTP
wrapper is damaged or something?
Back to top
xieliwei

External


Since: Aug 10, 2007
Posts: 4



(Msg. 5) Posted: Wed Aug 15, 2007 11:33 am
Post subject: Re: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: per prev. post (more info?)

On Aug 12, 3:59 pm, xieli....TakeThisOut@gmail.com wrote:
> On Aug 11, 11:43 pm, xieli....TakeThisOut@gmail.com wrote:
>
>
>
> > On Aug 11, 12:23 am, Rik <luiheidsgoe....TakeThisOut@hotmail.com> wrote:
>
> > > On Fri, 10 Aug 2007 17:12:57 +0200, <xieli....TakeThisOut@gmail.com> wrote:
> > > > I have a freshly installed openSuSe 10.2 with PHP4 from
> > > >http://download.opensuse.org/repositories/home:/michal-m:/php4/openSU...
> > > > (openSuSe abandoned PHP4 since version 10, but I have customers who
> > > > need php4 support)
>
> > > > The version strings are as follows:
> > > > # uname -a
> > > > Linux server2 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
> > > > i686 athlon i386 GNU/Linux
>
> > > > # php -v
> > > > PHP 4.4.0 (cli) (built: Jun 1 2007 08:43:26)
> > > > Copyright (c) 1997-2004 The PHP Group
> > > > Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> > > > # httpd2 -v
> > > > Server version: Apache/2.2.3
> > > > Server built: Nov 25 2006 18:25:39
>
> > > > The problem here is that URL fopen does not seem to be open, despite
> > > > allow_url_fopen set as On in php.ini and phpinfo() reflecting it.
>
> > > > A simple fopen("http://www.example.com", r) returns the error "failed
> > > > to open stream: HTTP request failed!" in BOTH PHP-in-apache and PHP-
> > > > cli.
>
> > > Hmmmz, have you tried an fsockopen() instead of an fopen(), and if so,
> > > does that give the same problems or not?
> > > --
> > > Rik Wasmus
>
> > I currently have some other problems on the server, so it isn't
> > convenient to test it. However, if I remember correctly, that didn't
> > work either.
>
> Whoops, guess I was wrong. fsockopen() works well, so I guess my HTTP
> wrapper is damaged or something?

Sorry to bump, but does anyone have a solution?
Back to top
Rik

External


Since: Aug 08, 2006
Posts: 876



(Msg. 6) Posted: Wed Aug 15, 2007 4:13 pm
Post subject: Re: Not the common "failed to open stream: HTTP request failed!" problem
Archived from groups: per prev. post (more info?)

On Wed, 15 Aug 2007 13:33:16 +0200, <xieliwei RemoveThis @gmail.com> wrote:
> On Aug 12, 3:59 pm, xieli... RemoveThis @gmail.com wrote:
>> On Aug 11, 11:43 pm, xieli... RemoveThis @gmail.com wrote:
>> > On Aug 11, 12:23 am, Rik <luiheidsgoe... RemoveThis @hotmail.com> wrote:
>> > > > The problem here is that URL fopen does not seem to be open,
>> despite
>> > > > allow_url_fopen set as On in php.ini and phpinfo() reflecting it.
>>
>> > > > A simple fopen("http://www.example.com", r) returns the error
>> "failed
>> > > > to open stream: HTTP request failed!" in BOTH PHP-in-apache and
>> PHP-
>> > > > cli.
>>
>> > > Hmmmz, have you tried an fsockopen() instead of an fopen(), and if
>> so,
>> > > does that give the same problems or not?
>>
>> Whoops, guess I was wrong. fsockopen() works well, so I guess my HTTP
>> wrapper is damaged or something?
>
> Sorry to bump, but does anyone have a solution?

Nope, sorry, if an fsockopen() works (can connect and grab contents), and
a fopen() doesn't, and allow_url_fopen is on, I'm stumped. I'd almost say
there was something wrong with your PHP install. Can't be a 100% sure
though.

--
Rik Wasmus
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> PHP
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum