# file_get_contents from HTTPS on Slackware 13.1

- Thread: https://externals.io/message/57914
- Original archive: https://news-web.php.net/php.internals/57914
- Started by Bostjan Skufca on 2012-02-21T14:54:47+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #57914 — Bostjan Skufca — 2012-02-21T14:54:47+00:00

URL: https://externals.io/message/57914#57914

Hi all,

we've bumped into a possible bug where `file_get_contents()` returns empty
string if we try to get contents from HTTPS source. This error only occurs
if PHP is compiled with --with-curlwrappers.

Funny thing is this only happens on slackware 13.1, but not on 13.0 or
older. I've checked ./configure and make output and they are almost
identical, strace does not return anything meaningful.
Environment is highly controlled by configuration management, software is
built in the same way, except underlying OS versions (and very basic libs
and tools versions) differ.

Two questions:
1. Do any of you guys have any idea about this?
2. How to continue exploring deeper to discover what actually this error is
all about?

Regards,
b.

---

## #57915 — keisial@gmail.com — 2012-02-21T15:50:01+00:00

URL: https://externals.io/message/57914#57915 · In reply to: #57914

> Hi all,
>
> we've bumped into a possible bug where `file_get_contents()` returns empty
> string if we try to get contents from HTTPS source. This error only occurs
> if PHP is compiled with --with-curlwrappers.
>
> Funny thing is this only happens on slackware 13.1, but not on 13.0 or
> older. I've checked ./configure and make output and they are almost
> identical, strace does not return anything meaningful.
> Environment is highly controlled by configuration management, software is
> built in the same way, except underlying OS versions (and very basic libs
> and tools versions) differ.
>
> Two questions:
> 1. Do any of you guys have any idea about this?
> 2. How to continue exploring deeper to discover what actually this error is
> all about?
>
> Regards,
> b.
Have you checked it's not a failure verificating the certificate?

---

## #57920 — Rasmus Lerdorf — 2012-02-21T17:16:15+00:00

URL: https://externals.io/message/57914#57920 · In reply to: #57914

> Hi all,
> 
> we've bumped into a possible bug where `file_get_contents()` returns empty
> string if we try to get contents from HTTPS source. This error only occurs
> if PHP is compiled with --with-curlwrappers.
> 
> Funny thing is this only happens on slackware 13.1, but not on 13.0 or
> older. I've checked ./configure and make output and they are almost
> identical, strace does not return anything meaningful.
> Environment is highly controlled by configuration management, software is
> built in the same way, except underlying OS versions (and very basic libs
> and tools versions) differ.
> 
> Two questions:
> 1. Do any of you guys have any idea about this?
> 2. How to continue exploring deeper to discover what actually this error is
> all about?

Does a command line curl call to the same SSL URL work?

-Rasmus

---

## #57925 — Bostjan Skufca — 2012-02-21T21:38:57+00:00

URL: https://externals.io/message/57914#57925 · In reply to: #57920

Weird. Curl is consistent. It does not work (in this case) without -k
(--insecure) option or explicitly setting ca-bundle on all OS versions.

Thanks for pointers, will remove --with-curlwrappers (marked experimental)
from my PHP configure line.

BTW what is the plan with --with-curlwrappers?
Will this eventually replace current stream code as default wrapper for
communication over the net?

Thanks,
b.





> 
> > […]
> occurs
> > […]
> is
> > […]
>
> Does a command line curl call to the same SSL URL work?
>
> -Rasmus
