rocksolidhq Posted November 26, 2010 Share Posted November 26, 2010 Hey, i'm getting the usual error "mssql_connect() [function.mssql-connect]: Unable to connect to server" but only in the browser. If i run the script from the command line it works fine and retrieves the info. The system is a 64-bit Windows 7 box with IIS 7 and PHP 5.2.10. i've got the right ntwdblib.dll. i've got version 2000.80.194.0 in place right now and i've also had 2000.2.8.0 had it i PHP folder as well as in the Windows folder. I pulled my version 2000.2.8.0 from another server (2003 with IIS6) where it is working as expected. With any combination of the above, the CLI works fine but the browser give me the unable to connect to server error. My phpinfo() shows me that it has mssql loaded and further i know that it is loaded as it doesn't toss an error about an unknown function call for mssql_connect. i'm using PHP's ISAPI module. Not sure if switching to FastCGI would make any difference. Can anyone please suggest anything else that i need to check? I'm guessing that it's an IIS7 config issue since the CLI works. Basically i created the ISAPI filter (Name: PHP, Executable: C:\Program Files\PHP\php5isapi.dll) and then the Module Mapping (Request Path: *.php, Module: ISAPI Module, Executable: C:\Program Files\PHP\php5isapi.dll, Name: PHP ISAPI), clicked "Yes" after creating the module and enabled 32-bit applications in the DefaultAppPool. please help!! Quote Link to comment https://forums.phpfreaks.com/topic/219892-php-iis7-mssql-oh-my-can-connect-with-cli-but-not-in-browser/ Share on other sites More sharing options...
rocksolidhq Posted November 26, 2010 Author Share Posted November 26, 2010 Hey All, Finally got it figured out so i thought i'd post back in case someone else has the same problem. i'm not sure i understand the reasoning here either so if anyone can shed some additional light i would be grateful. To resolve this i selected the site, in my case the Default Web Site, and went into the website's "Basic Settings" (in the right column). In there i clicked the "Connect As" button and entered the administrator username and password. i'd love an explaination of the overall effect of this change. Does it create any security problems? thanks, dean Quote Link to comment https://forums.phpfreaks.com/topic/219892-php-iis7-mssql-oh-my-can-connect-with-cli-but-not-in-browser/#findComment-1140030 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.