|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-09 17:18 UTC] fmk@php.net
[2008-06-09 17:49 UTC] dhf2 at buffalo dot edu
[2008-06-09 18:09 UTC] dhf2 at buffalo dot edu
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 22:00:01 2025 UTC |
Description: ------------ I've been having some issues with mssql_connect. I'm trying to connect to an MS-SQL 2000 database from PHP on a Linux server running PHP 5.1.6, but the mssql_connect() function always gives me the same error message saying it can't connect to the server. I also tried connecting to the same server from my local machine (Windows XP Pro, PHP 5.2.5) with the same results. However, I wrote a quick python script using pymssql and that worked fine from this machine. I also set up an ODBC connection on this machine and connected from PHP via odbc_connect(), which also worked fine. The mssql_connect() problems are the same whether mssql.secure_connection is set to Off or On in the php.ini Reproduce code: --------------- $db = mssql_connect('hostname', 'username', 'password'); if(!$db) { die('<h2>Massive failure</h2>'); } Expected result: ---------------- Should connect to database not print any errors Actual result: -------------- Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: host.name.of.server in /var/www/html/filename.php on line 28