Question

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

Was it helpful?

Solution

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top