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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 = "s@1";
$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 <kirk@xxxxxxxxxxxxxx> 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 <gregory.machin@xxxxxxxxx> 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@xxxxxxxxx
> > 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@xxxxxxxxxxxxxx
> aim / skype: daftviking
> mobile / SMS: 306-867-0010
>


-- 
Gregory Machin
gregory.machin@xxxxxxxxx
www.linuxpro.co.za

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux