|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64097 Missing streams http and ftp
Submitted: 2013-01-29 14:58 UTC Modified: 2013-01-29 23:54 UTC
From: david at davidsteinsland dot net Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.4.11 OS: CentOS 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
27 + 48 = ?
Subscribe to this entry?

 [2013-01-29 14:58 UTC] david at davidsteinsland dot net
I have compiled PHP 5.4.6. with the following config:

./configure --with-libdir=lib64 --with-config-file-path=/etc  --with-config-file-scan-dir=/etc/php.d  --prefix=/usr --enable-calendar --enable-dom=shared --enable-xmlreader=shared --enable-xmlwriter=shared --enable-bcmath=shared --enable-pcntl --enable-sysvshm=shared --enable-sysvmsg=shared --enable-shmop --enable-exif --enable-zip=shared --enable-ftp --enable-mbstring=shared --enable-sockets --enable-soap=shared --enable-gd-native-ttf --enable-intl=shared --enable-xml --enable-libxml --with-layout=PHP --without-pear --with-apxs2 --with-gmp --with-pcre-regex=/usr  --with-mcrypt=shared --with-mhash --with-zlib --with-bz2 --with-iconv --with-icu-dir=/usr --with-gettext --with-pspell=shared --enable-posix=shared --with-openssl=shared --with-curl=shared --with-curlwrappers --with-gd=shared --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-libxml-dir=/usr --with-mysql=mysqlnd --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-xmlrpc=shared --with-xsl=shared --with-tidy=shared,/usr --with-readline=shared

But I haven't got the HTTP and FTP streams registered.
cURL is enabled. Allow_url_fopen is ON.

Registered PHP Streams:
compress.zlib, compress.bzip2, php, file, glob, data, https, ftps, phar, zip

Registered Stream Socket Transports:
tcp, udp, unix, udg, ssl, sslv3, sslv2, tls

Registered Stream Filters:
zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*, http.*

Test script:
file_get_contents ("");

Expected result:
The HTML of the URL.

Actual result:
Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-29 23:43 UTC]
-Status: Open +Status: Feedback
 [2013-01-29 23:43 UTC]
Please try using this snapshot:
For Windows:

I can reproduce this in 5.4.6 -- if curl is NOT loaded.

Not with the 5.4 head, though. So this is probably already fixed. Try with a snapshot.
 [2013-01-29 23:49 UTC]
Sorry, I must have gotten erroneous results due to not having run make clean. The result in 5.4 HEAD is the same. The behavior is expected though. If you activate curl-wrappers in the configure line the default handler for http streams is not registered.

So the problem is that you're not loading curl.
 [2013-01-29 23:49 UTC]
-Status: Feedback +Status: Not a bug
 [2013-01-29 23:54 UTC]
Note that it is a bit odd to combine --with-curl=shared --with-curlwrappers in 
the same build. Making the curl extension optional while asking PHP to use it for 
wrapping streams can only lead to heartache like this.
 [2013-01-30 10:12 UTC] david at davidsteinsland dot net
@Rasmus: Yes, when you point it out.. I have compiled PHP several times, but I'm a bit newbie of what config options to use.. :-)

And a big sorry to you two for checking this out.
It was a gigantic fault on my end. When I compiled, I did not notice that the extensions were put in the dir /usr/lib/php/extensions-zend-nonts (or something).
I loaded my extensions from /usr/lib64/php/modules/, which at that point, contained modules compiled for PHP 5.4.11.. I moved the extensions to the proper directory, and then it worked like normal.

Again, sorry!

Isn't there an option to specify the ext folder at compile-time?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 06:01:29 2024 UTC