Date: 07/30/01
- Next message: olinux: "[PHP-DB] PHP Developer's Suggestion !"
- Previous message: Mark Gordon: "[PHP-DB] Can I UPDATE 2 tables with 1 SQL statement?"
- Maybe in reply to: Adam Oliver: "[PHP-DB] Can't connect to MS SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Adam,
Host name should not include the port number. If you need to use a non standard port number you should create a client configuration (using client network utility) and then use the name of the configuration as the host name.
- Frank
> I have PHP running on Apache for win32. The mssql module is enabled. I am
> trying to connect to a database with the following code.
>
> <?php
> $hostname = "192.168.1.1:1433";
> $username = "test";
> $password = "smiley";
> $dbName = "meyedev";
> $dbc = mssql_connect($hostname,$username,$password) or DIE("DATABASE FAILED
> TO RESPOND.");
> mssql_select_db($dbName) or DIE("Table unavailable");
> mssql_close($dbName);
> ?>
>
> However I get the following error.
>
> Warning: MS SQL: Unable to connect to server: 192.168.1.1:1433 in c:\program
> files\apache group\apache\htdocs\meyedev\connect.php4 on line 11
> DATABASE FAILED TO RESPOND.
>
> What am I doing wrong?
>
> Adam
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: olinux: "[PHP-DB] PHP Developer's Suggestion !"
- Previous message: Mark Gordon: "[PHP-DB] Can I UPDATE 2 tables with 1 SQL statement?"
- Maybe in reply to: Adam Oliver: "[PHP-DB] Can't connect to MS SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

