Re: [PHP-DB] Connect to MSDE using PHP

2004-02-23 Thread Adam Voigt
I have connected to MSDE from PHP and it does work, what I would
suggest, is ignore trying to do hostnames, and use IP's, so change the
connect line to the IP of the MSDE machine. I know some will say it's
not necessary, but I'm just telling you what I did, and it worked fine
using the standard mssql functions, not odbc.


On Sun, 2004-02-22 at 10:57, John W. Holmes wrote:
 I've downlownded and installed the Desktop Edition of MSSQL and am 
 trying to connect to it with PHP. Has anyone ever accomplished this?
 
 I've uncommented the line in php.ini to load the MSSQL functions and 
 they show up on a phpinfo() page, so that part is good.
 
 When I installed MSDE I tried it without a named instance first and just 
 set an SA password.
 
 Neither of these worked:
 mssql_connect('localhost','sa','password')
 mssql_connect('coconut','sa','password')
 
 where coconut is the name of my computer.
 
 Then I tried installing MSDE again with a named instance and tried
 
 mssql_connect('namedinstance\localhost','sa','password')
 mssql_connect('namedinstance\coconut','sa','password')
 
 and those wouldn't work either. The only response I get is failed to 
 connect to server ...
 
 I'm off to try ODBC. Anyone have any suggestions?
 
 -- 
 ---John Holmes...
 
 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
 
 php|architect: The Magazine for PHP Professionals – www.phparch.com
-- 

Adam Voigt
[EMAIL PROTECTED]

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



[PHP-DB] Connect to MSDE using PHP

2004-02-22 Thread John W. Holmes
I've downlownded and installed the Desktop Edition of MSSQL and am 
trying to connect to it with PHP. Has anyone ever accomplished this?

I've uncommented the line in php.ini to load the MSSQL functions and 
they show up on a phpinfo() page, so that part is good.

When I installed MSDE I tried it without a named instance first and just 
set an SA password.

Neither of these worked:
mssql_connect('localhost','sa','password')
mssql_connect('coconut','sa','password')
where coconut is the name of my computer.

Then I tried installing MSDE again with a named instance and tried

mssql_connect('namedinstance\localhost','sa','password')
mssql_connect('namedinstance\coconut','sa','password')
and those wouldn't work either. The only response I get is failed to 
connect to server ...

I'm off to try ODBC. Anyone have any suggestions?

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP-DB] Connect to MSDE using PHP

2004-02-22 Thread Robert Twitty
Hi John

I have never used MSDE, but from my understanding if is suppose to behave
like SQL Server.  When you installed it, did it mention anything about
whether or not TCP/IP connectivity should be supported? You may need to
ensure that the server is communicating over port 1433.  If you are
unsuccessful with either mssql or odbc, then you should try the odbtp
extension at http://odbtp.sourceforge.net. If you use odbtp, use (local)
for the SERVER parameter.

-- bob

On Sun, 22 Feb 2004, John W. Holmes wrote:

 I've downlownded and installed the Desktop Edition of MSSQL and am
 trying to connect to it with PHP. Has anyone ever accomplished this?

 I've uncommented the line in php.ini to load the MSSQL functions and
 they show up on a phpinfo() page, so that part is good.

 When I installed MSDE I tried it without a named instance first and just
 set an SA password.

 Neither of these worked:
 mssql_connect('localhost','sa','password')
 mssql_connect('coconut','sa','password')

 where coconut is the name of my computer.

 Then I tried installing MSDE again with a named instance and tried

 mssql_connect('namedinstance\localhost','sa','password')
 mssql_connect('namedinstance\coconut','sa','password')

 and those wouldn't work either. The only response I get is failed to
 connect to server ...

 I'm off to try ODBC. Anyone have any suggestions?

 --
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals – www.phparch.com

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



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



Re: [PHP-DB] Connect to MSDE using PHP

2004-02-22 Thread John W. Holmes
Robert Twitty wrote:

I have never used MSDE, but from my understanding if is suppose to behave
like SQL Server.  When you installed it, did it mention anything about
whether or not TCP/IP connectivity should be supported? You may need to
ensure that the server is communicating over port 1433.  If you are
unsuccessful with either mssql or odbc, then you should try the odbtp
extension at http://odbtp.sourceforge.net. If you use odbtp, use (local)
for the SERVER parameter.
I was able to get it to work through ODBC both using the ODBC functions 
in PHP and through ADOdb, so I guess I'll have to settle for that. I 
just want an MSSQL test environment (for free) that I can use to develop 
scripts on.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals . www.phparch.com

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