Install WAMP (Windows-Apache-MySQL-PHP) with ZIP packages – (4)

The article is one of a series articles, for more information, please have a look at: Install WAMP (Windows-Apache-MySQL-PHP) with ZIP packages – (1)

PHP

Download 5.2.17 “VC6 x86 Thread Safe” http://windows.php.net/download/. We use “VC6 x86 Thread Safe” binary for Apache, “Non Thread Safe” should be used with IIS.

1. Extract

Extract all files of php-5.2.17-Win32-VC6-x86.zip to D:\Tools\PHP

2. Environment Variable

Right click on “My Computer”, Properties -> Advanced -> Environment Variable -> Path of “System variables”. And then append

;D:\Tools\PHP

to the end.

3. Configuration file

a) copy D:\Tools\PHP\php.ini-recommended to D:\Tools\PHP\php.ini

b) Update extension_dir

extension_dir = "./"

to

extension_dir = "ext"

c) Un-comment some of “extension=…” lines.

extension=php_bz2.dll
extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_fdf.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
;extension=php_ifx.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mcrypt.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
extension=php_msql.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
extension=php_openssl.dll
extension=php_pdo.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_pspell.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll

4. Update Apache Configuration

a) Edit D:\Tools\Apache\conf\httpd.conf, add the following lines to the last

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "D:/Tools/PHP/"
LoadModule php5_module "D:/Tools/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

b) Change line

DirectoryIndex index.html

to

DirectoryIndex index.html index.php

c) Edit D:\Tools\Apache\conf\mime.types, add the following two lines

application/x-httpd-php				php
application/x-httpd-php-source			phps

5. Restart Apache Service

D:\Tools\Apache\bin\httpd.exe -k restart

6. Test

Edit D:\Tools\Apache\htdocs\index.php

<?php
phpinfo();
?>

Open http://localhost/index.php

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s