-
Notifications
You must be signed in to change notification settings - Fork 62
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
SSL issue under PHP 5.6 #15
Comments
Hi Sorry for the delay, was quite busy ;) This isn't really an issue, because your SSL configuration isn't properly configured. But I've implemented a workaround in the When you're connecting to the API, make sure you've set the public function __construct($apiUrl='', $user='', $password='', $httpUser='', $httpPassword='', $authId='', $verifyPeer=TRUE) Would be great to get some feedback, so I can tag the changes and create a new release. Cheers |
# By Dominique Barton # Via Dominique Barton * '2.4' of https://github.com/confirm/PhpZabbixApi: new library built added peer verification flag to constructor better fix for issue confirm#15 added SSL verify peer flag for issue confirm#15 Conflicts: build/ZabbixApiAbstract.class.php
Almost working :) You need to move the
call up as the first statement in your constructor. the method userLogin() uses the method request() which needs the verify peer flag already set the right way. |
@tigerduck42 oh stupid me... you're right. |
Perfect! |
The API breaks under PHP 5.6.
This is due to the new verify-by-default policy in PHP 5.6. (See http://stackoverflow.com/questions/27088982/warning-stream-socket-enable-crypto-ssl-operation-failed-with-code-1)
On way to fix is is to add the follwing ssl section to the stream_context_create function.
in ZabbixApiAbstract::request() (~ line 308)
The text was updated successfully, but these errors were encountered: