douyong1908 2015-08-18 21:39
浏览 374

警告:openssl_pkcs7_sign():使用WAMP获取私钥时出错

I am trying to sign PDF using TCPDF, but I have got this error:

Warning: openssl_pkcs7_sign(): error getting private key in C:\wamp\www\tcpdf\tcpdf.php on line 7594.   

My PHP version is 5.5.12 and TCPDF 6.2.11. Windows 7.

Other examples run well but this fails. I have tried:

'file://'.( dirname(FILE)).'./path/to/file' and again $certificate = 'file://'.realpath('../tcpdf.crt'); 

but does not work for me.

  • 写回答

2条回答 默认 最新

  • dongyiluan1718 2015-08-19 00:13
    关注

    I think file:// is not correct. You fetch die real path with dirname(__FILE__) that should be enough. So i prefer:

    $certificate = __DIR__'/../tcpdf.crt';
    

    __DIR__ or dirname(FILE) is the path to the file you've in. To you can go back with /../../ to your file depends on your folder location for your certificate files.

    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧