php openssl openssl_private_encrypt problem

WBOY
Release: 2023-03-01 18:02:01
Original
2773 people have browsed it

Problem: When connecting to the JD payment interface, the local dome-written program can be used, but when running online, the openssl_private_encrypt() function cannot continue to run, no error is reported, and no data is returned.
As shown in the picture: php openssl openssl_private_encrypt problem

The local one is php5.6, open openssl, Windows 7
php openssl openssl_private_encrypt problem

The server is php5.4, openssl is turned on, Windows Server 2012 R2
php openssl openssl_private_encrypt problem

When running openssl_private_encrypt(), openssl_pkey_get_private() can obtain the key resources. It has been debugging for a long time. Thank you for your help. It is also my first time to use openssl. Some places are not very clear. If there are other conditions missed Yes, please let me know to make up for it.

Want to know:
1.Do different versions of php have any impact on openssl? 2.Why can’t it run?
3.How to solve it?

After debugging and searching all morning, I couldn’t find a solution. Please give me your answer.

Added on 11/29:


php openssl openssl_private_encrypt problemphp openssl openssl_private_encrypt problemopenssl_private_encrypt() parameters, if there is no
die;or the same request as the top picture, please help!

Reply content:

Problem: When connecting to the JD payment interface, the local dome-written program can be used, but when running online, the openssl_private_encrypt() function cannot continue to run, no error is reported, and no data is returned.

As shown in the picture:
php openssl openssl_private_encrypt problem

The local one is php5.6, open openssl, Windows 7


php openssl openssl_private_encrypt problem

The server is php5.4, openssl is turned on, Windows Server 2012 R2


php openssl openssl_private_encrypt problem

When running openssl_private_encrypt(), openssl_pkey_get_private() can obtain the key resources. It took a long time to debug. Thank you for your help. It is also my first time to use openssl. Some places are not very clear. If there are other conditions missed Yes, please let me know to make up for it.

Want to know:

1.Do different versions of php have any impact on openssl? 2.Why can’t it run?
3.How to solve it?

After debugging and searching all morning, I couldn’t find a solution. Please give me your answer.

Added on 11/29:


php openssl openssl_private_encrypt problemopenssl_private_encrypt() parameters, if there is no php openssl openssl_private_encrypt problemdie;
or the same request as the top picture, please help!

As far as I know, https access can only be initiated with the openssl module. What you use is encryption and decryption. I have never touched it!

If you are using Apache,

Copy the libeay32.dll and ssleay32.dll files in the PHP directory to the BIN directory of Apache


Before copying, stop apache first

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!