In order to use the toolkit, you must ensure that your PHP installation is properly configured. If you will be hosting PHP pages, you will also need to configure your web server appropriately.
If you don't have PHP installed, you can get the current distribution from the download section of the PHP site. You should select the ZIP package rather than the pre-packaged installer to be sure that you get the necessary library files.
PHP 5 includes two .ini files to be used as templates for configuration. Rename php.ini-recommended to php.ini.
Search for the string "extension_dir" in php.ini. Uncomment it and set it equal to "c:/dev/php5/ext/". If you have installed into another directory adjust accordingly. PHP requires an explicit path to find your extensions under Windows.
In order to use the HTTPS protocol you need to enable some of the PHP extensions. Search for "extension=php_curl.dll". There should be a semi-colon in front of that line - remove it to enable the extension. Scroll down and find "extension=php_openssl.dll" and do the same. Now scroll down a bit further and find "extension=php_soap.dll" and do the same. That's all you need to do for now. Save the file and exit.
Now you need to copy the SSL library files from the PHP installation directory to your Windows system directory. The two files are libeay32.dll and ssleay32.dll. They need to be copied into the system directory, usually c:\windows\system32 on an XP system. If you happen to have OpenSSL already installed on your computer you may find that these files are already installed. If they are, you should only replace them if the ones from the PHP directory are more recent. Change the extensions on the existing ones by adding '.bak' just to be safe.
You'll need to add the PHP installation directory to your system path. Right-click on My Computer on your desktop (or in the Start menu) and select 'Properties'. Click on the Advanced tab and then the 'Environment Variables' button. Scroll down in the System variables list until you find 'Path'. Select it and click the 'Edit' button. Click at the end of the string and make sure that the rest of the string is not highlighted. Type ";c:\php" at the end of the existing string and click OK until all of the windows are closed.
You can get the current distribution from the download section of the Apache site.
This document will assume C:\Apache Group\Apache2 as your Apache base directory. It will assume C:\dev\php5 as your PHP base directory.
Apache's configuration is captured in the C:\Apache Group\Apache2\conf\httpd.conf file.
Turning on PHP 5 Support Edit the configuration file and add the following entries in the appropriate sections:
# Dynamic Shared Object (DSO) Support LoadModule php5_module "c:/dev/php5/php5apache2_2.dll" # AddType AddType application/x-httpd-php .php # Anywhere PHPIniDir "c:/dev/php5"
Search for "DocumentRoot" to locate the directory for your document root. If you decide to change this, please also change the value of <Directory to match the document root.
Restart Apache server to have the changes take effect.
To test whether PHP is properly configured for you web server, create a file, call it phpinfo.php and paste the following in:
<?php phpinfo(); ?>
Copy the file to your document root and access it in your browser by navigating to http://localhost:[port]/phpinfo.php where port is your http port. You should be presented with a page of PHP information about the current stage of PHP.
This is a short sample of the phpinfo output, two things to note: