Installing PHP v5.2.6 on Windows

Download PHP v5.2.6 for Windows from here :

When downloaded, unzip the file php-5.2.6-Win32.zip to C:\php-5

Run these commands from a command prompt

copy  "c:\php-5\php5ts.dll"           "%systemroot%\system32" /y
copy  "c:\php-5\libeay32.dll"         "%systemroot%\system32" /y
copy  "c:\php-5\ssleay32.dll"         "%systemroot%\system32" /y
copy  "c:\php-5\php.ini-recommended"  "c:\php-5\php.ini" /y
mkdir "c:\php-5\sessions"
mkdir "c:\php-5\uploads"

If you have Apache Web Server installed …
In c:\apache-2\conf\httpd.conf

*** ensure that ” actually looks like a speechmark (SHIFT 2) when you make the changes below ***

Underneath LoadModule vhost_alias_module modules/mod_vhost_alias.so
add LoadModule php5_module “c:/php-5/php5apache2_2.dll”

change from DirectoryIndex index.html
change to DirectoryIndex index.php index.html

Underneath AddType application/x-gzip .gz .tgz
Add AddType application/x-httpd-php .php
Add AddType application/x-httpd-phps .phps

Underneath Win32DisableAcceptEx
Add PHPIniDir “c:/php-5″

Save changes and close c:\apache-2\conf\httpd.conf

Fixing a known mysql.dll library issue after PHP installed
run the blue lines in a Command Prompt one at a time:

copy "c:\php-5\libmySQL.dll"  "%systemroot%\system32\libmySQL.dll" /y


Update the PHP configuration …

*** ensure that ” actually looks like a speechmark (SHIFT 2) when you make the changes below ***

Update c:\php-5\php.ini
change from ; session.save_path = “N;/path”
change to session.save_path = c:\php-5\sessions

change from ;upload_tmp_dir =
change to upload_tmp_dir = c:\php-5\uploads

change from doc_root =
change to doc_root = c:\apache-2\htdocs

change from extension_dir = “./”
change to extension_dir = c:\php-5\ext

change from ;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.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_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

change to extension=php_bz2.dll
extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
;extension=php_exif.dll
extension=php_fdf.dll
extension=php_gd2.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_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

save and exit

To test out that PHP is working with Apache -
*** ensure that ” actually looks like a speechmark (SHIFT 2) when you make the changes below ***
Open notepad and paste in this text

<html>
<head>
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>

save the file as c:\apache-2\htdocs\test.php
close notepad

Open your web browser, and goto http://127.0.0.1/test.php to test and your screen will look like this :
test.php

Because c:\apache-2\htdocs\test.php shows your specific PHP configuration, it’s recommended this file does not go on your live web server.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam by WP-SpamShield