php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66169 without --with-curlwrappers, it works anyway
Submitted: 2013-11-25 17:21 UTC Modified: 2016-05-06 14:07 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: al-iscander at mail dot ru Assigned:
Status: Wont fix Package: *Compile Issues
PHP Version: 5.4.22 OS: ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: al-iscander at mail dot ru
New email:
PHP Version: OS:

 

 [2013-11-25 17:21 UTC] al-iscander at mail dot ru
Description:
------------
If I read in documentation, for using cURL as wrapper for HTTP protocol, php must be compiled with this options.

but I compiled without it, and my php -i show that it was compiled without it, but

when I open file like fopen('http_link_to_file');

cURL wrapper works. I don't want to use it.

===================

root@t1:~/php/php-5.4.21# php-config
Usage: /usr/bin/php-config [OPTION]
Options:
  --prefix            [/usr]
  --includes          [-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib]
  --ldflags           [ -L/usr/lib/x86_64-linux-gnu]
  --libs              [-lcrypt   -lz -lexslt -lresolv -lcrypt -ledit -lncurses -laspell -lpspell -lrt -lmcrypt -lltdl -lstdc++ -lgmp -lt1 -lfreetype -lpng -lz -lvpx -ljpeg -lenchant -lcurl -lz -lrt -lm -ldl -lnsl  -lrt -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 -lnetsnmp -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lcrypt ]
  --extension-dir     [/usr/lib/php/extensions/debug-zts-20100525]
  --include-dir       [/usr/include/php]
  --man-dir           [/usr/php/man]
  --php-binary        [/usr/bin/php]
  --php-sapis         [ cli fpm cgi]
  --configure-options [--prefix=/usr --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/etc/php5/cli --with-config-file-scan-dir=/etc/php5/conf.d --enable-debug --with-openssl --with-kerberos --with-zlib --enable-calendar --with-curl --with-enchant --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib --enable-exif --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --with-mcrypt --with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvshm --with-xsl --enable-zip --with-pear --enable-zend-signals --enable-maintainer-zts]
  --version           [5.4.21]
  --vernum            [50421]

Test script:
---------------
$f = fopen('http://my.site.com/file.ext');
$info = stream_get_meta_data($f);
var_dump($info);

Expected result:
----------------
array(10) {
  ["wrapper_data"]=>
  array(7) {
    [0]=>
    string(15) "HTTP/1.1 200 OK"
    [1]=>
    string(13) "Server: nginx"
    [2]=>
    string(35) "Date: Mon, 25 Nov 2013 16:56:52 GMT"
    [3]=>
    string(38) "Content-Type: application/octet-stream"
    [4]=>
    string(19) "Content-Length: 956"
    [5]=>
    string(17) "Connection: close"
    [6]=>
    string(37) "Content-Disposition: filename="1.txt""
  }
  ["wrapper_type"]=>
  string(4) "http"
  ["stream_type"]=>
  string(14) "tcp_socket/ssl"
  ["mode"]=>
  string(2) "rb"
  ["unread_bytes"]=>
  int(956)
  ["seekable"]=>
  bool(false)
  ["uri"]=>
  string(62) "http://site.com/file.ext"
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
}

==
wrapper_type=http
there is array of response headers.

Actual result:
--------------
array(10) {
  ["wrapper_data"]=>
  array(2) {
    ["headers"]=>
    array(0) {
    }
    ["readbuf"]=>
    resource(27) of type (stream)
  }
  ["wrapper_type"]=>
  string(4) "cURL"
  ["stream_type"]=>
  string(4) "cURL"
  ["mode"]=>
  string(2) "rb"
  ["unread_bytes"]=>
  int(0)
  ["seekable"]=>
  bool(false)
  ["uri"]=>
  string(222) "http://site.com/file.ext"
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-06 14:07 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2016-05-06 14:07 UTC] nikic@php.net
Closing as "Won't Fix" as curlwrappers has been dropped from PHP 5.5, so this is no longer relevant.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Mar 22 12:01:27 2019 UTC