Installing IIS 7.5 with PHP on Windows 7

Need to install PHP on your local environment to mimic as close as possible to Azure? This guide will show you how to install IIS 7.5 with PHP on a Windows 7 machine. Do note that Azure is running IIS 8.0 but I don’t think the difference is that big.  Plus IIS 7.5 comes baked with Windows 7.

extension_dir = “C:PHPext”

date.timezone = America/Chicago

short_open_tag: On

 

The following are optional things I turned on to mimic my previous WAMP default install.  You could just copy and paste the following lines into PHP.ini.

extension=php_bz2.dll

extension=php_curl.dll

extension=php_com_dotnet.dll

extension=php_fileinfo.dll

extension=php_gd2.dll

extension=php_gettext.dll

extension=php_gmp.dll

extension=php_intl.dll

extension=php_imap.dll

;extension=php_interbase.dll

extension=php_ldap.dll

extension=php_mbstring.dll

extension=php_exif.dll      ; Must be after mbstring as it depends on it

extension=php_mysql.dll

extension=php_mysqli.dll

;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client

;extension=php_oci8_11g.dll  ; Use with Oracle 11gR2 Instant Client

extension=php_openssl.dll

;extension=php_pdo_firebird.dll

extension=php_pdo_mysql.dll

;extension=php_pdo_oci.dll

;extension=php_pdo_odbc.dll

;extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

;extension=php_pgsql.dll

extension=php_shmop.dll

 

; The MIBS data available in the PHP distribution must be installed.

; See http://www.php.net/manual/en/snmp.installation.php

;extension=php_snmp.dll

 

extension=php_soap.dll

extension=php_sockets.dll

extension=php_sqlite3.dll

;extension=php_sybase_ct.dll

;extension=php_tidy.dll

extension=php_xmlrpc.dll

extension=php_xsl.dll

 

extension=php_sqlsrv_54_nts.dll

extension=php_pdo_sqlsrv_54_nts.dll

 

  • Then you can reboot the server. START -> Internet Information Service Manager -> Manager Server -> Reset or Start -> CMD -> iisreset
  • I’ve attached a simple SQL script. Put this in your localhost directory C:inetpubwwwroot and then go to your browser and type localhost/db.php

That’s it!  It “SHOULD” run ok.

 

PROTIP!

This is a nice install to have so you can do easy configs within the IIS Manager.

http://phpmanager.codeplex.com/releases/view/69115

PHP Manager 1.2 for IIS 7 – x64