【发布时间】:2021-01-28 19:53:31
【问题描述】:
因此,来自支付处理器的库突然开始显示 503 页面。我将问题缩小到openssl_seal 电话。为了简化事情,我改编并运行了openssl_seal 手册页中的示例,它还在此服务器上抛出了一个 503 页面,而在另一个服务器上工作正常。这是代码:
<?php
$certPath='public.cer';
$data = "This is top secret.";
$cert = file_get_contents($certPath);
$pk1 = openssl_get_publickey($cert);
$iv = openssl_random_pseudo_bytes(32);
$publicKey = openssl_pkey_get_public("file://{$certPath}");
$publicKeys = array($publicKey);
openssl_seal($data, $sealed, $ekeys, $publicKeys); // throws a 503 on one server, works fine on another
openssl_free_key($pk1);
echo base64_encode($sealed);
?>
两台服务器上的 PHP 版本都是 5.6.40。
它在服务器上而不是在另一个服务器上工作的事实让我相信这是我应该与托管公司一起处理的事情,但我是如此超出我的专业领域,我不知道在哪里寻找问题或要求什么。有什么想法吗?
【问题讨论】:
标签: php http-status-code-503 php-openssl