[thelist] PHP fopen https
Burhan Khalid
thelist at meidomus.com
Mon May 10 02:00:39 CDT 2004
Drew Shiel wrote:
>
> I'm doing some work in PHP (v 4.3.4), which I haven't done much of in
> years. I'm running into a problem with the fopen() function. I'm using
> it thus:
>
> $handle =
> fopen("https://username:passwd@my.server.com/file.php?parameter=fred",
> "r");
>
> And I'm getting:
>
> Warning: fopen(https://...@my.server.com/file.php?parameter=fred):
> failed to open stream: No such file or directory in
> /path/to/script/directory/script.php on line 8
>
> As I understand it, fopen() should see the "https://" and do the http
> request. My hypotheses:
>
> 1) I've a glaring error in the code there.
> 2) OpenSSL support has not been compiled in.
1. Looks okay to me, assuming the obvious (file exists, remote server is
up, etc).
2. Look for --with-openssl= in your Configure Command section of
phpinfo() output, or you can scroll down and check for the openssl
section. On my server, its :
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7d 17 Mar 2004
Hope this helps
More information about the thelist
mailing list