Re: [PHP] MSSQL failing.

2010-07-09 Thread Paul Halliday

 What am I missing?


 Is the slash before the domain name above just a typo in your e-mail?
 It took a while to get mssql configured to where I could test it here
 since we're using Microsoft's SQL Server Driver for PHP (if you are
 running PHP under Windows, I'd strongly recommend this over the old
 mssql library anyway), but this worked:

 ?php

 $hostname = 'hostname:1433';

 $username = 'DOMAIN\Username';
 $password = 'password';

 $conn = mssql_connect($hostname, $username, $password) or die('Unable
 to connect');

 var_dump($conn);

 ?

 Andrew


It was a typo :) The installation is running on FreeBSD. I am looking
at TDS right now as a possible cause.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MSSQL failing.

2010-07-09 Thread Paul Halliday
On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday paul.halli...@gmail.com wrote:

 What am I missing?


 Is the slash before the domain name above just a typo in your e-mail?
 It took a while to get mssql configured to where I could test it here
 since we're using Microsoft's SQL Server Driver for PHP (if you are
 running PHP under Windows, I'd strongly recommend this over the old
 mssql library anyway), but this worked:

 ?php

 $hostname = 'hostname:1433';

 $username = 'DOMAIN\Username';
 $password = 'password';

 $conn = mssql_connect($hostname, $username, $password) or die('Unable
 to connect');

 var_dump($conn);

 ?

 Andrew


 It was a typo :) The installation is running on FreeBSD. I am looking
 at TDS right now as a possible cause.


Got it:

In /usr/local/etc/freetds.conf:

[global]
   host = 10.x.x.x
   port = 1433
   client charset = UTF-8
   tds version = 8.0
   text size = 20971520

Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MSSQL failing.

2010-07-09 Thread Andrew Ballard
On Fri, Jul 9, 2010 at 7:10 AM, Paul Halliday paul.halli...@gmail.com wrote:
 On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday paul.halli...@gmail.com wrote:
 It was a typo :) The installation is running on FreeBSD. I am looking
 at TDS right now as a possible cause.


 Got it:

 In /usr/local/etc/freetds.conf:

 [global]
       host = 10.x.x.x
       port = 1433
       client charset = UTF-8
       tds version = 8.0
       text size = 20971520

 Thanks.


I'm glad you got it working. That's pretty much what I found when I
tried to set it up here as well. I left the host and port out of my
freetds.conf file, though.


Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] MSSQL failing.

2010-07-08 Thread Tommy Pham
 -Original Message-
 From: Paul Halliday [mailto:paul.halli...@gmail.com]
 Sent: Thursday, July 08, 2010 10:01 AM
 To: php-general@lists.php.net
 Subject: [PHP] MSSQL failing.
 
 Is there something that needs to be tweaked or added to get this to work?
I
 am trying to connect to server 2008 w/ MS SQL 2008. I can see the
 connections fail in the servers event logs if I take away \domain from
 \domain\username (mixed auth is turned off) so the communication is
 somewhat working.
 
 What am I missing?
 
 Settings are as follows:
 
 MSSQL Support enabled
 Active Persistent Links   0
 Active Links  0
 Library version   FreeTDS
 
 Directive Local Value Master Value
 mssql.allow_persistentOn  On
 mssql.batchsize   0   0
 mssql.charset no valueno value
 mssql.compatability_mode  Off Off
 mssql.connect_timeout 5   5
 mssql.datetimeconvert On  On
 mssql.max_links   Unlimited   Unlimited
 mssql.max_persistent  Unlimited   Unlimited
 mssql.max_procs   Unlimited   Unlimited
 mssql.min_error_severity  10  10
 mssql.min_message_severity10  10
 mssql.secure_connection   Off Off
 mssql.textlimit   Server default  Server default
 mssql.textsizeServer default  Server default
 mssql.timeout 60  60
 
 Thanks
 

What driver are you using?  MS SQL Server driver for PHP?
http://www.microsoft.com/downloads/details.aspx?displaylang=enFamilyID=ccdf
728b-1ea0-48a8-a84a-5052214caad9

Regards,
Tommy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MSSQL failing.

2010-07-08 Thread Andrew Ballard
On Thu, Jul 8, 2010 at 1:01 PM, Paul Halliday paul.halli...@gmail.com wrote:
 Is there something that needs to be tweaked or added to get this to
 work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see
 the connections fail in the servers event logs if I take away \domain
 from \domain\username (mixed auth is turned off) so the communication
 is somewhat working.

 What am I missing?


Is the slash before the domain name above just a typo in your e-mail?
It took a while to get mssql configured to where I could test it here
since we're using Microsoft's SQL Server Driver for PHP (if you are
running PHP under Windows, I'd strongly recommend this over the old
mssql library anyway), but this worked:

?php

$hostname = 'hostname:1433';

$username = 'DOMAIN\Username';
$password = 'password';

$conn = mssql_connect($hostname, $username, $password) or die('Unable
to connect');

var_dump($conn);

?

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php