草庐IT

openssl_call

全部标签

php - 警告 : openssl_pkcs7_sign(): error getting private key using WAMP

我正在尝试使用TCPDF签署PDF,但出现此错误:Warning:openssl_pkcs7_sign():errorgettingprivatekeyinC:\wamp\www\tcpdf\tcpdf.phponline7594.我的PHP版本是5.5.12和TCPDF6.2.11。Windows7。其他示例运行良好,但失败了。我试过:'file://'.(dirname(FILE)).'./path/to/file'andagain$certificate='file://'.realpath('../tcpdf.crt');但对我不起作用。 最佳答案

java - OpenSSL 解密返回 false

我尝试在Java中加密密码并使用OpenSLL在PHP中解密。除了bool(false),我什么也得不到。这是我的Java代码:privateStringencryptAES(Stringtext)throwsException{Stringkey="something-random";SecretKeySpecskeySpec=newSecretKeySpec(key.getBytes(),"AES");Ciphercipher=Cipher.getInstance("AES/ECB/PKCS5Padding");cipher.init(Cipher.ENCRYPT_MODE,ske

php - Laravel 表单请求 : bad method be called

当我使用带有Post方法的表单请求时,响应是“index()”方法响应。但它必须是“store(myRequest$request)”方法。如果我从“store()”中删除myRequest$request方法,它就可以工作。我迷路了。请帮助我。我的Controller:collectionRepository=$collectionRepository;}publicfunctionindex(){return$this->run(function(){return$this->collectionRepository->all()->get();});}publicfunction

带有 openSSL 的 PHP - 提供的 key 参数不能被强制转换为私钥

我正在尝试使用openssl_sign()函数对文件进行签名。我有以下私钥:-----开始EC私钥-----MHQCCAQEEIDzQVg9bJ1kZFsZDoLeqadA4OTgKc40ukSmQ3MVzcV0soAcGBSuBBAAKoUQDQgAEvzUNKCE3UVimCLUePomOUH/kfy0ujHdN5Kmn7ez3TtokJDy5ksVnOgf6WzpmzY46zvKAnQ44Cgx5Kdqx5dVDiw==-----结束EC私钥-----我正在使用以下函数:openssl_sign("test",$signature,$private_key,OPENSSL_ALG

php - fatal error : Cannot call constructor in HtmlHelper. php (CakePHP)

我正在为我的应用程序使用cakephp2.1.1。我有一个Controller,我在这个Controller中使用文件缓存。在Controller的操作中,我使用插件NUSOAP调用SOAPService。我有两个Action:1。索引publicfunctionindex(){$items=Cache::read('items','tenMinutes');//tenMinutesistheconfigurationofcacheif($items){$service=newService();$items=$service->callService();Cache::write('

PHP openssl_sign 停止执行所有脚本

我在使用openssl时遇到问题。为了更好地查明问题,我做了两件事;我将代码缩减为单个测试页(我已从php.net中删除)。在问题仍然存在后,我将tat代码上传到服务器。服务器按预期工作,所以问题一定出在我的设置中!?我发现有人遇到了完全相同的问题,但他的代码不同,解决方案对我不起作用(ServiceApplicationsandGoogleAnalyticsAPIV3:Error101(net::ERR_CONNECTION_RESET))。这是代码:private_key.txt//opensslrsa-puboutpublic_key.txt//IMPORTANT:Thekeyp

php - 为什么我们使用像 "call_user_func($callback,$param)"而不是 "$callback($param)"这样的代码

这个问题在这里已经有了答案:PHPcall_user_funcvs.justcallingfunction(8个答案)关闭9年前。PHP只是一种脚本语言,所以我们可以简单高效地做很多事情。为什么不使用像“$callback($param)”这样简单易行的方法呢?

PHP 不在 Mac OS X 上使用更新的 OpenSSL

我正在尝试为symfonysession安装composer.phar,但是当我这样做时,我收到一条警告消息,告诉我需要将我的openssl从0.9.8更新到1.0.1或更高版本。我做到了,我得到了openssl版本返回OpenSSL1.0.2f2016年1月28日和whichopenssl返回/usr/local/bin/openssl但是我仍然收到相同的警告消息。看起来php仍在使用/usr/bin/openssl而不是/usr/local/bin/openssl关于如何让php使用/usr/local/bin/openssl而不是/usr/bin/openssl的任何线索?提前致

php - 更新 Google 日历 - fatal error : Call to undefined function dateTime()

我正在尝试使用PHPAPI更新Google日历。我已成功创建Google日历事件并自动获取事件ID,但是当我尝试更新事件时,出现此错误:PHPFatalerror:CalltoundefinedfunctiondateTime()inpublic_html/googleapi/calendarupdate.phponline45.它指的是行:$event->setStart.dateTime($startdatetime);这是我当前的错误PHP代码:setAssertionCredentials($credentials);if($client->getAuth()->isAcces

php - 如何解决 Call to a member function notify() on array? (拉拉维尔 5.3)

我的听众是这样的:data->notify(New\App\Notifications\CheckoutOrder($event->data));}}如果我运行dd($event),结果是这样的:执行时出现错误:Calltoamemberfunctionnotify()onarray如何解决? 最佳答案 您需要使用notify()在具有Illuminate\Notifications\Notifiable特征的模型上,但绝对不在数组上。例如,你可以先获取一个User的实例:$user=User::where('email',$eve