PKI Tutorials - Herong's Tutorial Examples - Version 2.03, 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 5.3.4 (cli) (built: Dec 9 2010 22:11:42) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 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 Directory of C:\local\php\ext 12/09/2010 10:13 PM 76,800 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: 2011.
Table of Contents