I am trying to set up phplist on my web site. I keep getting a database connection error. I can successfully connect to db using asp.net code, as well as sql server manager. So I tested the code used to open database in a simple php page and get the following error ******************************** Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'tcp' (11004) in E:\web\thegwaac\lists\test2.php on line 2 Could not connect: Unknown MySQL server host 'tcp' (11004) ******************************** Here is code: ******************************** <?php $link = mysql_connect('tcp:s01.Winhost.com', 'DB_XXXX_database_user', '*****'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ?> ********************************
If you are looking to query a SQL database with PHP try looking at this KB article. http://support.Winhost.com/KB/a687/how-to-query-an-ms-sql-database-with-php-using-dsn.aspx