[英]openssl_seal in PHP generates "503 Service Unavailable" page
因此,来自支付处理器的库开始突然显示 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。
它在服务器上运行而不是在另一个服务器上运行这一事实让我相信这是我应该与托管公司合作的事情,但我超出了我的专业领域,我不知道去哪里寻找问题或要求什么。 有任何想法吗?
我也面临同样的问题。 它是通过修改 .htaccess 文件修复的。 尝试将此代码添加到 .htaccess 文件中:
<IfModule lsapi_module><FilesMatch "\.(php|php4|php5|php7|phtml)$">
SetHandler application/x-httpd-alt-php55___lsphp
</FilesMatch></IfModule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.