php curl nss initialize error

时间:2016-06-02 05:38:52

标签: php curl nss

I use php curl to visit https website such as "“添加了Codeigniter base_url(),代码为:

    * About to connect() to api.mch.weixin.qq.com port 443 (#0)
    *   Trying 101.226.129.200... * connected
    * Connected to api.mch.weixin.qq.com (101.226.129.200) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * Unable to initialize NSS database
    * Initializing NSS with certpath: none
    * Unable to initialize NSS
    * NSS error -5925
    * Closing connection #0
    * Problem with the SSL CA cert (path? access rights?)

详细信息是:

/usr/lib64/libsoftokn3.so
/usr/lib64/libsqlite3.so.0 

以上错误并不总是发生,并且在我重启php-fpm之后,没关系。

这是什么错误?怎么解决呢?

注意:我最近没有更新我的centos os。

我发现如果我移动这两个文件中的任何一个,就会出现问题:

    # curl --version
    curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
    Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

但这两个文件总是在那里。

我的卷曲版本是:

    Linux web-www 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

我的操作系统是:

private void RunQuery()
{
    errorMsg = "";
    q = SearchBoxItemsAll.Text;
    try
    {
        OleDbCommand cmd = new OleDbCommand(q, conn);
        OleDbDataAdapter a = new OleDbDataAdapter(cmd);

        DataTable dt = new DataTable();

        a.SelectCommand = cmd;
        a.Fill(dt);
        a.Dispose();

        listBox1.DataSource = dt;
    catch (Exception ex)
    {}
}

0 个答案:

没有答案