4

I apologise if any of this sounds like a broken record but I've trawled the internet for days and have cross-referenced at least three "how to install PHP 5 with IIS 6" guides but have had no luck whatsoever. I'm trying to configure PHP 5.4 with IIS 6 on Windows Server 2003 R2, along with SQLSRV (SQL Server Native Client) for connectivity to SQL Server.

Here is what I've done so far:

  1. Extracted php-5.4.4-nts-Win32-VC9-x86.zip to C:\PHP
  2. Installed FastCGI fcgisetup_1.5_rtw_x86.msi
  3. Downloaded Microsoft Drivers for PHP for SQL Server and extracted php_sqlsrv_54_nts.dll and php_pdo_sqlsrv_54_nts.dll to C:\PHP\ext
  4. Modified PHP.ini with the following changes:

    error_log=C:\Windows\temp\php_errors.log
    upload_tmp_dir=C:\Windows\temp session.save_path=C:\Windows\temp
    cgi.force_redirect=0 cgi.fix_pathinfo=1 fastcgi.impersonate=1
    fastcgi.logging=0 max_execution_time=300 date.timezone=Europe/Dublin extension_dir="C:\PHP\ext\"

    extension=php_mysql.dll extension=php_mysqli.dll extension=php_mbstring.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_curl.dll extension=php_exif.dll extension=php_xmlrpc.dll extension=php_openssl.dll extension=php_soap.dll extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll extension=php_imap.dll extension=php_tidy.dll extension=php_pdo_sqlsrv_54_nts.dll extension=php_sqlsrv_54_nts.dll

  5. Installed Microsoft SQL Server 2005 Native Client

If I comment out the last two extensions I can view phpinfo() with no problems. However as soon as they are introduced and the application pool is recycled it causes the page to hang, or phpinfo() will display but SQLSRV is not present.

Is there something I am missing? Thanks, valoukh

hakre
  • 193,403
  • 52
  • 435
  • 836
valoukh
  • 541
  • 1
  • 8
  • 19
  • Please add your solution as an answer below and accept it. That will mark your question as solved (yes it works and it's okay to do so). – hakre Jun 21 '12 at 15:22

1 Answers1

2

I believe the problem was related to me using the wrong versions of software for the server in question. For example:

  1. I changed to PHP 5.3 (5.3.14) VC9 x86 Non Thread Safe
  2. I uninstalled Microsoft SQL Server 2005 Native Client and installed Microsoft SQL Server 2008 Native Client

I now have SQLSRV running in PHP!

valoukh
  • 541
  • 1
  • 8
  • 19
  • 1
    I'm trying to find if PHP 5.4 works on IIS 6 but I can't find anything that says one way or another. Why did you go back to 5.3? – paulmorriss Nov 26 '13 at 17:14
  • @paulmorriss, i think php 5.4 does work in IIS 6 on Windows Server 2003. i think this can help you: https://web.archive.org/web/20180223160926/https://robsphp.blogspot.com/2012/09/how-to-install-microsofts-sql-server.html (yes, i know it's just a link but i'm using archive.org to prevent it from 404ing) – osiris Oct 23 '18 at 14:33