box-project / box2

An application for building and managing Phars.
https://box-project.github.io/box2/
MIT License
1.19k stars 80 forks source link

Installer dies with ssl error #105

Closed localgod closed 8 years ago

localgod commented 9 years ago

Running:

curl -LSs http://box-project.org/installer.php | php

Box Installer
=============

Environment Check
-----------------

"-" indicates success.
"*" indicates error.

 - You have a supported version of PHP (>= 5.3.3).
 - You have the "phar" extension installed.
 - You have a supported version of the "phar" extension.
 - You have the "openssl" extension installed.
 - The "phar.readonly" setting is off.
 - The "detect_unicode" setting is off.
 - The "allow_url_fopen" setting is on.
 - The "apc.enable_cli" setting is off.

Everything seems good!

Download
--------

 - Downloading manifest...
 - Reading manifest...
 - Downloading Box v2.5.2...

Error: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

This is likely the course: http://php.net/manual/en/migration56.openssl.php

and fixable with something like

<?php
$arrContextOptions=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);  

$response = file_get_contents("https://maps.co.weber.ut.us/arcgis/rest/services/SDE_composite_locator/GeocodeServer/findAddressCandidates?Street=&SingleLine=3042+N+1050+W&outFields=*&outSR=102100&searchExtent=&f=json", false, stream_context_create($arrContextOptions));

echo $response; ?>

as described here: http://stackoverflow.com/questions/26148701/file-get-contents-ssl-operation-failed-with-code-1-and-more

kherge commented 9 years ago

Sorry, but I won't be disabling verification.

Try this URL instead: curl -LSs https://box-project.github.io/box2/installer.php | php

robmorgan commented 9 years ago

should we make curl -LSs https://box-project.github.io/box2/installer.php | php the default in all the docs? Its much better to use HTTPS when curling and executing scripts for obvious reasons.

I'm going to make it the default in Phinx.

kherge commented 9 years ago

I think we should.

I've updated some docs, but let me know if I missed any!

ebuildy commented 7 years ago

I got this problem too, but it's possible to configure "global" stream_default, so it's not a blocking issue.

See an exemple https://gist.github.com/ebuildy/381f116e9cd18216a69188ce0230708d