--- On Tue, 12/9/08, Fortuno, Adam <Adam.Fortuno@xxxxxxxxxxxxx> wrote: > From: Fortuno, Adam <Adam.Fortuno@xxxxxxxxxxxxx> > Subject: RE: Re: MS SQL error...I've come a long way to get this far > To: fredsilsbee@xxxxxxxxx > Date: Tuesday, December 9, 2008, 5:14 PM > Sorry! I've been swamped today, and I needed to install > the PHP module > for SQL Server before I could respond. > > Fred> integration with Oracle...Linux or Windows? > Fred> I've got the Linux Oracle 11g1/PHP 5.2.6/ and > MySQL > Fred> connection down...I can email working code. > > Windows. I'm running PHP (in ISAPI mode) on IIS > integrating with a 9i > instance on a RedHat box. > > Fred> When I run : > Fred> <?php > Fred> // Server in the this format: > <computer>\<instance name> or > Fred> // <server>,<port> when using a non > default port number > Fred> $server = 'LANDON\SQLEXPRESS'; > Fred> > Fred> $link = mssql_connect($server, 'sa', > 'K^a_t^e_a_u_x_3141'); > Fred> > Fred> if(!$link) > Fred> { > Fred> die('Something went wrong while connecting > to MSSQL'); > Fred> } > Fred>?> > Fred> > Fred> I get > Fred> > Fred> Warning: mssql_connect() [function.mssql-connect]: > Unable to > connect > Fred> to server: LANDON\SQLEXPRESS in > C:\Inetpub\wwwroot\trymssql.php on > > Fred> line 6 Something went wrong while connecting to > MSSQL > > I installed the PHP module for SQL Server 2005 this > morning, and I > updated my php.ini file then restarted IIS. I dumped the > following into > a page, and I ran it. > > $server = 'Babylon'; > $uid = 'UserName'; > $pwd = 'FooB@r'; > > $connectionInfo = array("UID" => $uid, > "PWD" => $pwd); > $link = sqlsrv_connect($server, $connectionInfo); > > if(!$link) > { > die('Something went wrong while connecting to > MSSQL'); > } > > It worked without a problem. I downloaded whatever B.S. > module Microsoft > had on their site, and here is what I added to my ini: > > My php.ini file includes: > > [SQL_Server_2005] > extension=php_sqlsrv_ts.dll > > I'm trying a different function than you did. Give my > script a try. > > A- I've truly gotten lots of help from this "forum/list" I tried the following and got:Something went wrong while connecting to MSSQL <?php // Server in the this format: <computer>\<instance name> or // <server>,<port> when using a non default port number $server = 'LANDON\SQLEXPRESS'; //$server = '(local)\sqlexpress'; // $server = 'Babylon'; $uid = 'sa'; $pwd = 'xyxyxyxyx'; $connectionInfo = array("UID" => $uid, "PWD" => $pwd); $link = sqlsrv_connect($server, $connectionInfo); if(!$link) { die('Something went wrong while connecting to MSSQL'); } ?> I only have the 2nd statement of your: [SQL_Server_2005] extension=php_sqlsrv_ts.dll I'll try anything at this point! thanks again! I have added to my path both directories where I downloaded PHP files -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php