|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-19 14:35 UTC] subscription at nazarenko dot net
Description: ------------ I have 64bit SuSE 9.3 and try to use file() function to read a webpage via http/https. The http protocol is ok, however https returns empty result without any errors/notices (E_ALL is on). I have compiled in OpenSSL support (OpenSSL is v0.9.7e). I have another machine with 32bit Linux on it in the same network, I have compiled PHP with similar settings and https works fine on it. Reproduce code: --------------- Using the following configure: ./configure --with-snmp --enable-cli --with-curl \ -disable-dom --prefix=/usr --disable-cgi \ --disable-spl --disable-xml --without-pear \ --disable-ipv6 --enable-shmop --enable-pcntl \ --without-iconv --disable-ctype --disable-libxml \ --enable-sysvsem --enable-sysvshm --enable-sockets \ --without-sqlite --disable-session --enable-sigchild \ --disable-simplexml --disable-tokenizer \ --with-curlwrappers --enable-memory-limit \ --enable-discard-path --program-suffix=-net \ --enable-ucd-snmp-hack --with-config-file-path=/etc \ --with-mysqli=/usr/bin/mysql_config PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
subscription at nazarenko dot net: "Tried the latest snapshot as advised. Same effect as before, the problem persists. Test script: <?php var_dump(file("https://host2/")); ?> Both "host1" and "host2" are on the same subnet. " (do NOT add any huge outputs of anything unless asked for!)Disabling CURLOPT_SSL_VERIFYPEER & CURLOPT_SSL_VERIFYHOST with the patch below fixes it. I believe installing a CA certificate would fix it too. Index: ext/curl/streams.c =================================================================== RCS file: /repository/php-src/ext/curl/streams.c,v retrieving revision 1.14.2.2.2.5 diff -u -p -d -r1.14.2.2.2.5 streams.c --- ext/curl/streams.c 10 Aug 2006 15:02:41 -0000 1.14.2.2.2.5 +++ ext/curl/streams.c 24 Aug 2006 15:26:40 -0000 @@ -291,6 +291,8 @@ php_stream *php_curl_stream_opener(php_s curl_easy_setopt(curlstream->curl, CURLOPT_ERRORBUFFER, curlstream->errstr); curl_easy_setopt(curlstream->curl, CURLOPT_VERBOSE, 0); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); /* enable progress notification */ curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSFUNCTION, on_progress_avail);