Detailed explanation of the steps to install openssl extension without compiling PHP

php中世界最好的语言
Release: 2023-03-26 12:44:01
Original
1776 people have browsed it

This time I will bring you phpYou can install it without compiling itInstallationDetailed explanation of the openssl extension steps, PHP can install the openssl extension without compiling itNotesYes Which ones, the following are practical cases, let’s take a look.

When using the RSA algorithm in php, you need to call the openssl_get_publickey method, 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:

Analysis of steps to implement consistent HASH algorithm in PHP

Detailed explanation of security verification steps for PHP development api interface

The above is the detailed content of Detailed explanation of the steps to install openssl extension without compiling PHP. 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
Popular Tutorials
More>
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!