freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP
- From: "David Busby" <busby AT pnts.com>
- To: <mlmsrini AT lycos.com>, "FreeTDS Development Group" <freetds AT lists.ibiblio.org>, "Arnar Birgisson" <ArnarB AT oddi.is>
- Cc: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP
- Date: Wed, 2 Jul 2003 15:23:29 -0700
use the freetds conf file to make a DSN for the connection then do
mssql_connect('dsn_name');
/B
----- Original Message -----
From: "Venkatraman M Srinivasan" <mlmsrini AT lycos.com>
To: "Arnar Birgisson" <ArnarB AT oddi.is>
Cc: <freetds AT lists.ibiblio.org>
Sent: Wednesday, July 02, 2003 15:16
Subject: Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP
> Hi
> I have installed php-4.3.2 and compiled --with-mssql=/usr/local.
> No errors occured during compilation. Now i am getting the mssql support
description for the first time in the phpinfo list.
>
> Then i tried with the sample php code.
> <?
> // connectivity test
> $conn = mssql_connect("MYSERVER70",$user,$pswd)
> or die( "Connection to MSSQL SERVER failed" );
> // Also i 've tried this
> $conn = mssql_connect("192.168.4.25:1433",$user,$pswd)
> // Then tried with this - For SQL Server 2000 we have to use , instead of
: for the port number - some suggest this
> $conn = mssql_connect("192.168.4.25,1433",$user,$pswd)
>
> $query = mssql_query("SELECT product_name from product",$conn);
> while ($row=mssql_fetch_array($query)) {
> $prodName=$row["product_name"];
> echo ("Product - ".$prodName."<br>");
> }
> ?>
> Now i am getting the error
> 'Warning: mssql_connect(): Unable to connect to server: MYSERVER70 in
/home/httpd/test/test.php on line 4'
> ERROR: Connection to MSSQL SERVER failed
> It's throwing the die part.
>
> (Previously i was getting the error 'Fatal error: Call to undefined
> >>>function: mssql_connect() in /home/httpd/test/test.php on line 4'.)
>
> This means now it is working for mssql extensions.
> But now the problem is with the MSSQL Server connectivity.
>
> I have specified this in freetds.conf file which is inside /usr/local/etc.
> [MYSERVER70]
> host = 192.168.4.25 // MSSQL Server's IP
> port = 1433
> tds version = 7.0
> Also i have got the same file freetds.conf inside my /usr/local/freetds/
folder. I have specified the above server specification in this file aswell.
I don't know which one to use.
> Is the problem because of this?. If so can i delete one freetds.conf file
which is not needed.
> So in general it seems i am very close to achieve the MSSSQL Server
connectivity.
>
> Any suggestions?
>
> Thanks
>
> svan
>
>
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP,
Arnar Birgisson, 07/01/2003
- <Possible follow-up(s)>
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, Venkatraman M Srinivasan, 07/01/2003
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, Arnar Birgisson, 07/01/2003
-
Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP,
Venkatraman M Srinivasan, 07/02/2003
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, David Busby, 07/02/2003
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, Arnar Birgisson, 07/03/2003
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, Arnar Birgisson, 07/03/2003
- Re: [freetds] Connecting MSSQL Server from Red Hat linux + PHP, Venkatraman M Srinivasan, 07/03/2003
Archive powered by MHonArc 2.6.24.