Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

First of all I'll give a very brief introduction of what I'm trying to make. I need the mssql php functions to work on the webserver. I know that such functions were deprecated in PHP 5.3 and above. That's why I installed PHP 5.2.17 which has worked perfectly well before with such functions, and in IIS as well.

At this point I tried to do the same thing, I installed PHP, with the configuration for IIS as the web server. Made sure to enable the php_mssql extension in php.ini; and also made sure the dll file was indeed installed in the specific path.

After following these steps, php mssql functions shall work, altho they keep throwing me the following error: "Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_mssql.dll' - The specified module could not be found'"

I repeat, I've already made sure that php_mssql.dll is in the ext directory.

I've made some research but all I have found are vague answers perhaps suggesting to comment the inclusion of the extension in php.ini; something I cannot do since I need it.

Thank you in advance for any possible help.


Update, seeing I couldn't fix this, I proceed to use SQLSRV_ functions, they work just fine.

share|improve this question

1 Answer 1

How exactly are you integrated IIS and php?

I have tried the following way:

  1. Download http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip and extract to the c:\php5
  2. Rename c:\php5\php.ini-recommended to the c:\php5\php.ini and uncomment necessary modules:
    • extension=php_curl.dll
    • extension=php_gd2.dll
    • extension=php_mssql.dll
  3. In the C:\php5\php.ini set 2 options:
    • doc_root = "C:\inetpub\wwwroot"
    • extension_dir = "C:\php5\ext"
  4. Add C:\php5\ext and C:\php5\ to the system variable PATH
  5. Intsall IIS from Control panel
  6. In the IIS Manager under Handler Mappings add new mapping
    • Request path: *.php
    • Module: fastCgiModule
    • Executable: C:\php5\php-cgi.exe
    • Name: PHP-FASTCGI
  7. In the DefaultAppPool under Advanced settings set True in the 'Enable 32-Bit Applications'
  8. Restart the IIS
  9. Create simple pi.php with phpinfo()

Some basic info

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ALex>php-cgi -v
PHP 5.2.17 (cgi-fcgi) (built: Jan  6 2011 17:28:40)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

C:\Users\ALex>php-cgi -m
[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
com_dotnet
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mssql
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

As you can see mssql has been successfully loaded without any problem.

Make sure that file listed in the Loaded Configuration File from output of the phpinfo() is the file that you expected.

P.S. OS: Windows 7 Ultimate SP1 x64

share|improve this answer
    
I tried this, every step. Altho it still wont load it. Everything was pretty much the same, only thing I noticed different from the steps you provided is "In the DefaultAppPool under Advanced settings set True in the 'Enable 32-Bit Applications'" Which I did, but there's no difference, it still wont load the module. Interesting thing is that it does work in my Windows 8 laptop, so I might want to add that the server where I'm having the issue at is running on Windows Web Server 2008 R2. Thanks for your reply. –  Eduardo Castillo Feb 22 at 1:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.