RE: MSSQL_CONNECT problem

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

 



Hi Dan,

Yes, I have:
extension=php_mssql.dll uncommented

I am using dll version "2000.80.194.0" which seems to be recommended for connection problems like this...

And yes - this web server talks to the SQL server on other pages using ASP....it seems to just be a PHP connection problem.....


Still stuck......


From: Dan Shirah [mailto:mrsquash2@xxxxxxxxx] 
Sent: Monday, December 08, 2008 9:46 AM
To: David Stoltz
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  MSSQL_CONNECT problem

Can't seem to connect with MSSQL_CONNECT. The function IS available. I'm
in a Windows environment, connecting to a SQL 2000 instance. My code:

mssql_connect('INTRA_SQL,1433', 'uname', 'password');
mssql_select_db('database');

I've tried leaving the port out, tried using server IP address, all to
no avail. I've copied the "ntwdblib.dll" from my SQL 2000 box to my PHP
directory on the web server - no go. (this was suggested on the php
site).

mssql.secure_connection = off (in the php.ini file)
extension=php_mssql.dll (is also included in the ini file)

Keep getting error message: Unable to connect to server

Does anyone have any ideas?

Thanks!
Dave
 
Dave,
 
For my connection I didn't copy the ntwdblib.dll file from the SQL Server and paste it onto the PHP server...I believe there was an older version of the ntwdblib.dll that I had to download...the file had a modification date of I think 11/2003.
 
Things to check.
 
extension=php_mssql.dll uncommented in your PHP.ini
 
See if your PHP server can talk to your SQL Server.  I would assume they are both inside the DMZ and that your DNS resolves the server names, correct?
 
When making your connection try doing it like this:
 
//Assign the server connection to a variable
$connect = mssql_connect('SERVERNAME, 'USERNAME', 'PASSWORD');
 
//Select your database and reference the connection
mssql_select_db('DATABASE', $connection);

-- 
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