|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-06 14:07 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
[2016-05-06 14:07 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 01:00:01 2025 UTC |
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) }