digitalmars.D - PHP: fetch an URL via SSL
- Andrei Alexandrescu (6/6) Apr 02 2014 Brad Roberts is trying to switch bugzilla to use https, which breaks
- Brad Anderson (8/15) Apr 02 2014 The code is fine as is. The problem is PHP needs to be built with
- Orvid King (5/20) Apr 02 2014 Specifically, you need to enable the OpenSSL plugin, if you're using a
- Brad Roberts (24/29) Apr 02 2014 I pointed you to a url that contains a couple excellent answers this mor...
- Vladimir Panteleev (4/9) Apr 02 2014 More discussion here:
- Kagamin (2/2) Apr 04 2014 Just noticed: on the index page for digitalmars.D.bugs in section
Brad Roberts is trying to switch bugzilla to use https, which breaks https://github.com/D-Programming-Language/dlang.org/blob/master/ etch-issue-cnt.php. He's not a PHP guy so he wouldn't know how to fix it. Could I trust one of our contributors to take on this task? Thanks, Andrei
Apr 02 2014
On Wednesday, 2 April 2014 at 20:28:07 UTC, Andrei Alexandrescu wrote:Brad Roberts is trying to switch bugzilla to use https, which breaks https://github.com/D-Programming-Language/dlang.org/blob/master/ etch-issue-cnt.php. He's not a PHP guy so he wouldn't know how to fix it. Could I trust one of our contributors to take on this task? Thanks, AndreiThe code is fine as is. The problem is PHP needs to be built with SSL support and the php installation on dlang.org wasn't. The only person who can fix this is Jan, I believe. The error message it gave until I switched it back to http was: "Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?"
Apr 02 2014
On Wed, 02 Apr 2014 15:32:24 -0500, Brad Anderson <eco gnuk.net> wrote:On Wednesday, 2 April 2014 at 20:28:07 UTC, Andrei Alexandrescu wrote:Specifically, you need to enable the OpenSSL plugin, if you're using a copy of php installed from a package manager, it is typically in a separate package, and, depending on the distro, will enable itself when you install it. Once that is enabled, the code will work perfectly.Brad Roberts is trying to switch bugzilla to use https, which breaks https://github.com/D-Programming-Language/dlang.org/blob/master/ etch-issue-cnt.php. He's not a PHP guy so he wouldn't know how to fix it. Could I trust one of our contributors to take on this task? Thanks, AndreiThe code is fine as is. The problem is PHP needs to be built with SSL support and the php installation on dlang.org wasn't. The only person who can fix this is Jan, I believe. The error message it gave until I switched it back to http was: "Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?"
Apr 02 2014
On 4/2/14, 1:28 PM, Andrei Alexandrescu wrote:Brad Roberts is trying to switch bugzilla to use https, which breaks https://github.com/D-Programming-Language/dlang.org/blob/master/ etch-issue-cnt.php. He's not a PHP guy so he wouldn't know how to fix it. Could I trust one of our contributors to take on this task? Thanks, AndreiI pointed you to a url that contains a couple excellent answers this morning: http://stackoverflow.com/questions/1975461/file-get-contents-with-https From that page, the primary problem is the php install on dlang.org's webserver lacks either configuration or a php extension and it's configuration: Add this to the php config file: extension=php_openssl.dll allow_url_fopen = On Alternately, if the curl extension is installed, it looks like this code would be an alternative implementation: function getSslPage($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $result = curl_exec($ch); curl_close($ch); return $result; } But the community doesn't have access to the server, so the best anyone external can do is provide this sort of data or setup an external proxy server, which is a horrible solution.
Apr 02 2014
On Wednesday, 2 April 2014 at 20:28:07 UTC, Andrei Alexandrescu wrote:Brad Roberts is trying to switch bugzilla to use https, which breaks https://github.com/D-Programming-Language/dlang.org/blob/master/ etch-issue-cnt.php. He's not a PHP guy so he wouldn't know how to fix it. Could I trust one of our contributors to take on this task?More discussion here: https://d.puremagic.com/issues/show_bug.cgi?id=12459
Apr 02 2014
Just noticed: on the index page for digitalmars.D.bugs in section "Also via" link to bugzilla leads to unencrypted site.
Apr 04 2014