473,728 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not the common "failed to open stream: HTTP request failed!" problem

I have a freshly installed openSuSe 10.2 with PHP4 from
http://download.opensuse.org/reposit...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.

Aug 10 '07 #1
5 3273
Rik
On Fri, 10 Aug 2007 17:12:57 +0200, <xi******@gmail .comwrote:
I have a freshly installed openSuSe 10.2 with PHP4 from
http://download.opensuse.org/reposit...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
Aug 10 '07 #2
On Aug 11, 12:23 am, Rik <luiheidsgoe... @hotmail.comwro te:
On Fri, 10 Aug 2007 17:12:57 +0200, <xieli...@gmail .comwrote:
I have a freshly installed openSuSe 10.2 with PHP4 from
http://download.opensuse.org/reposit...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.

Aug 11 '07 #3
On Aug 11, 11:43 pm, xieli...@gmail. com wrote:
On Aug 11, 12:23 am, Rik <luiheidsgoe... @hotmail.comwro te:
On Fri, 10 Aug 2007 17:12:57 +0200, <xieli...@gmail .comwrote:
I have a freshly installed openSuSe 10.2 with PHP4 from
>http://download.opensuse.org/reposit...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?

Aug 12 '07 #4
On Aug 12, 3:59 pm, xieli...@gmail. com wrote:
On Aug 11, 11:43 pm, xieli...@gmail. com wrote:
On Aug 11, 12:23 am, Rik <luiheidsgoe... @hotmail.comwro te:
On Fri, 10 Aug 2007 17:12:57 +0200, <xieli...@gmail .comwrote:
I have a freshly installed openSuSe 10.2 with PHP4 from
http://download.opensuse.org/reposit...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?

Aug 15 '07 #5
Rik
On Wed, 15 Aug 2007 13:33:16 +0200, <xi******@gmail .comwrote:
On Aug 12, 3:59 pm, xieli...@gmail. com wrote:
>On Aug 11, 11:43 pm, xieli...@gmail. com wrote:
On Aug 11, 12:23 am, Rik <luiheidsgoe... @hotmail.comwro te:
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
Aug 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
648
by: Ibrahim Mohamed El-Ganady | last post by:
Mr : I have proplem with Visual stdio 2003 and Windows2003 Enterprise Server , when I developed web application using ASP.Net (VB) that establish connection to SQL Server database the following error appeared. Server Error in '/WebApplication1' Application. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
1
2035
by: VB Programmer | last post by:
I am getting a "IErrorInfo.GetDescription failed with E_FAIL" error when trying to do a "Fill" on a dataadapter. Any ideas?? The SQL command seems good (to an Access db). Here is the general function that I am using in a lot of other places successfully. This is the one that fails on "da.Fill(dt)"... Public Function GetDataTable(ByVal strSql As String, ByVal strCnnString As String) As DataTable Dim cnn As New...
1
5984
by: TOLI | last post by:
Where do a set the right user rights for ASP.NET 2 to connect to a SQL service Se below // Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Source Error: An unhandled exception was generated during the execution of the current web
12
6565
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I have added the new user to the database and have given the user access to the database for the app. But everytime I try and login using this users ID, I always get the error: Login failed for user Christian.Gaut If I login using my userid and...
0
2406
by: sreejith.ram | last post by:
I did google & search in this group , but couldnt find any thing related to this. This is my first attempt to connect GridView to a Oracle database via SqlDataSource. I am receving error message "OCIEnvNlsCreate failed with return code -1 but error message text was not available" Any one seen this or anything similar? Thank you in advance for all tips,suggestions,advices & helps
1
2019
by: Rico | last post by:
I have tried to access a database using asp.net. after some entries like 120+, I got an unspecified error message. Anyone know what is happening, it seems to be stuck at the same line even when i added a new line. Here is the error message: Server Error in '/sonamy' Application. -------------------------------------------------------------------------------- Unspecified error
0
1043
by: Dennis | last post by:
I am working on an ASP.NET 2.0 site. It runs fine on my local PC. When I deploy it to the server I get this error: Login failed for user ''. The user is not associated with a trusted SQL Server connection. SqlException (0x80131904): Login failed for user ''. The user is not associated with a trusted SQL Server connection.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734867
1
9445
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when I try to create my SQL connection in the code-behind, I get the following error. I tried to register the DLL using regsvr32 but that errored out saying, "dllregisterserver entry point was not found". Any ideas? Retrieving the COM class factory...
0
3462
by: =?Utf-8?B?UmFmYWVsIEFtb3JpbQ==?= | last post by:
Hello Guys, I have an application that is installed on three different data centers across the world (exactly the same environment and installed files for each one). I got some errors from just one data center and this is not making sense to me: Exception: System.Web.HttpException: Failed to create page of type
6
17560
by: bluesky9394 | last post by:
I encounter the following error. Warning: getimagesize(WebRoot/common/images/profile/) : failed to open stream: Permission denied in C:\Data\PHPSites\kamwo\indextmp-new.php on line 296 but it's working fine on my another php script. php code: $path = "WebRoot/common/images/profile/"; $file = $row1;
0
8753
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9409
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9263
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9188
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8110
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2642
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2159
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.