SSL operation failed with code 1. OpenSSL Error

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

Try to run the following command in your terminal
$ php -r “print_r(openssl_get_cert_locations());”

The out put will be something like below

    [default_cert_file] => /usr/local/openssl-0.9.8zb/ssl/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => /usr/local/openssl-0.9.8zb/ssl/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => /usr/local/openssl-0.9.8zb/ssl/private
    [default_default_cert_area] => /usr/local/openssl-0.9.8zb/ssl
    [ini_cafile] => 
    [ini_capath] => 

You can see, there is no setting for ini_cafile and ini_capath. To fix this issue install OpenSSL and update the path in php.ini like


About the author

Janaki( - A Software developer with 9+ years of experience in multiple technology projects across web, mobile, and cloud applications with expertise in PHP, C#, MySQL, Web services and open source platforms.

Similar Posts

VMWare shared folder as apache vhost
IIS redirect

Leave a reply


Eye Test: * Time limit is exhausted. Please reload CAPTCHA.