-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we have option to disable ssl? #110
Comments
load via constructor, filename or paramters
|
@dmzoneill 46d2642#diff-5dbeba22e806b45539eff4e47a00a391R132 46d2642#diff-5dbeba22e806b45539eff4e47a00a391R153 Also server time must be called after curl opts. Also is this correct? https://github.com/jaggedsoft/php-binance-api/blob/v0.2.5/php-binance-api.php#L125 it will throw proxyConf error |
fixed |
Still needs fixing also construct3 doesn't have proxyConf var |
thanks for the feedback, this is resolved the actual constructor calls ___constructX depending on number of parameters passed. as PHP doesn't support method overloading, we're limited by the language here.
|
Well i know this, i know php, but i feel we are not on the same page here. This is a bug and it was there from the start, multiple constructors was introduced just couple of days ago c750049#diff-5dbeba22e806b45539eff4e47a00a391R122 and following commits changes/fixes , maybe no one noticed it yet, but there is no $proxyConf parameter in construct3 function, so it will throw Undefined variable. But this is a non issue really, as it works with 4th parameter, we don't really need costruct4, 3 can have the same parameters with def null proxy. The most important bug now is still wrong function order, UseServerTime() function MUST BE called always after assigning curlOpts https://github.com/jaggedsoft/php-binance-api/blob/master/php-binance-api.php#L129 in every constructor it is used, as it makes a binance api call to get time, so curlOpts must be already assigned to prevent for example ssl cert error by adding CURLOPT_SSL_VERIFYPEER =>false Hope i explained it clearly now. |
Thank you for your report require 'vendor/autoload.php';
$options = [ "curlOpts" => ["CURLOPT_SSL_VERIFYPEER" => 0] ];
$api = new Binance\API("<api key>", "<secret>", $options);
$api->useServerTime(); |
still, should be also fixed in all constructors as it is a bug |
construct3 doesn't have these lines but everything else should be ok: $this->setupApiConfigFromFile();
$this->setupProxyConfigFromFile();
$this->setupCurlOptsFromFile(); https://github.com/jaggedsoft/php-binance-api/wiki/5.-$HOME-Config-(API---Proxy) |
His fixes are available in |
Hi @andrewpros would greatly appreciate a pull requests! seems like you are on the ball. I've been getting the units test and coverage in place for node-binance-api. Once i have it up for a fair standard, i plan to come back here to complete the remaining coverage tests and checks for PHP. If you could help, that would be aweomse! Thanks again dude @andrewpros |
Fixes jaggedsoft#110 and jaggedsoft#109 (Thanks dmzoneill!)
Wow, just wow, so you will insist on not fixing a know bug... This is beyond my understanding, if there is a function that can be called but i doesn't work as expected even if someone provide valid parameters then it is a bug and it cant stay like that. The function order is still not fixed, the expected result is to work with any valid parameters, also we don't need construct3 at all, i didn't bother with a PR as i assumed it is a simple fix, i assumed it will be fixed in no time. In fact everything should be set always before making the first and any binance api call, as that setup may have impact on any call just like with those ssl cert errors, so useServerTime should be called always last. So so you don't say i did nothing here it is, my pr |
Thanks for the feedback again man. |
Well ok then, thx. |
The title says it all, i'm testing on localhost but there is that annoying curl ssl cert error and after every update i need to manually add this again in httpRequest method
#ssl hackfix
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
The text was updated successfully, but these errors were encountered: