PHP does not compile and install the implementation of openssl extension

php中世界最好的语言
Release: 2023-03-22 07:46:02
Original
1649 people have browsed it

This time I will bring youphpnot compilinginstallationimplementation of openssl extension, php does not compile and install openssl extensionWhat are the precautions, here are Let’s take a look at practical cases.

When using the RSA algorithm in php, you need to call the openssl_get_publickeymethod, but at the same time you need to compile the openssl extension for php, otherwise the following error will be prompted:

Call to undefined function openssl_get_publickey()
Copy after login

Due to PHP has been installed. How to install openss without compilation? The steps for this method are as follows:

Enter the php source code path

cd /php-5.6.19/ext/openssl
Copy after login

Use phpize to compile

cp config0.m4 config.m4 phpize
Copy after login

At this time, Generate the configure file so that you can use the make command to install it

Special instructions: You need to set the environment for the php installation pathVariables.

Execute make installation

./configure --with-php-config=/usr/local/cp-php-5.6.19/bin/php-config --with-openssl
Copy after login

Special Note: You need to install openssl first

php.ini to add extension configuration openssl extension

extension=openssl.so
Copy after login

Verify whether the addition is successful

php -m
Copy after login

You can see all the extensions of php

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to use the PHP generator

PHP’s WeChat refund application

The above is the detailed content of PHP does not compile and install the implementation of openssl extension. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!