OllieMackJames

Github Branches Error

5 posts in this topic

thanks adrian, not sure if that is what the trouble is here.

I went into config.php and set the debug to true and this is what shows:

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /xxxxxxxxxxxxxxxxxxxxxx/public_html/wire/core/WireHttp.php on line 428

Warning: fsockopen(): Failed to enable crypto in /xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/public_html/wire/core/WireHttp.php on line 428

Warning: fsockopen(): unable to connect to ssl://api.github.com:443 (Unknown error) in /xxxxxxxxxxxxxxxxxxxxx/public_html/wire/core/WireHttp.php on line 428

Anybody have an idea what the trouble is here?

Thanks!

Share this post


Link to post
Share on other sites

Problem solved, posting solution in case others run into same stuff.

The error had to do with php 5.6 ssl certificate verification.

I got this error message(s):
- fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- fsockopen(): Failed to enable crypto
- fsockopen(): unable to connect to ssl://xx.xx.xx:443 (Unknown error)

I am on a freebsd 9.3 server and followed these steps to get things sorted out, posting here to help others who might run into same trouble.

Logged in via ssh
- # locate cert.pem
- on my server it was found in /usr/local/etc/ssl/cert.pem
- added following to php.ini: openssl.cafile=/usr/local/etc/ssl/cert.pem
- restart httpd service

Problem solved, so it had nothing to do with processwire, but my update to php 5.6, good luck!

Share this post


Link to post
Share on other sites

In case someone else encounters this issue, here's how I solved it.

  • You will need sudo access to the server.
  • Go to https://curl.haxx.se/docs/caextract.html
    You'll see on the bottom a command to download the latest CA certificate bundle.
    curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem

     

  • Download the bundle to some directory and copy it to /etc/ssl/certs/cacert.pem with

    sudo cp cacert.pem /etc/ssl/certs/cacert.pem

     

  • Find out where php.ini is stored using

    locate php.ini
    # check for ..../fpm/php.ini

    then open php.ini inside some editor 

    sudo nano /etc/php/7.0/fpm/php.ini

     

  • Find where CA certs are defined with CTRL + W (search) and type cafile and hit enter, cursor will jump to the correct line

  • Uncomment the line (remove semicolon) and type /etc/ssl/certs/cacert.pem after = sign.

  • Restart php service with

    sudo service php7.0-fpm restart

     

  • Hopefully this will be enough to get rid of fsockopen(): SSL operation failed with code 1 error.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.