php提示Fatal error: Call to undefined function openssl_x509_parse()
在安装一个网站时提示Fatal error: Call to undefined function openssl_x509_parse函数了,而函数openssl_x509_read是一个php内置的函数,这个函数像curl需要组件支持,我们需要在php.ini中打开相关配置即可.
网站提示 Fatal error: Call to undefined function openssl_x509_parse() ......
解决办法
打开php.ini,找到这一行 ;extension=php_openssl.dll,将前面的“;”去掉,再重启apache或者iis即可.
再打开网站错误不提示了,为了证明是openssl.dll没开启的原因我们可以运行如下代码:
<?php $data = openssl_x509_parse(file_get_contents('/path/to/cert.crt')); $validFrom = date('Y-m-d H:i:s', $data['validFrom_time_t']); $validTo ) date('Y-m-d H:i:s', $data['validTo_time_t']); echo $validFrom . " "; echo $validTo . " ";
这函数看看是不是没有问题.
文章网址:
随意转载^^但请附上教程地址。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor