Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-20 Thread Andrew Ballard
 ... but the
 second comment seems helpful.

 [1] http://www.php.net/manual/en/function.mssql-connect.php

For SQL Server 2005, getting the right version of that ntwdblib.dll is
crucial. However, Microsoft has apparently abandoned the NTWDBLIB
library, so I have begun working with PDO ODBC instead. (It isn't
100%, though.)

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



Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Gregory Machin
with the suggested config i get the following

Warning: mssql_connect() [function.mssql-connect]: Unable to connect
to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8
Couldn't connect to SQL Server on (local)\SQLEXPRESS

this is my connection script

?php
$myServer = (local)\SQLEXPRESS;
$myUser = sa;
$myPass = [EMAIL PROTECTED];
$myDB = WEBCOLTECH;

//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
 or die(Couldn't connect to SQL Server on $myServer);



On 8/16/07, Kirk Friggstad [EMAIL PROTECTED] wrote:
 SQL Server Express defaults to installing as a named instance -
 assuming that you're running Apache/PHP on the same machine as SQL
 Server Express, I believe you'll want to use (local)\SQLEXPRESS as
 the host to connect to. If it's on a different machine, you'll want to
 use MACHINENAME\SQLEXPRESS (replace MACHINENAME with the actual
 name of the computer SQL Express is running on).

 DISCLAIMER: I haven't actually tried using SQL Server with PHP, so I
 can't guarantee this will work. However, I have spent a lot of time
 working with SQL Server and ASP in a previous life, so I'd like to
 think that I have half a clue when it comes to connecting to it. :-)

 Hope this helps.

 Kirk

 On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote:
  Hi
  I have tried most of the configuration options in the php manual /
  examples http://www.php.net/function.mssql-connect  and I just can't
  get it to connect
  I'm running WAMP5 and have enables php_mssql.dll extentions etc ..
  sql server 2005 express has both named pipes and tcp/ip conections enabled,
  both are installed on the same machine (xp pro)...
 
  this it the error I keep getting
  Warning: mssql_connect() [function.mssql-connect]: Unable to connect
  to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8
  Couldn't connect to SQL Server on SQLEXPRESS
 
  Many Thanks in advance
  --
  Gregory Machin
  [EMAIL PROTECTED]
  www.linuxpro.co.za
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 _
 Kirk Friggstad, Daft Viking Consulting
 email / msn / gtalk: [EMAIL PROTECTED]
 aim / skype: daftviking
 mobile / SMS: 306-867-0010



-- 
Gregory Machin
[EMAIL PROTECTED]
www.linuxpro.co.za

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



Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Tijnema
On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote:
 Hi
 I have tried most of the configuration options in the php manual /
 examples http://www.php.net/function.mssql-connect  and I just can't
 get it to connect
 I'm running WAMP5 and have enables php_mssql.dll extentions etc ..
 sql server 2005 express has both named pipes and tcp/ip conections enabled,
 both are installed on the same machine (xp pro)...

 this it the error I keep getting
 Warning: mssql_connect() [function.mssql-connect]: Unable to connect
 to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8
 Couldn't connect to SQL Server on SQLEXPRESS

 Many Thanks in advance
 --
 Gregory Machin
 [EMAIL PROTECTED]
 www.linuxpro.co.za


If you take a look at the comments at the manual page for
mssql_connect [1], you see that a lot of people have reported problems
with, but there are also some solutions. I don't know if they work,
because I never had any MS SQL server (MySQL rocks ;-)), but the
second comment seems helpful.

Tijnema

[1] http://www.php.net/manual/en/function.mssql-connect.php
-- 
If this is a mailing list: DO NOT TOP POST! why?:
http://www.caliburn.nl/topposting.html

Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Kirk Friggstad
On 8/17/07, Gregory Machin [EMAIL PROTECTED] wrote:
 with the suggested config i get the following

 Warning: mssql_connect() [function.mssql-connect]: Unable to connect
 to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8
 Couldn't connect to SQL Server on (local)\SQLEXPRESS

That's about all I had for bright ideas on this one, sorry - like I
said, I haven't actually used PHP with MSSQL myself. The link Tijnema
posted looks promising, though. Best of luck to you.

Kirk

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



[PHP] php 5 and ms sql server express won't play nice !

2007-08-16 Thread Gregory Machin
Hi
I have tried most of the configuration options in the php manual /
examples http://www.php.net/function.mssql-connect  and I just can't
get it to connect
I'm running WAMP5 and have enables php_mssql.dll extentions etc ..
sql server 2005 express has both named pipes and tcp/ip conections enabled,
both are installed on the same machine (xp pro)...

this it the error I keep getting
Warning: mssql_connect() [function.mssql-connect]: Unable to connect
to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8
Couldn't connect to SQL Server on SQLEXPRESS

Many Thanks in advance
-- 
Gregory Machin
[EMAIL PROTECTED]
www.linuxpro.co.za

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



Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-16 Thread Kirk Friggstad
SQL Server Express defaults to installing as a named instance -
assuming that you're running Apache/PHP on the same machine as SQL
Server Express, I believe you'll want to use (local)\SQLEXPRESS as
the host to connect to. If it's on a different machine, you'll want to
use MACHINENAME\SQLEXPRESS (replace MACHINENAME with the actual
name of the computer SQL Express is running on).

DISCLAIMER: I haven't actually tried using SQL Server with PHP, so I
can't guarantee this will work. However, I have spent a lot of time
working with SQL Server and ASP in a previous life, so I'd like to
think that I have half a clue when it comes to connecting to it. :-)

Hope this helps.

Kirk

On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote:
 Hi
 I have tried most of the configuration options in the php manual /
 examples http://www.php.net/function.mssql-connect  and I just can't
 get it to connect
 I'm running WAMP5 and have enables php_mssql.dll extentions etc ..
 sql server 2005 express has both named pipes and tcp/ip conections enabled,
 both are installed on the same machine (xp pro)...

 this it the error I keep getting
 Warning: mssql_connect() [function.mssql-connect]: Unable to connect
 to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8
 Couldn't connect to SQL Server on SQLEXPRESS

 Many Thanks in advance
 --
 Gregory Machin
 [EMAIL PROTECTED]
 www.linuxpro.co.za

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




-- 
_
Kirk Friggstad, Daft Viking Consulting
email / msn / gtalk: [EMAIL PROTECTED]
aim / skype: daftviking
mobile / SMS: 306-867-0010

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