simplehtmldom - SSL operation failed with code 1. OpenSSL Error messages - ssl

I'm using http://simplehtmldom.sourceforge.net/ and file_get_contents() in my webApp. The file_get_contents() work fine on localhost. But when upload webApp on server(Windows server 2012 r2) i get this error. How to fix this error?
> Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75
Warning: file_get_contents(): Failed to enable crypto in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75
Warning: file_get_contents(https://www.markafoni.com/kadin/): failed to open stream: operation failed in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75
Fatal error: Call to a member function find() on boolean in E:\cfnic.com\includes\theme\category.php on line 159

You basically have to set the environment variable SSL_CERT_FILE to the path of the PEM file of the ssl-certificate downloaded from the following link : http://curl.haxx.se/ca/cacert.pem.
It took me a lot of time to figure this out.
For a detailed answer, you can have a look here: https://stackoverflow.com/questions/34590842/cannot-install-composer-on-mac-os-x/34617315

Related

i am trying to run the command "pacman -Syu" on "msys2" and it doesn't work

I just installed the window64 version of msys2 and I try to update the package database and base packages running the "pacman -Syu" command.
I get this error :
$ pacman -Syu
:: Synchronizing package databases...
mingw32.db failed to download
mingw64.db failed to download
ucrt64.db failed to download
clang32.db failed to download
clang64.db failed to download
error: failed retrieving file 'mingw32.db' from mirror.msys2.org : SSL connection timeout
error: failed retrieving file 'mingw64.db' from mirror.msys2.org : SSL connection timeout
error: failed retrieving file 'ucrt64.db' from mirror.msys2.org : SSL connection timeout
warning: too many errors from mirror.msys2.org, skipping for the remainder of this transaction
error: failed retrieving file 'clang32.db' from mirror.msys2.org : SSL connection timeout
error: failed retrieving file 'clang64.db' from mirror.msys2.org : SSL connection timeout
error: failed retrieving file 'mingw32.db' from repo.msys2.org : SSL connection timeout
if anyone has an idea i would appreciate it.

Hyperledger Fabric error: "TLS: bad certificate server" when installing chaincode

I'm just starting learning HLF, and I have an error while following tutorial from the docs: link
I downloaded fabric-samples using this command (replaced bit.ly link with the destination):
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.2 1.4.9
I run logspout in one terminal and try to execute peer lifecycle chaincode install basic.tar.gz in another one, and this is the result i get
Error: failed to retrieve endorser client for install: endorser client
failed to connect to localhost:7051: failed to create new connection:
context deadline exceeded
Log presented by Logspout:
peer0.org1.example.com|2022-03-15 13:03:24.452 UTC [core.comm]
ServerHandshake -> ERRO 04a Server TLS handshake failed in 2.650245ms
with error remote error: tls: bad certificate server=PeerServer
remoteaddress=172.22.0.1:61126
I set the envs in terminal as instructed in the docs, and I checked that CORE_PEER_TLS_ROOTCERT_FILE variable points to an existing file. The content of the file is the same as on the container.
What I tried to do:
download fabric-samples again and redo all the setup with copy-pasting the commands directly from docs
Do you have any suggestions where I can look for an issue?
I resolved the problem, I was using peer version 2.2.1 from previous experiments, it probably collided with FABRIC_CFG_PATH

Composer installer error on windows: OpenSSL failed with a 'certificate verify failed' error

I am setting up lando in my machine.
When I try to install composer, it throwing error as below.
The Composer installer script was not successful [exit code 1].
OpenSSL failed with a 'certificate verify failed' error. This indicates a problem with the Certificate Authority file(s) on your system, which may be out of date.
Certificate location [from SSL_CERT_FILE environment variable]:
C:\projects\cacert.pem
Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
I downloaded the file from https://curl.haxx.se/docs/caextract.html and added file path to my php.ini file.
[curl]
curl.cainfo = "C:\projects\cacert.pem"
[openssl]
openssl.cafile= "C:\projects\cacert.pem"

Need your help to troubleshoot an Aerospike restore issue

I am new to Aerospike and need your help to troubleshoot a restore issue. I have Aerospike running on my mac and it seem to work all fine except that it do not allow me to restore from .asb file. I took backup from an aerospike instance running on an Ubuntu machine using asbackup utility. But when I try to restore the .asb file using asrestore command on my mac instance, it throws following exception:
asrestore -d ~
restoring: host 127.0.0.1 port 3000 bin_list (null) from directory /home/vagrant
2015-08-25 15:13:43 INFO Add node BB9A9EAAB270008 127.0.0.1:3000
Aug 25 2015 15:13:43 GMT: starting restore: filename: /home/vagrant/BB9A3F5AA1ED512_00000.asb FILE 0x7f63680008c0
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
put failed in restore: unusual error 20 trying again
restore: too many consecutive put failure
Aug 25 2015 15:13:44 GMT: expired 0 : skipped 0 : attempted 0 : [updated 0 not-updated (existed 0 gen-old 0)]
I tried using -t option to restrict the thread count, but no respite.
Has any one faced a similar issue?
Looking forward to your help.
Error 20 indicates a bad namespace parameter. Check your server errorlog for more details. Seems like the namespace that is there in the backup file is not defined in the configuration of the cluster where you are trying to load using asrestore.
Two options
Create a namespace with the same namespace name as in the backup file
Write a script to change the namespace name in the backup files to the intended name which is valid in the cluster where you are trying to load.
The backup file format is documented at http://www.aerospike.com/docs/tools/backup/file_format.html

spell check : Tiny MCE editor

i am getting this error while i am enter some text and click on spellcheck icon in tinyMCE Editor..
Error response:
Warning: fsockopen(): php_network_getaddresses:
getaddrinfo failed: Temporary failure in name resolution in
/home/web/rattspar.se/scripts/tiny_mce/plugins/spellchecker/classes/GoogleSpell.php
on line 86 Warning: fsockopen(): unable to connect to
ssl://www.google.com:443 (php_network_getaddresses: getaddrinfo failed:
Temporary failure in name resolution) in
/home/web/rattspar.se/scripts/tiny_mce/plugins/spellchecker/classes/GoogleSpell.php
on line 86 Could not open SSL connection to google.{"id":null,"result":[],"error":null}
help me out/uday
Hi finally i got the answer. we have to Un-comment the line extension=php_curl.dll and extension=php_openssl.dll in php.ini and then restart the server.;-)