Re: php 5 and ms sql server express won't play nice !
| From: | Kirk Friggstad | Date: | Thu, 16 Aug 2007 15:02:29 +0000 |
| Subject: | Re: php 5 and ms sql server express won't play nice ! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260920@lists.php.net to get a copy of this message | ||
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 <gregory.machin@gmail.com> 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
> gregory.machin@gmail.com
> 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: kirk@daftviking.com
aim / skype: daftviking
mobile / SMS: 306-867-0010