faqts : Computers : Programming : Languages : PHP : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 7 people (29%) answered Yes
Recently 2 of 7 people (29%) answered Yes

Entry

What does this mean "failed to create stream: HTTP wrapper does not support writeable connections" ?

Oct 8th, 2006 14:17
Matthew Wilkinson, Chukky Nze,


You are probably trying to open a URL with fopen with a mode of
something other than "r". If anything except "r" is used for a http://
fopen connection, it will fail as you cannot write to external URL's as
of yet.
eg.
$handle = fopen('http://google.com/', 'r'); //Works fine
$handle = fopen('http://google.com/', 'r+'); //Fails
$handle = fopen('http://google.com/', 'w'); //Fails
$handle = fopen('http://google.com/', 'w+'); //Fails
$handle = fopen('http://google.com/', 'a'); //Fails
$handle = fopen('http://google.com/', 'a+'); //Fails
$handle = fopen('http://google.com/', 'x'); //Fails
$handle = fopen('http://google.com/', 'x+'); //Fails