PKI Tutorials - Herong's Tutorial Examples - Version 2.10, by Dr. Herong Yang
Configuring PHP OpenSSL on Windows
This section provides a tutorial example on how to install and configure the PHP OpenSSL module on Windows systems. PHP OpenSSL is provided as a DLL file called php_openssl.dll.
If you want to write your own PHP program to communicate with an HTTPS Web server, you should install a PHP module to help you. Currently, the best PHP module for HTTPS communication is the OpenSSL module.
Here what I did to install and configure the OpenSSL module on my Windows system:
1. Make sure I have PHP installed properly:
C:\herong>\local\php\php -version PHP 7.0.2 (cli) (built: Jan 6 2016 13:05:11) ( ZTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
2. Make sure the OpenSSL module DLL file is included in the PHP installation:
C:\herong>dir \local\php\ext\php_openssl.dll 01/06/2016 02:01 PM 91,136 php_openssl.dll
3. Create the PHP configuration file, \local\php\php.ini, if it does not exist:
C:\herong>copy \local\php\php.ini-production \local\php\php.ini 1 file(s) copied.
4. Enable the OpenSSL module by editing the configuration file with a text editor. You need to remove the comment maker (;) on two configuration lines:
... ; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: extension_dir = "ext" ... extension=php_openssl.dll ...
I think I am ready to test the PHP OpenSSL module. See the next tutorial.
Last update: 2018.
Table of Contents