Issue: LINUX+APACHE2+PHP5 environment, configure SSL to make HTTPS accessible, and then execute the test code:
After running, the page prompt cannot connect to the server.
After testing, the problem is that the Openssl_public_encrypt () function cannot be executed.
The Openssl_get_publickey () function passes normally, but the Openssl_public_encrypt () function causes Apache to collapse.
Direct background execution:/path/php-f ssl-encry.php, only 1, 2 has the result, the 3rd space.
Test the normal output in a Windows environment.
How is this kind of situation solved?
Reply to discussion (solution)
The Openssl_get_publickey () function passes normally, but the Openssl_public_encrypt () function causes Apache to collapse.
Check Apache error log
1, because the SSL version of Apache and PHP inconsistent, re-configure the same SSL, you can run.
2, the implementation results are still only 1, 22 places, the 3rd place is empty.
Harry
Problem solving:
The certificate and key permissions are inconsistent, all changed to 0755.